|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected PropertyChangeSupport propertyListeners
Constructor Detail |
public DefaultRangeModel()
Method Detail |
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface RangeModel
listener
- the listener to be addedprotected void firePropertyChange(String string, int oldValue, int newValue)
string
- the property nameoldValue
- the old valuenewValue
- the new valuepublic int getExtent()
RangeModel
getExtent
in interface RangeModel
public int getMaximum()
RangeModel
getMaximum
in interface RangeModel
public int getMinimum()
RangeModel
getMinimum
in interface RangeModel
public int getValue()
RangeModel
getValue
in interface RangeModel
public boolean isEnabled()
RangeModel
true
if this RangeModel is enabled.
isEnabled
in interface RangeModel
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface RangeModel
listener
- the listener to be removedpublic void setAll(int min, int ext, int max)
RangeModel
setAll
in interface RangeModel
min
- the new mininumext
- the new extentmax
- the new maximumRangeModel.setAll(int, int, int)
public void setExtent(int extent)
setExtent
in interface RangeModel
extent
- the new extent valuepublic void setMaximum(int maximum)
setMaximum
in interface RangeModel
maximum
- the new maximum valuepublic void setMinimum(int minimum)
setMinimum
in interface RangeModel
minimum
- the new minumum valuepublic void setValue(int value)
setValue
in interface RangeModel
value
- the new value
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |