Package org.gnome.gtk
Class Range.Builder<B extends Range.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.Range.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:
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Finish building theRangeobject.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, 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 theRangeobject. 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:
buildin classWidget.Builder<B extends Range.Builder<B>>- Returns:
- a new instance of
Rangewith the properties that were set in the Builder object.
-
setAdjustment
The adjustment that is controlled by the range.- Parameters:
adjustment- the value for theadjustmentproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setFillLevel
The fill level (e.g. prebuffering of a network stream).- Parameters:
fillLevel- the value for thefill-levelproperty- Returns:
- the
Builderinstance is returned, to allow method chaining
-
setInverted
Iftrue, the direction in which the slider moves is inverted.- Parameters:
inverted- the value for theinvertedproperty- Returns:
- the
Builderinstance 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-levelproperty- Returns:
- the
Builderinstance 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-digitsproperty- Returns:
- the
Builderinstance 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-levelproperty- Returns:
- the
Builderinstance 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
Builderinstance 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
trueto 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
Builderinstance 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
Builderinstance is returned, to allow method chaining - See Also:
-
onValueChanged
Emitted when the range value changes.- Parameters:
handler- the signal handler- Returns:
- the
Builderinstance is returned, to allow method chaining - See Also:
-