Package org.gnome.gtk
Class Range.Builder<B extends Range.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.Range.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:
Scale.Builder
- Enclosing class:
Range
public static class Range.Builder<B extends Range.Builder<B>>
extends Widget.Builder<B>
implements Accessible.Builder<B>, Orientable.Builder<B>
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theRange
object.onAdjustBounds
(Range.AdjustBoundsCallback handler) Emitted before clamping a value, to give the application a chance to adjust the bounds.onChangeValue
(Range.ChangeValueCallback handler) Emitted when a scroll action is performed on a range.onMoveSlider
(Range.MoveSliderCallback handler) Virtual function that moves the slider.onValueChanged
(Range.ValueChangedCallback handler) Emitted when the range value changes.setAdjustment
(Adjustment adjustment) The adjustment that is controlled by the range.setFillLevel
(double fillLevel) The fill level (e.g.setInverted
(boolean inverted) Iftrue
, the direction in which the slider moves is inverted.setRestrictToFillLevel
(boolean restrictToFillLevel) Controls whether slider movement is restricted to an upper boundary set by the fill level.setRoundDigits
(int roundDigits) The number of digits to round the value to when it changes.setShowFillLevel
(boolean showFillLevel) Controls whether fill level indicator graphics are displayed on the trough.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 theRange
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 toRange
.- Overrides:
build
in classWidget.Builder<B extends Range.Builder<B>>
- Returns:
- a new instance of
Range
with the properties that were set in the Builder object.
-
setAdjustment
The adjustment that is controlled by the range.- Parameters:
adjustment
- the value for theadjustment
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFillLevel
The fill level (e.g. prebuffering of a network stream).- Parameters:
fillLevel
- the value for thefill-level
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setInverted
Iftrue
, the direction in which the slider moves is inverted.- Parameters:
inverted
- the value for theinverted
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRestrictToFillLevel
Controls whether slider movement is restricted to an upper boundary set by the fill level.- Parameters:
restrictToFillLevel
- the value for therestrict-to-fill-level
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setRoundDigits
The number of digits to round the value to when it changes.See
Gtk.Range::change-value
.- Parameters:
roundDigits
- the value for theround-digits
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setShowFillLevel
Controls whether fill level indicator graphics are displayed on the trough.- Parameters:
showFillLevel
- the value for theshow-fill-level
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
onAdjustBounds
Emitted before clamping a value, to give the application a chance to adjust the bounds.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onChangeValue
Emitted when a scroll action is performed on a range.It allows an application to determine the type of scroll event that occurred and the resultant new value. The application can handle the event itself and return
true
to prevent further processing. Or, by returningfalse
, it can pass the event to other handlers until the default GTK handler is reached.The value parameter is unrounded. An application that overrides the ::change-value signal is responsible for clamping the value to the desired number of decimal digits; the default GTK handler clamps the value based on
Gtk.Range:round-digits
.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onMoveSlider
Virtual function that moves the slider.Used for keybindings.
- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-
onValueChanged
Emitted when the range value changes.- Parameters:
handler
- the signal handler- Returns:
- the
Builder
instance is returned, to allow method chaining - See Also:
-