Class ScaleButton.Builder<B extends ScaleButton.Builder<B>>
- Type Parameters:
B- the type of the Builder that is returned
- All Implemented Interfaces:
Accessible.Builder<B>,Orientable.Builder<B>,BuilderInterface
- Direct Known Subclasses:
VolumeButton.Builder
- Enclosing class:
ScaleButton
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theScaleButtonobject.onPopdown(ScaleButton.PopdownCallback handler) Emitted to dismiss the popup.onPopup(ScaleButton.PopupCallback handler) Emitted to popup the scale widget.Emitted when the value field has changed.setAdjustment(Adjustment adjustment) TheGtkAdjustmentthat is used as the model.setHasFrame(boolean hasFrame) If the scale button has a frame.The names of the icons to be used by the scale button.setValue(double value) The value of the scale.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, 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.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArenaMethods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientation
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilderobject.
-
-
Method Details
-
build
Finish building theScaleButtonobject. 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 toScaleButton.- Overrides:
buildin classWidget.Builder<B extends ScaleButton.Builder<B>>- Returns:
- a new instance of
ScaleButtonwith the properties that were set in the Builder object.
-
setAdjustment
TheGtkAdjustmentthat is used as the model.- Parameters:
adjustment- the value for theadjustmentproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setHasFrame
If the scale button has a frame.- Parameters:
hasFrame- the value for thehas-frameproperty- Returns:
- the
Builderinstance is returned, to allow method chaining - Since:
- 4.14
-
setIcons
The names of the icons to be used by the scale button.The first item in the array will be used in the button when the current value is the lowest value, the second item for the highest value. All the subsequent icons will be used for all the other values, spread evenly over the range of values.
If there's only one icon name in the
iconsarray, it will be used for all the values. If only two icon names are in theiconsarray, the first one will be used for the bottom 50% of the scale, and the second one for the top 50%.It is recommended to use at least 3 icons so that the
GtkScaleButtonreflects the current value of the scale better for the users.- Parameters:
icons- the value for theiconsproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setValue
The value of the scale.- Parameters:
value- the value for thevalueproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
onPopdown
Emitted to dismiss the popup.This is a keybinding signal.
The default binding for this signal is
Escape.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onPopup
Emitted to popup the scale widget.This is a keybinding signal.
The default bindings for this signal are
Space,EnterandReturn.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-
onValueChanged
Emitted when the value field has changed.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-