Package org.gnome.gtk
Class Constraint.Builder<B extends Constraint.Builder<B>>
java.lang.Object
org.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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theConstraintobject.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:sourceread 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:targetset by the constraint.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theConstraintobject. 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:
buildin classGObject.Builder<B extends Constraint.Builder<B>>- Returns:
- a new instance of
Constraintwith 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 theconstantproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setMultiplier
The multiplication factor to be applied to theGtk.Constraint:source-attribute.- Parameters:
multiplier- the value for themultiplierproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setRelation
The order relation between the terms of the constraint.- Parameters:
relation- the value for therelationproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSource
The source of the constraint.The constraint will set the
Gtk.Constraint:target-attributeproperty of the target using theGtk.Constraint:source-attributeproperty of the source.- Parameters:
source- the value for thesourceproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setSourceAttribute
The attribute of theGtk.Constraint:sourceread by the constraint.- Parameters:
sourceAttribute- the value for thesource-attributeproperty- Returns:
- the
Builderinstance 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.ConstraintStrengthenumeration, or any positive integer value.- Parameters:
strength- the value for thestrengthproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTarget
The target of the constraint.The constraint will set the
Gtk.Constraint:target-attributeproperty of the target using theGtk.Constraint:source-attributeproperty of the source widget.- Parameters:
target- the value for thetargetproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setTargetAttribute
The attribute of theGtk.Constraint:targetset by the constraint.- Parameters:
targetAttribute- the value for thetarget-attributeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-