Package org.gnome.adw
Class SpinRow.Builder<B extends SpinRow.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.Widget.Builder<B>
org.gnome.gtk.ListBoxRow.Builder<B>
org.gnome.adw.PreferencesRow.Builder<B>
org.gnome.adw.ActionRow.Builder<B>
org.gnome.adw.SpinRow.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Actionable.Builder<B>
,Editable.Builder<B>
- Enclosing class:
SpinRow
public static class SpinRow.Builder<B extends SpinRow.Builder<B>>
extends ActionRow.Builder<B>
implements Accessible.Builder<B>, Actionable.Builder<B>, Editable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theSpinRow
object.onInput
(SpinRow.InputCallback handler) Emitted to convert the user's input into a double value.onOutput
(SpinRow.OutputCallback handler) Emitted to tweak the formatting of the value for display.onWrapped
(SpinRow.WrappedCallback handler) Emitted right after the spinbutton wraps.setAdjustment
(Adjustment adjustment) The adjustment that holds the value of the spin row.setClimbRate
(double climbRate) The acceleration rate when you hold down a button or key.setDigits
(int digits) The number of decimal places to display.setNumeric
(boolean numeric) Whether non-numeric characters should be ignored.setSnapToTicks
(boolean snapToTicks) Whether invalid values are snapped to the nearest step increment.setUpdatePolicy
(SpinButtonUpdatePolicy updatePolicy) The policy for updating the spin row.setValue
(double value) The current value.setWrap
(boolean wrap) Whether the spin row should wrap upon reaching its limits.Methods inherited from class org.gnome.adw.ActionRow.Builder
onActivated, setActivatableWidget, setIconName, setSubtitle, setSubtitleLines, setSubtitleSelectable, setTitleLines
Methods inherited from class org.gnome.adw.PreferencesRow.Builder
setTitle, setTitleSelectable, setUseMarkup, setUseUnderline
Methods inherited from class org.gnome.gtk.ListBoxRow.Builder
onActivate, setActivatable, setChild, setSelectable
Methods inherited from class org.gnome.gtk.Widget.Builder
onDestroy, onDirectionChanged, onHide, onKeynavFailed, onMap, onMnemonicActivate, onMoveFocus, onQueryTooltip, onRealize, onShow, onStateFlagsChanged, onUnmap, onUnrealize, setCanFocus, setCanTarget, setCssClasses, setCssName, setCursor, setFocusable, setFocusOnClick, setHalign, setHasTooltip, setHeightRequest, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequest
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRole
Methods inherited from interface org.gnome.gtk.Actionable.Builder
setActionName, setActionTarget
Methods inherited from interface io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
Methods inherited from interface org.gnome.gtk.Editable.Builder
setEditable, setEnableUndo, setMaxWidthChars, setText, setWidthChars, setXalign
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theSpinRow
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 toSpinRow
.- Overrides:
build
in classActionRow.Builder<B extends SpinRow.Builder<B>>
- Returns:
- a new instance of
SpinRow
with the properties that were set in the Builder object.
-
setAdjustment
The adjustment that holds the value of the spin row.- Parameters:
adjustment
- the value for theadjustment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setClimbRate
The acceleration rate when you hold down a button or key.- Parameters:
climbRate
- the value for theclimb-rate
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setDigits
The number of decimal places to display.- Parameters:
digits
- the value for thedigits
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setNumeric
Whether non-numeric characters should be ignored.- Parameters:
numeric
- the value for thenumeric
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSnapToTicks
Whether invalid values are snapped to the nearest step increment.- Parameters:
snapToTicks
- the value for thesnap-to-ticks
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setUpdatePolicy
The policy for updating the spin row.The options are always, or only when the value is invalid.
- Parameters:
updatePolicy
- the value for theupdate-policy
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setValue
The current value.- Parameters:
value
- the value for thevalue
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setWrap
Whether the spin row should wrap upon reaching its limits.- Parameters:
wrap
- the value for thewrap
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onInput
Emitted to convert the user's input into a double value.The signal handler is expected to use
Editable.getText()
to retrieve the text of the spinbutton and set new_value to the new value.The default conversion uses
GLib.strtod(java.lang.String, io.github.jwharm.javagi.base.Out<java.lang.String>)
.See
Gtk.SpinButton::input
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onOutput
Emitted to tweak the formatting of the value for display.See
Gtk.SpinButton::output
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onWrapped
Emitted right after the spinbutton wraps.See
Gtk.SpinButton::wrapped
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-