javax.swing
public interface BoundedRangeModel
value
to value + extent
, where both value
and
extent
are integers, and extent >= 0
. The bounds
are defined by integers minimum
and maximum
.
This type of model is used in components that display a range of values, like {@link JProgressBar} and {@link JSlider}.
Method Summary | |
---|---|
void | addChangeListener(ChangeListener listener)
Adds a ChangeListener to this object.
|
int | getExtent()
Returns the current extent.
|
int | getMaximum()
Returns the upper bound for the model. |
int | getMinimum()
Returns the lower bound for the model. |
int | getValue()
Returns the current value for the model.
|
boolean | getValueIsAdjusting()
Returns the value of the valueIsAdjusting property.
|
void | removeChangeListener(ChangeListener listener)
Removes a ChangeListener from this object.
|
void | setExtent(int extent)
Sets the extent, which is the length of the model's range, and sends a
{@link ChangeEvent} to all registered listeners.
|
void | setMaximum(int maximum)
Sets the upper bound for the model and sends a {@link ChangeEvent} to all
registered listeners. |
void | setMinimum(int minimum)
Sets the lower bound for the model and sends a {@link ChangeEvent} to all
registered listeners. |
void | setRangeProperties(int value, int extent, int minimum, int maximum, boolean adjusting)
Sets all the properties for the model in a single call.
|
void | setValue(int value)
Sets the value for the model and sends a {@link ChangeEvent} to
all registered listeners. |
void | setValueIsAdjusting(boolean adjusting)
Sets the valueIsAdjusting property.
|
ChangeListener
to this object.
Parameters: listener the listener to add
See Also: removeChangeListener
Returns: the extent
See Also: BoundedRangeModel
Returns: The upper bound for the model.
See Also: BoundedRangeModel getMinimum
Returns: The lower bound for the model.
See Also: BoundedRangeModel getMaximum
Returns: The current value for the model.
See Also: BoundedRangeModel
valueIsAdjusting
property.
Returns: true
if value is adjusting,
otherwise false
See Also: BoundedRangeModel
ChangeListener
from this object.
Parameters: listener the listener to remove
See Also: addChangeListener
Parameters: extent the extent
See Also: getExtent
Parameters: maximum the maximum value
See Also: getMaximum
Parameters: minimum the minimum value
See Also: getMinimum
Parameters: value the value extent the extent minimum the minimum value maximum the maximum value adjusting a flag that indicates the model is being adjusted continuously.
min <= value <= value + extent <= max
.
Parameters: value the value
See Also: getValue
valueIsAdjusting
property.
Parameters: adjusting true
if adjusting,
false
otherwise
See Also: getValueIsAdjusting