com.threerings.opengl.gui
Class BoundedSnappingRangeModel
java.lang.Object
com.threerings.opengl.gui.BoundedRangeModel
com.threerings.opengl.gui.BoundedSnappingRangeModel
public class BoundedSnappingRangeModel
- extends BoundedRangeModel
Provides a Bounded range model where values snap to a period.
|
Constructor Summary |
BoundedSnappingRangeModel(int min,
int value,
int extent,
int max,
int snap)
Creates a bounded range model with the specified minimum,
current, extent and maximum values, and a snap period. |
|
Method Summary |
int |
getScrollIncrement()
Returns the increment by which this model should be scrolled when the user presses one of
the buttons at the end of the scrollbar. |
void |
setValue(int value)
Configures the value of this model. |
| Methods inherited from class com.threerings.opengl.gui.BoundedRangeModel |
addChangeListener, createWheelListener, getExtent, getMaximum, getMinimum, getRange, getRatio, getValue, removeChangeListener, setExtent, setMaximum, setMinimum, setRange, toString |
BoundedSnappingRangeModel
public BoundedSnappingRangeModel(int min,
int value,
int extent,
int max,
int snap)
- Creates a bounded range model with the specified minimum,
current, extent and maximum values, and a snap period.
setValue
public void setValue(int value)
- Configures the value of this model. The new value will be
adjusted if it does not fall within the range of
min
<= value <= max - extent or if value is not a modulus
of snap.
- Overrides:
setValue in class BoundedRangeModel
getScrollIncrement
public int getScrollIncrement()
- Description copied from class:
BoundedRangeModel
- Returns the increment by which this model should be scrolled when the user presses one of
the buttons at the end of the scrollbar.
- Overrides:
getScrollIncrement in class BoundedRangeModel
Copyright © 2011. All Rights Reserved.