plugins.adufour.vars.gui.model
Class FloatRangeModel

java.lang.Object
  extended by plugins.adufour.vars.gui.model.RangeModel<java.lang.Float>
      extended by plugins.adufour.vars.gui.model.FloatRangeModel
All Implemented Interfaces:
VarEditorModel<java.lang.Float>

public class FloatRangeModel
extends RangeModel<java.lang.Float>


Nested Class Summary
 
Nested classes/interfaces inherited from class plugins.adufour.vars.gui.model.RangeModel
RangeModel.RangeEditorType
 
Field Summary
 
Fields inherited from class plugins.adufour.vars.gui.model.RangeModel
defaultValue, labels, max, min, step
 
Constructor Summary
FloatRangeModel(java.lang.Float defaultValue, java.lang.Float min, java.lang.Float max, java.lang.Float step)
           
FloatRangeModel(java.lang.Float defaultValue, java.lang.Float min, java.lang.Float max, java.lang.Float step, RangeModel.RangeEditorType editorType)
           
 
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 plugins.adufour.vars.gui.model.RangeModel
getDefaultValue, getEditorType, getLabels, getMaximum, getMinimum, getStepSize, setEditorType, setMaximum, setMinimum, setStepSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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