Package org.eclipse.draw2d
Interface RangeModel
- All Known Implementing Classes:
- DefaultRangeModel
public interface RangeModel
This interface represents a range of possible values as well as the current
 values. There is a minumum and maximum value, a current value, and the
 extent. One use for a RangeModel is a scrollbar. There is a minimum value
 (the top of the scrollbar), a maximum value (the bottom of the scrollbar), a
 current value (the top of the thumb), and an extent (the length of the
 thumb).
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidRegisters listener as a PropertyChangeListener of this RangeModel.intReturns the extent.intReturns the maximum value in the range.intReturns the minimum value in the range.intgetValue()Returns the current value.booleanReturnstrueif this RangeModel is enabled.voidRemoves the given listener from this RangeModel's list of PropertyChangeListeners.voidsetAll(int min, int extent, int max) Sets min, extent, and max all at once.voidsetExtent(int extent) Sets the extent.voidsetMaximum(int max) Sets the maximum value of the range.voidsetMinimum(int min) Sets the minimum value of the range.voidsetValue(int value) Sets the current value.
- 
Field Details- 
PROPERTY_VALUEValue property name- See Also:
 
- 
PROPERTY_EXTENTExtent property name- See Also:
 
- 
PROPERTY_MINIMUMMinimum property name- See Also:
 
- 
PROPERTY_MAXIMUMMaximum property name- See Also:
 
 
- 
- 
Method Details- 
addPropertyChangeListenerRegisters listener as a PropertyChangeListener of this RangeModel. Listeners will be notified of changes tovalue,extent,minimumandmaximumproperties.- Parameters:
- listener- The listener to add
 
- 
getExtentint getExtent()Returns the extent.- Returns:
- The extent
 
- 
getMaximumint getMaximum()Returns the maximum value in the range.- Returns:
- The maximum value
 
- 
getMinimumint getMinimum()Returns the minimum value in the range.- Returns:
- The minimum value
 
- 
getValueint getValue()Returns the current value.- Returns:
- The current value
 
- 
isEnabledboolean isEnabled()Returnstrueif this RangeModel is enabled.- Returns:
- trueif this Rangel Model is enabled
 
- 
removePropertyChangeListenerRemoves the given listener from this RangeModel's list of PropertyChangeListeners.- Parameters:
- listener- The listener to remove
 
- 
setAllvoid setAll(int min, int extent, int max) Sets min, extent, and max all at once.- Parameters:
- min- the new mininum
- extent- the new extent
- max- the new maximum
 
- 
setExtentvoid setExtent(int extent) Sets the extent.- Parameters:
- extent- The extent
 
- 
setMaximumvoid setMaximum(int max) Sets the maximum value of the range.- Parameters:
- max- The maximum value
 
- 
setMinimumvoid setMinimum(int min) Sets the minimum value of the range.- Parameters:
- min- The minimum value
 
- 
setValuevoid setValue(int value) Sets the current value.- Parameters:
- value- The current value
 
 
-