Class ConstraintGuide
- All Implemented Interfaces:
ConstraintTarget,Proxy
GtkConstraintLayout.
The GtkConstraintLayout treats guides like widgets. They
can be used as the source or target of a GtkConstraint.
Guides have a minimum, maximum and natural size. Depending on the constraints that are applied, they can act like a guideline that widgets can be aligned to, or like *flexible space*.
Unlike a GtkWidget, a GtkConstraintGuide will not be drawn.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConstraintGuide.Builder<B extends ConstraintGuide.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface org.gnome.gtk.ConstraintTarget
ConstraintTarget.ConstraintTarget$Impl, ConstraintTarget.ConstraintTargetInterface -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ConstraintGuide.ConstraintGuide(MemorySegment address) Create a ConstraintGuide proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConstraintGuideasParent()Returns this instance as if it were its parent type.static ConstraintGuide.Builder<? extends ConstraintGuide.Builder> builder()AConstraintGuide.Builderobject constructs aConstraintGuidewith the specified properties.voidgetMaxSize(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Gets the maximum size ofguide.voidgetMinSize(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Gets the minimum size ofguide.@Nullable StringgetName()Retrieves the name set using gtk_constraint_guide_set_name().voidgetNatSize(@Nullable Out<Integer> width, @Nullable Out<Integer> height) Gets the natural size ofguide.Retrieves the strength set using gtk_constraint_guide_set_strength().static @Nullable TypegetType()Get the GType of the ConstraintGuide classvoidsetMaxSize(int width, int height) Sets the maximum size ofguide.voidsetMinSize(int width, int height) Sets the minimum size ofguide.voidSets a name for the givenGtkConstraintGuide.voidsetNatSize(int width, int height) Sets the natural size ofguide.voidsetStrength(ConstraintStrength strength) Sets the strength of the constraint on the natural size of the givenGtkConstraintGuide.Methods 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, getMemoryLayout, 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
-
ConstraintGuide
Create a ConstraintGuide proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
ConstraintGuide
public ConstraintGuide()Creates a new ConstraintGuide.
-
-
Method Details
-
getType
Get the GType of the ConstraintGuide class- Returns:
- the GType
-
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. -
getMaxSize
-
getMinSize
-
getName
Retrieves the name set using gtk_constraint_guide_set_name().- Returns:
- the name of the guide
-
getNatSize
-
getStrength
Retrieves the strength set using gtk_constraint_guide_set_strength().- Returns:
- the strength of the constraint on the natural size
-
setMaxSize
public void setMaxSize(int width, int height) Sets the maximum size ofguide.If this ConstraintGuide is attached to a
GtkConstraintLayout, the constraints will be updated to reflect the new size.- Parameters:
width- the new maximum width, or -1 to not change itheight- the new maximum height, or -1 to not change it
-
setMinSize
public void setMinSize(int width, int height) Sets the minimum size ofguide.If this ConstraintGuide is attached to a
GtkConstraintLayout, the constraints will be updated to reflect the new size.- Parameters:
width- the new minimum width, or -1 to not change itheight- the new minimum height, or -1 to not change it
-
setName
Sets a name for the givenGtkConstraintGuide.The name is useful for debugging purposes.
- Parameters:
name- a name for the this ConstraintGuide
-
setNatSize
public void setNatSize(int width, int height) Sets the natural size ofguide.If this ConstraintGuide is attached to a
GtkConstraintLayout, the constraints will be updated to reflect the new size.- Parameters:
width- the new natural width, or -1 to not change itheight- the new natural height, or -1 to not change it
-
setStrength
Sets the strength of the constraint on the natural size of the givenGtkConstraintGuide.- Parameters:
strength- the strength of the constraint
-
builder
AConstraintGuide.Builderobject constructs aConstraintGuidewith the specified properties. Use the variousset...()methods to set properties, and finish construction withConstraintGuide.Builder.build().- Returns:
- the builder object
-