All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.swing.DefaultBoundedRangeModel
java.lang.Object
|
+----java.awt.swing.DefaultBoundedRangeModel
- public class DefaultBoundedRangeModel
- extends Object
- implements BoundedRangeModel, Serializable
changeEvent-
listenerList-
DefaultBoundedRangeModel()
-
addChangeListener(ChangeListener)
- Adds a ChangeListener to the button.
fireStateChanged()
-
getExtent()
-
getMaximum()
-
getMinimum()
-
getValue()
-
getValueIsAdjusting()
-
removeChangeListener(ChangeListener)
- Removes a ChangeListener from the button.
setExtent(int)
- Sets the extent to n.
setMaximum(int)
-
setMinimum(int)
-
setRangeProperties(int, int, int, int, boolean)
- The attribute-changing primitive.
setValue(int)
- Sets the value to n.
setValueIsAdjusting(boolean)
-
toString()
- Returns a string representation of the object.
changeEvent
protected transient ChangeEvent changeEvent
listenerList
protected EventListenerList listenerList
DefaultBoundedRangeModel
public DefaultBoundedRangeModel()
getValue
public int getValue()
getExtent
public int getExtent()
getMinimum
public int getMinimum()
getMaximum
public int getMaximum()
setValue
public void setValue(int n)
- Sets the value to n. Makes sure that
the new value falls within the min/max values.
If n is less than min then value will be set to min.
If n is greater than an max - extent then value will be set to max - extent.
setExtent
public void setExtent(int n)
- Sets the extent to n. Makes sure that
the new extent falls within the min/max values.
If n is less than 0 then extent will be set to 0.
If n + value is greater than an max then extent will be set to max.
setMinimum
public void setMinimum(int n)
setMaximum
public void setMaximum(int n)
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
getValueIsAdjusting
public boolean getValueIsAdjusting()
setRangeProperties
public void setRangeProperties(int newValue,
int newExtent,
int newMin,
int newMax,
boolean adjusting)
- The attribute-changing primitive. This method ensures that the
model is always in a consistent state by enforcing the following
constraints:
minimum <= maximum
minimum <= value
value <= maximum - extent
extent >= 0
If the arguments don't satisfy these constraints, the arguements are
forced to fit the necessary ranges.
Notifies listeners if any attributes are changed.
addChangeListener
public void addChangeListener(ChangeListener l)
- Adds a ChangeListener to the button.
removeChangeListener
public void removeChangeListener(ChangeListener l)
- Removes a ChangeListener from the button.
fireStateChanged
protected void fireStateChanged()
toString
public String toString()
- Returns a string representation of the object.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature