Package org.gnome.adw
Class SpinRow.Builder<B extends SpinRow.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.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:
Accessible.Builder<B>,Actionable.Builder<B>,Editable.Builder<B>,BuilderInterface
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theSpinRowobject.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, setTitleLinesMethods inherited from class org.gnome.adw.PreferencesRow.Builder
setTitle, setTitleSelectable, setUseMarkup, setUseUnderlineMethods inherited from class org.gnome.gtk.ListBoxRow.Builder
onActivate, setActivatable, setChild, setSelectableMethods 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, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setReceivesDefault, setSensitive, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setWidthRequestMethods inherited from class org.gnome.gobject.GObject.Builder
onNotifyMethods inherited from class org.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gnome.gtk.Accessible.Builder
setAccessibleRoleMethods inherited from interface org.gnome.gtk.Actionable.Builder
setActionName, setActionTargetMethods inherited from interface org.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface org.gnome.gtk.Editable.Builder
setEditable, setEnableUndo, setMaxWidthChars, setText, setWidthChars, setXalign
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theSpinRowobject. 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:
buildin classActionRow.Builder<B extends SpinRow.Builder<B>>- Returns:
- a new instance of
SpinRowwith 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 theadjustmentproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setClimbRate
The acceleration rate when you hold down a button or key.- Parameters:
climbRate- the value for theclimb-rateproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setDigits
The number of decimal places to display.- Parameters:
digits- the value for thedigitsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setNumeric
Whether non-numeric characters should be ignored.- Parameters:
numeric- the value for thenumericproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setSnapToTicks
Whether invalid values are snapped to the nearest step increment.- Parameters:
snapToTicks- the value for thesnap-to-ticksproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
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-policyproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setValue
The current value.- Parameters:
value- the value for thevalueproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
setWrap
Whether the spin row should wrap upon reaching its limits.- Parameters:
wrap- the value for thewrapproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
-
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, org.javagi.base.Out<java.lang.String>).See
Gtk.SpinButton::input.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
- See Also:
-
onOutput
Emitted to tweak the formatting of the value for display.See
Gtk.SpinButton::output.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
- See Also:
-
onWrapped
Emitted right after the spinbutton wraps.See
Gtk.SpinButton::wrapped.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 1.4
- See Also:
-