com.jmex.bui
Class BoundedSnappingRangeModel
java.lang.Object
com.jmex.bui.BoundedRangeModel
com.jmex.bui.BoundedSnappingRangeModel
public class BoundedSnappingRangeModel
- extends BoundedRangeModel
Provides a Bounded range model where values snap to a period.
|
Field Summary |
protected int |
_snap
|
|
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.jmex.bui.BoundedRangeModel |
addChangeListener, createWheelListener, getExtent, getMaximum, getMinimum, getRange, getRatio, getValue, removeChangeListener, setExtent, setMaximum, setMinimum, setRange |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_snap
protected int _snap
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 © 2008 Michael Bayne.
All Rights Reserved.