All Packages Class Hierarchy This Package Previous Next Index
Interface java.awt.swing.BoundedRangeModel
- public interface BoundedRangeModel
addChangeListener(ChangeListener)
- Adds x as a listener to changes in the model.
getExtent()
- Returns the model's extent, the length of the inner range that
begins at the model's value.
getMaximum()
-
getMinimum()
-
getValue()
- Returns the model's value.
getValueIsAdjusting()
- Returns the state of model.
removeChangeListener(ChangeListener)
- Removes x as a listener to changes in the model.
setExtent(int)
- Sets the model's extent to x.
setMaximum(int)
- Sets the model's maximum to x.
setMinimum(int)
- Sets the model's minimum to x.
setRangeProperties(int, int, int, int, boolean)
- This method sets all of the model's data with a single method call.
setValue(int)
- Sets the model's value to x.
setValueIsAdjusting(boolean)
- This attribute indicates that any upcoming changes to the value
of the model should be considered a single event.
getMinimum
public abstract int getMinimum()
- Returns:
- the model's minimum
- See Also:
- setMinimum
setMinimum
public abstract void setMinimum(int x)
- Sets the model's minimum to x. If any of the current maximum,
value, or extent are outside of the new minimum, they are adjusted.
Notifies any listeners if the model changes.
- Parameters:
- x - the model's new minimum
- See Also:
- getMinimum, addChangeListener
getMaximum
public abstract int getMaximum()
- Returns:
- the model's maximum
- See Also:
- setMaximum
setMaximum
public abstract void setMaximum(int x)
- Sets the model's maximum to x. If any of the current minimum,
value, or extent are outside of the new maximum, they are adjusted.
Notifies any listeners if the model changes.
- Parameters:
- x - the model's new maximum
- See Also:
- getMaximum, addChangeListener
getValue
public abstract int getValue()
- Returns the model's value. The value is always between the model's
minimum and maximum, inclusive.
- Returns:
- the model's value
- See Also:
- setValue
setValue
public abstract void setValue(int x)
- Sets the model's value to x. If x is less than the
minimum or greater than the maximum, or if it causes the extent to
extend beyond the maximum, this method throws
IllegalArgumentException and the value is not changed.
Notifies any listeners if the model changes.
- Parameters:
- x - the model's new value
- Throws:
IllegalArgumentException
- if x is outside
the legal range
- See Also:
- getValue
setValueIsAdjusting
public abstract void setValueIsAdjusting(boolean b)
- This attribute indicates that any upcoming changes to the value
of the model should be considered a single event. This attribute
will be set to true at the start of a range of changes to the value,
and will be set to false when the value has completed changing. Normally
this allows a listener to only take action when the final value change in
committed, instead of having to do updates for all intermediate values.
- Parameters:
- b - the model's new state
- See Also:
- getValueIsAdjusting
getValueIsAdjusting
public abstract boolean getValueIsAdjusting()
- Returns the state of model. If true, the value of the model is currently
in flux and further changes are expected. If false, the value of the model
is most likely in a final state.
getExtent
public abstract int getExtent()
- Returns the model's extent, the length of the inner range that
begins at the model's value. The value plus the extent must always
be between the model's minimum and maximum, inclusive.
- Returns:
- the model's extent
- See Also:
- setExtent, getValue
setExtent
public abstract void setExtent(int x)
- Sets the model's extent to x. If x is less than zero, or
if the value plus x is greater than the maximum, this method
throws IllegalArgumentException and the extent is not
changed.
Notifies any listeners if the model changes.
- Parameters:
- x - the model's new extent
- Throws:
IllegalArgumentException
- if x is negative
or causes the inner range to
extend beyond the maximum
- See Also:
- getExtent, getValue
setRangeProperties
public abstract void setRangeProperties(int newValue,
int newExtent,
int newMin,
int newMax,
boolean isAdjusting)
- This method sets all of the model's data with a single method call.
The method results in a single change event being generated. This is
convient when you need to ajust all the model data simulaneously and
do not want individual change events to occur.
addChangeListener
public abstract void addChangeListener(ChangeListener x)
- Adds x as a listener to changes in the model.
removeChangeListener
public abstract void removeChangeListener(ChangeListener x)
- Removes x as a listener to changes in the model.
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature