This is the base class for the group of widgets that involve graphic display
and manipulation of a vale bounded within a specific minumum and maximum
value.
addListener
public void addListener(RangeListener listener)
Register an object to handle range events.
addRangeListener
public void addRangeListener(RangeListener listener)
Register an object to handle range events.
getAdjustment
public Adjustment getAdjustment()
Get the
Adjustment
which is the "model" object for Range.
getInverted
public boolean getInverted()
- True of the slider is inverted
getType
public static Type getType()
Retrieve the runtime type used by the GLib library.
- getType in interface Widget
getUpdatePolicy
public UpdateType getUpdatePolicy()
Gets the update policy
- The current update policy
getValue
public double getValue()
Gets the current value of the range.
- Current value of the range.
removeRangeListener
public void removeRangeListener(RangeListener listener)
Removes a listener
setAdjustment
public void setAdjustment(Adjustment adjustment)
Sets the adjustment to be used as the "model" object for this range
widget. The adjustment indicates the current range value, the minimum and
maximum range values, the step/page increments used for keybindings and
scrolling, and the page size. The page size is normally 0 for
Scale
and nonzero for
ScrollBar
, and indicates the size
of the visible area of the widget being scrolled. The page size affects
the size of the scrollbar slider.
adjustment
- The model to use
setIncrements
public void setIncrements(double step,
double page)
Sets the step and page sizes for the range. The step size is used when
the user clicks the
ScrollBar
arrows or moves
Scale
via
arrow keys. The page size is used for example when moving via Page Up or
Page Down keys.
step
- Step sizepage
- Page size
setInverted
public void setInverted(boolean setting)
Ranges normally move from lower to higher values as the slider moves from
top to bottom or left to right. Inverted ranges have higher values at the
top or on the right rather than on the bottom or left.
setting
- TRUE to invert the range
setRange
public void setRange(double min,
double max)
Sets the allowable values in the Range, and clamps the range value to be
between min and max. (If the range has a non-zero page size, it is
clamped between min and max - page-size.)
min
- Minimum range valuemax
- Maximum range value
setUpdatePolicy
public void setUpdatePolicy(UpdateType policy)
Sets the update policy for the Adjustment
setValue
public void setValue(double value)
Sets the current value of the range; if the value is outside the minimum
or maximum range values, it will be clamped to fit inside them. An event
is called if the value changes.
value
- The new value of the range