Package org.gnome.gtk
Class Constraint.Builder<B extends Constraint.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gtk.Constraint.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Constraint
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theConstraint
object.setConstant
(double constant) The constant value to be added to theGtk.Constraint:source-attribute
.setMultiplier
(double multiplier) The multiplication factor to be applied to theGtk.Constraint:source-attribute
.setRelation
(ConstraintRelation relation) The order relation between the terms of the constraint.setSource
(ConstraintTarget source) The source of the constraint.setSourceAttribute
(ConstraintAttribute sourceAttribute) The attribute of theGtk.Constraint:source
read by the constraint.setStrength
(int strength) The strength of the constraint.setTarget
(ConstraintTarget target) The target of the constraint.setTargetAttribute
(ConstraintAttribute targetAttribute) The attribute of theGtk.Constraint:target
set by the constraint.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theConstraint
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toConstraint
.- Overrides:
build
in classGObject.Builder<B extends Constraint.Builder<B>>
- Returns:
- a new instance of
Constraint
with the properties that were set in the Builder object.
-
setConstant
The constant value to be added to theGtk.Constraint:source-attribute
.- Parameters:
constant
- the value for theconstant
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setMultiplier
The multiplication factor to be applied to theGtk.Constraint:source-attribute
.- Parameters:
multiplier
- the value for themultiplier
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRelation
The order relation between the terms of the constraint.- Parameters:
relation
- the value for therelation
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSource
The source of the constraint.The constraint will set the
Gtk.Constraint:target-attribute
property of the target using theGtk.Constraint:source-attribute
property of the source.- Parameters:
source
- the value for thesource
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSourceAttribute
The attribute of theGtk.Constraint:source
read by the constraint.- Parameters:
sourceAttribute
- the value for thesource-attribute
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStrength
The strength of the constraint.The strength can be expressed either using one of the symbolic values of the
Gtk.ConstraintStrength
enumeration, or any positive integer value.- Parameters:
strength
- the value for thestrength
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTarget
The target of the constraint.The constraint will set the
Gtk.Constraint:target-attribute
property of the target using theGtk.Constraint:source-attribute
property of the source widget.- Parameters:
target
- the value for thetarget
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTargetAttribute
The attribute of theGtk.Constraint:target
set by the constraint.- Parameters:
targetAttribute
- the value for thetarget-attribute
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-