public class ObjectRangeModel extends javax.swing.DefaultBoundedRangeModel implements ValuedRangeModel
| Constructor and Description |
|---|
ObjectRangeModel(java.lang.Object[] objects)
Create a new ObjectRangeModel with the given objects.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getHighValue()
Get the value at the high point of the range span.
|
int |
getIndex(java.lang.Object o)
Return the index for a given Object, indicating its order in the range.
|
java.lang.Object |
getLowValue()
Get the value at the low point of the range span.
|
java.lang.Object |
getMaxValue()
Get the maximum value backing the range model.
|
java.lang.Object |
getMinValue()
Get the minimum value backing the range model.
|
java.lang.Object |
getObject(int i)
Return the Object at the given index.
|
void |
setValueRange(java.lang.Object[] objects)
Sets the range model to the given objects.
|
addChangeListener, fireStateChanged, getChangeListeners, getExtent, getListeners, getMaximum, getMinimum, getValue, getValueIsAdjusting, removeChangeListener, setExtent, setMaximum, setMinimum, setRangeProperties, setValue, setValueIsAdjusting, toStringpublic ObjectRangeModel(java.lang.Object[] objects)
objects - the members of this ObjectRangeModel, sorted in ascending
order.public void setValueRange(java.lang.Object[] objects)
objects - the members of this ObjectRangeModel, sorted in ascending
order.public java.lang.Object getObject(int i)
i - the index of the Objectpublic int getIndex(java.lang.Object o)
o - the Object to lookup.public java.lang.Object getMinValue()
ValuedRangeModelgetMinValue in interface ValuedRangeModelValuedRangeModel.getMinValue()public java.lang.Object getMaxValue()
ValuedRangeModelgetMaxValue in interface ValuedRangeModelValuedRangeModel.getMaxValue()public java.lang.Object getLowValue()
ValuedRangeModelgetLowValue in interface ValuedRangeModelValuedRangeModel.getLowValue()public java.lang.Object getHighValue()
ValuedRangeModelgetHighValue in interface ValuedRangeModelValuedRangeModel.getHighValue()