Package org.gnome.gtk
Class CenterLayout
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gtk.LayoutManager
org.gnome.gtk.CenterLayout
- All Implemented Interfaces:
Proxy
Manages up to three children.
The start widget is allocated at the start of the layout (left in left-to-right locales and right in right-to-left ones), and the end widget at the end.
The center widget is centered regarding the full width of the layout's.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCenterLayout.Builder<B extends CenterLayout.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gtk.LayoutManager
LayoutManager.LayoutManager$Impl, LayoutManager.LayoutManagerClassNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new CenterLayout.CenterLayout(MemorySegment address) Create a CenterLayout proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected CenterLayoutasParent()Returns this instance as if it were its parent type.static CenterLayout.Builder<? extends CenterLayout.Builder> builder()ACenterLayout.Builderobject constructs aCenterLayoutwith the specified properties.Returns the baseline position of the layout.@Nullable WidgetReturns the center widget of the layout.@Nullable WidgetReturns the end widget of the layout.Gets the current orienration of the layout manager.booleanGets whether this CenterLayout shrinks the center widget after other children.@Nullable WidgetReturns the start widget of the layout.static @Nullable TypegetType()Get the GType of the CenterLayout classvoidsetBaselinePosition(BaselinePosition baselinePosition) Sets the new baseline position of this CenterLayoutvoidsetCenterWidget(@Nullable Widget widget) Sets the new center widget ofself.voidsetEndWidget(@Nullable Widget widget) Sets the new end widget ofself.voidsetOrientation(Orientation orientation) Sets the orientation ofself.voidsetShrinkCenterLast(boolean shrinkCenterLast) Sets whether to shrink the center widget after other children.voidsetStartWidget(@Nullable Widget widget) Sets the new start widget ofself.Methods inherited from class org.gnome.gtk.LayoutManager
allocate, createLayoutChild, getLayoutChild, getMemoryLayout, getRequestMode, getRequestMode, getWidget, layoutChanged, measure, root, unrootMethods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
CenterLayout
Create a CenterLayout proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
CenterLayout
public CenterLayout()Creates a new CenterLayout.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type.- Overrides:
asParentin classLayoutManager
-
getBaselinePosition
Returns the baseline position of the layout.- Returns:
- The current baseline position of
self.
-
getCenterWidget
Returns the center widget of the layout.- Returns:
- the current center widget of this CenterLayout
-
getEndWidget
Returns the end widget of the layout.- Returns:
- the current end widget of this CenterLayout
-
getOrientation
Gets the current orienration of the layout manager.- Returns:
- The current orientation of this CenterLayout
-
getShrinkCenterLast
public boolean getShrinkCenterLast()Gets whether this CenterLayout shrinks the center widget after other children.- Returns:
- whether to shrink the center widget after others
- Since:
- 4.12
-
getStartWidget
Returns the start widget of the layout.- Returns:
- The current start widget of this CenterLayout
-
setBaselinePosition
Sets the new baseline position of this CenterLayout- Parameters:
baselinePosition- the new baseline position
-
setCenterWidget
Sets the new center widget ofself.To remove the existing center widget, pass
null.- Parameters:
widget- the new center widget
-
setEndWidget
Sets the new end widget ofself.To remove the existing center widget, pass
null.- Parameters:
widget- the new end widget
-
setOrientation
Sets the orientation ofself.- Parameters:
orientation- the new orientation
-
setShrinkCenterLast
public void setShrinkCenterLast(boolean shrinkCenterLast) Sets whether to shrink the center widget after other children.By default, when there's no space to give all three children their natural widths, the start and end widgets start shrinking and the center child keeps natural width until they reach minimum width.
If set to
FALSE, start and end widgets keep natural width and the center widget starts shrinking instead.- Parameters:
shrinkCenterLast- whether to shrink the center widget after others- Since:
- 4.12
-
setStartWidget
Sets the new start widget ofself.To remove the existing start widget, pass
null.- Parameters:
widget- the new start widget
-
builder
ACenterLayout.Builderobject constructs aCenterLayoutwith the specified properties. Use the variousset...()methods to set properties, and finish construction withCenterLayout.Builder.build().- Returns:
- the builder object
-