|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.DefaultRangeModel
Generic implementation for a RangeModel.
|<----extent--->|
----|-----------|---------------|---------------|----
min | max
value
| Field Summary | |
protected PropertyChangeSupport |
propertyListeners
Listeners interested in the range model's property changes. |
| Fields inherited from interface org.eclipse.draw2d.RangeModel |
PROPERTY_EXTENT, PROPERTY_MAXIMUM, PROPERTY_MINIMUM, PROPERTY_VALUE |
| Constructor Summary | |
DefaultRangeModel()
|
|
| Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Registers the given listener as a PropertyChangeListener. |
protected void |
firePropertyChange(String string,
int oldValue,
int newValue)
Notifies any listening PropertyChangeListeners that the property with the given id has changed. |
int |
getExtent()
Returns the extent. |
int |
getMaximum()
Returns the maximum value in the range. |
int |
getMinimum()
Returns the minimum value in the range. |
int |
getValue()
Returns the current value. |
boolean |
isEnabled()
Returns true if this RangeModel is enabled. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the given PropertyChangeListener from the list of listeners. |
void |
setAll(int min,
int ext,
int max)
Sets min, extent, and max all at once. |
void |
setExtent(int extent)
Sets this RangeModel's extent and fires a property change if the given value is different from the current extent. |
void |
setMaximum(int maximum)
Sets this RangeModel's maximum value and fires a property change if the given value is different from the current maximum value. |
void |
setMinimum(int minimum)
Sets this RangeModel's minimum value and fires a property change if the given value is different from the current minimum value. |
void |
setValue(int value)
Sets this RangeModel's current value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected PropertyChangeSupport propertyListeners
| Constructor Detail |
public DefaultRangeModel()
| Method Detail |
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface RangeModellistener - the listener to be added
protected void firePropertyChange(String string,
int oldValue,
int newValue)
string - the property nameoldValue - the old valuenewValue - the new valuepublic int getExtent()
RangeModel
getExtent in interface RangeModelpublic int getMaximum()
RangeModel
getMaximum in interface RangeModelpublic int getMinimum()
RangeModel
getMinimum in interface RangeModelpublic int getValue()
RangeModel
getValue in interface RangeModelpublic boolean isEnabled()
RangeModeltrue if this RangeModel is enabled.
isEnabled in interface RangeModelpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface RangeModellistener - the listener to be removed
public void setAll(int min,
int ext,
int max)
RangeModel
setAll in interface RangeModelmin - the new mininumext - the new extentmax - the new maximumRangeModel.setAll(int, int, int)public void setExtent(int extent)
setExtent in interface RangeModelextent - the new extent valuepublic void setMaximum(int maximum)
setMaximum in interface RangeModelmaximum - the new maximum valuepublic void setMinimum(int minimum)
setMinimum in interface RangeModelminimum - the new minumum valuepublic void setValue(int value)
setValue in interface RangeModelvalue - the new valuepublic String toString()
Object.toString()
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||