uchicago.src.reflector
Class RangePropertyDescriptor
java.lang.Object
uchicago.src.reflector.PropertyDescriptor
uchicago.src.reflector.RangePropertyDescriptor
public class RangePropertyDescriptor
- extends PropertyDescriptor
A property descriptor for limiting an integer value to a specified
range. A RangePropertyDescriptor is a descriptor for a parameter /
property whose value can be expressed as falling within a range of
integer values. It is useful when you want to restrict user input
to some value within a range of integers. The range is represented
in the gui by a slider with minimum and maximum values and a text
box into which you can type some specific value. If the value you
enter is greater than the maximum allowable value or less than the
minimum value the actual value will be set to the maximum or
minimum respectively. Similarly, if you enter a non-numerical value
into the text box the value will default to the most recent valid
value. Selecting an integer from within the range either via the
slider or the text box calls the appropriate set method in your
model.
This class's widget is a RangeWidget.
- Version:
- $Revision: 1.4 $ $Date: 2004/11/03 19:51:05 $
|
Constructor Summary |
RangePropertyDescriptor(java.lang.String name,
int min,
int max,
int tickSpacing)
Constructs this RangePropertyDescriptor for the named property
with the specified range and tick spacing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RangePropertyDescriptor
public RangePropertyDescriptor(java.lang.String name,
int min,
int max,
int tickSpacing)
- Constructs this RangePropertyDescriptor for the named property
with the specified range and tick spacing. The tick spacing
parameter determines the display of intermediate values in the
slider. For example, a range of 10 - 100 and a tick spacing of 10
will display ticks on the slider for 20, 30, 40 and so on up to
90. Note that this only determines the display, any integer value
between 10 - 100, in this case, can be selected.
- Parameters:
name - the of the propertymin - the minimum valueqmax - the maximum valuetickSpacing - an int value that determines how often the
ticks are labeled in the slider