plugins.adufour.vars.gui.model
Class FloatRangeModel
java.lang.Object
plugins.adufour.vars.gui.model.RangeModel<java.lang.Float>
plugins.adufour.vars.gui.model.FloatRangeModel
- All Implemented Interfaces:
- VarEditorModel<java.lang.Float>
public class FloatRangeModel
- extends RangeModel<java.lang.Float>
Method Summary |
int |
getRangeSize()
|
java.lang.Float |
getValueForIndex(int index)
|
int |
indexOf(java.lang.Float value)
Calculates the index of the specified value within the range, according to the current
minimum value and step |
boolean |
isValid(java.lang.Float value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FloatRangeModel
public FloatRangeModel(java.lang.Float defaultValue,
java.lang.Float min,
java.lang.Float max,
java.lang.Float step)
FloatRangeModel
public FloatRangeModel(java.lang.Float defaultValue,
java.lang.Float min,
java.lang.Float max,
java.lang.Float step,
RangeModel.RangeEditorType editorType)
isValid
public boolean isValid(java.lang.Float value)
getRangeSize
public int getRangeSize()
- Specified by:
getRangeSize
in class RangeModel<java.lang.Float>
- Returns:
- the number of values covered by this range, i.e.,
(max - min) / step
getValueForIndex
public java.lang.Float getValueForIndex(int index)
- Specified by:
getValueForIndex
in class RangeModel<java.lang.Float>
- Returns:
- the value corresponding to the specified zero-based index, i.e.,
min + index * step
indexOf
public int indexOf(java.lang.Float value)
- Description copied from class:
RangeModel
- Calculates the index of the specified value within the range, according to the current
minimum value and step
- Specified by:
indexOf
in class RangeModel<java.lang.Float>
- Returns:
- the number of step from the minimum to the specified value