Class ScaleButton.Builder<B extends ScaleButton.Builder<B>>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
,Accessible.Builder<B>
,Orientable.Builder<B>
- Direct Known Subclasses:
VolumeButton.Builder
- Enclosing class:
ScaleButton
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theScaleButton
object.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) TheGtkAdjustment
that 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, 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 io.github.jwharm.javagi.gobject.BuilderInterface
addBuilderProperty, connect, connect, getArena
Methods inherited from interface org.gnome.gtk.Orientable.Builder
setOrientation
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theScaleButton
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 toScaleButton
.- Overrides:
build
in classWidget.Builder<B extends ScaleButton.Builder<B>>
- Returns:
- a new instance of
ScaleButton
with the properties that were set in the Builder object.
-
setAdjustment
TheGtkAdjustment
that is used as the model.- Parameters:
adjustment
- the value for theadjustment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setHasFrame
If the scale button has a frame.- Parameters:
hasFrame
- the value for thehas-frame
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
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
icons
array, it will be used for all the values. If only two icon names are in theicons
array, 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
GtkScaleButton
reflects the current value of the scale better for the users.- Parameters:
icons
- the value for theicons
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setValue
The value of the scale.- Parameters:
value
- the value for thevalue
property- Returns:
- the
Builder
instance 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
Builder
instance 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
,Enter
andReturn
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onValueChanged
Emitted when the value field has changed.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-