|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object echopoint.progressbar.DefaultBoundedRangeModel
A generic implementation of BoundedRangeModel.
Field Summary | |
protected nextapp.echo.event.ChangeEvent |
changeEvent
Only one ChangeEvent is needed per model instance since the event's only (read-only) state is the source property. |
protected nextapp.echo.event.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(nextapp.echo.event.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(nextapp.echo.event.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 nextapp.echo.event.ChangeEvent changeEvent
protected nextapp.echo.event.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(nextapp.echo.event.ChangeListener l)
ChangeListener
to the button.
addChangeListener
in interface BoundedRangeModel
l
- The ChangeListener
to be added.public void fireStateChanged()
public int getExtent()
getExtent
in interface BoundedRangeModel
public int getMaximum()
getMaximum
in interface BoundedRangeModel
public int getMinimum()
getMinimum
in interface BoundedRangeModel
public int getValue()
getValue
in interface BoundedRangeModel
public boolean getValueIsAdjusting()
getValueIsAdjusting
in interface BoundedRangeModel
public void removeChangeListener(nextapp.echo.event.ChangeListener l)
ChangeListener
from the button.
removeChangeListener
in interface BoundedRangeModel
l
- The ChangeListener
to be removed.public void setExtent(int n)
minimum <= value <= value+extent <= maximum
setExtent
in interface BoundedRangeModel
public void setMaximum(int n)
minimum <= value <= value+extent <= maximum
setMaximum
in interface BoundedRangeModel
public 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 BoundedRangeModel
public void setValue(int n)
minimum <= value <= value+extent <= maximum
setValue
in interface BoundedRangeModel
public void setValueIsAdjusting(boolean b)
setValueIsAdjusting
in interface BoundedRangeModel
b
- true if the upcoming changes to the value property are part of a seriespublic java.lang.String toString()
|
EchoPoint 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |