|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopoint.progressbar.DefaultBoundedRangeModel
public class DefaultBoundedRangeModel
A generic implementation of BoundedRangeModel.
| Field Summary | |
|---|---|
protected ChangeEvent |
changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. |
protected EventListenerList |
listenerList
The listeners waiting for model changes. |
| Constructor Summary | |
|---|---|
DefaultBoundedRangeModel()
Initializes all of the properties with default values. |
|
DefaultBoundedRangeModel(int value,
int extent,
int min,
int max)
Initializes value, extent, minimum and maximum. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the button. |
void |
fireStateChanged()
Notifies all listeners that have registered for this event type. |
int |
getExtent()
Return the model's extent. |
int |
getMaximum()
Return the model's maximum. |
int |
getMinimum()
Return the model's minimum. |
int |
getValue()
Return the model's current value. |
boolean |
getValueIsAdjusting()
Returns true if the value is in the process of changing as a result of actions being taken by the user. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the button. |
void |
setExtent(int n)
Sets the extent to n after ensuring that n is greater than or equal to zero and falls within the model's constraints: minimum <= value <= value+extent <= maximum |
void |
setMaximum(int n)
Sets the maximum to n after ensuring that n that the other three properties obey the model's constraints: minimum <= value <= value+extent <= maximum |
void |
setMinimum(int n)
Sets the minimum to n after ensuring that n that the other three properties obey the model's constraints: minimum <= value <= value+extent <= maximum |
void |
setRangeProperties(int newValue,
int newExtent,
int newMin,
int newMax,
boolean adjusting)
Sets all of the BoundedRangeModel properties after forcing the arguments to obey the usual constraints: minimum <= value <= value+extent <= maximum At most, one ChangeEvent is generated. |
void |
setValue(int n)
Sets the current value of the model. |
void |
setValueIsAdjusting(boolean b)
Sets the valueIsAdjusting property. |
java.lang.String |
toString()
Returns a string that displays all of the BoundedRangeModel properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient ChangeEvent changeEvent
protected EventListenerList listenerList
| Constructor Detail |
|---|
public DefaultBoundedRangeModel()
value = 0
extent = 0
minimum = 0
maximum = 100
adjusting = false
public DefaultBoundedRangeModel(int value,
int extent,
int min,
int max)
min <= value <= value+extent <= max
| Method Detail |
|---|
public void addChangeListener(ChangeListener l)
ChangeListener to the button.
addChangeListener in interface BoundedRangeModell - The ChangeListener to be added.public void fireStateChanged()
public int getExtent()
getExtent in interface BoundedRangeModelpublic int getMaximum()
getMaximum in interface BoundedRangeModelpublic int getMinimum()
getMinimum in interface BoundedRangeModelpublic int getValue()
getValue in interface BoundedRangeModelpublic boolean getValueIsAdjusting()
getValueIsAdjusting in interface BoundedRangeModelpublic void removeChangeListener(ChangeListener l)
ChangeListener from the button.
removeChangeListener in interface BoundedRangeModell - The ChangeListener to be removed.public void setExtent(int n)
minimum <= value <= value+extent <= maximum
setExtent in interface BoundedRangeModelpublic void setMaximum(int n)
minimum <= value <= value+extent <= maximum
setMaximum in interface BoundedRangeModelpublic void setMinimum(int n)
minimum <= value <= value+extent <= maximum
setMinimum in interface BoundedRangeModel
public void setRangeProperties(int newValue,
int newExtent,
int newMin,
int newMax,
boolean adjusting)
minimum <= value <= value+extent <= maximum
At most, one ChangeEvent is generated.
setRangeProperties in interface BoundedRangeModelpublic void setValue(int n)
minimum <= value <= value+extent <= maximum
setValue in interface BoundedRangeModelpublic void setValueIsAdjusting(boolean b)
setValueIsAdjusting in interface BoundedRangeModelb - true if the upcoming changes to the value property are part of a seriespublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||