Package org.gnome.gtk
Class Adjustment.Builder<B extends Adjustment.Builder<B>>
java.lang.Object
io.github.jwharm.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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theAdjustment
object.onChanged
(Adjustment.ChangedCallback handler) Emitted when one or more of theGtkAdjustment
properties 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
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 theAdjustment
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 toAdjustment
.- Overrides:
build
in classInitiallyUnowned.Builder<B extends Adjustment.Builder<B>>
- Returns:
- a new instance of
Adjustment
with the properties that were set in the Builder object.
-
setLower
The minimum value of the adjustment.- Parameters:
lower
- the value for thelower
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setPageIncrement
The page increment of the adjustment.- Parameters:
pageIncrement
- the value for thepage-increment
property- Returns:
- the
Builder
instance 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-size
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setStepIncrement
The step increment of the adjustment.- Parameters:
stepIncrement
- the value for thestep-increment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUpper
The maximum value of the adjustment.Note that values will be restricted by
upper - page-size
if the page-size property is nonzero.- Parameters:
upper
- the value for theupper
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setValue
The value of the adjustment.- Parameters:
value
- the value for thevalue
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onChanged
Emitted when one or more of theGtkAdjustment
properties have been changed.Note that the
Gtk.Adjustment:value
property is covered by theGtk.Adjustment::value-changed
signal.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onValueChanged
Emitted when the value has been changed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-