Package org.gnome.gtk
Class Adjustment.Builder<B extends Adjustment.Builder<B>>
java.lang.Object
org.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.InitiallyUnowned.Builder<B>
org.gnome.gtk.Adjustment.Builder<B>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Adjustment
public static class Adjustment.Builder<B extends Adjustment.Builder<B>>
extends InitiallyUnowned.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theAdjustmentobject.onChanged(Adjustment.ChangedCallback handler) Emitted when one or more of theGtkAdjustmentproperties have been changed.Emitted when the value has been changed.setLower(double lower) The minimum value of the adjustment.setPageIncrement(double pageIncrement) The page increment of the adjustment.setPageSize(double pageSize) The page size of the adjustment.setStepIncrement(double stepIncrement) The step increment of the adjustment.setUpper(double upper) The maximum value of the adjustment.setValue(double value) The value of the adjustment.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 theAdjustmentobject. 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 toAdjustment.- Overrides:
buildin classInitiallyUnowned.Builder<B extends Adjustment.Builder<B>>- Returns:
- a new instance of
Adjustmentwith the properties that were set in the Builder object.
-
setLower
The minimum value of the adjustment.- Parameters:
lower- the value for thelowerproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPageIncrement
The page increment of the adjustment.- Parameters:
pageIncrement- the value for thepage-incrementproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setPageSize
The page size of the adjustment.Note that the page-size is irrelevant and should be set to zero if the adjustment is used for a simple scalar value, e.g. in a
GtkSpinButton.- Parameters:
pageSize- the value for thepage-sizeproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setStepIncrement
The step increment of the adjustment.- Parameters:
stepIncrement- the value for thestep-incrementproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setUpper
The maximum value of the adjustment.Note that values will be restricted by
upper - page-sizeif the page-size property is nonzero.- Parameters:
upper- the value for theupperproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setValue
The value of the adjustment.- Parameters:
value- the value for thevalueproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
onChanged
Emitted when one or more of theGtkAdjustmentproperties have been changed.Note that the
Gtk.Adjustment:valueproperty is covered by theGtk.Adjustment::value-changedsignal.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onValueChanged
Emitted when the value has been changed.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-