|
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
|
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 listener from this RangeModel's list of PropertyChangeListeners. |
void |
setAll(int min,
int ext,
int max)
Sets min, extent, and max all at once. |
void |
setExtent(int extent)
Sets the extent. |
void |
setMaximum(int maximum)
Sets the maximum value of the range. |
void |
setMinimum(int minimum)
Sets the minimum value of the range. |
void |
setValue(int value)
Sets the 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 addprotected void firePropertyChange(String string, int oldValue, int newValue)
public 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
true
if this Rangel Model is enabledpublic void removePropertyChangeListener(PropertyChangeListener listener)
RangeModel
removePropertyChangeListener
in interface RangeModel
listener
- The listener to removepublic 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)
RangeModel
setExtent
in interface RangeModel
extent
- The extentpublic void setMaximum(int maximum)
RangeModel
setMaximum
in interface RangeModel
maximum
- The maximum valuepublic void setMinimum(int minimum)
RangeModel
setMinimum
in interface RangeModel
minimum
- The minimum valuepublic void setValue(int value)
RangeModel
setValue
in interface RangeModel
value
- The current value
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |