plugins.adufour.vars.gui.model
Class DoubleRangeModel

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

public class DoubleRangeModel
extends RangeModel<java.lang.Double>


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
DoubleRangeModel(java.lang.Double defaultValue, java.lang.Double min, java.lang.Double max, java.lang.Double step)
           
DoubleRangeModel(java.lang.Double defaultValue, java.lang.Double min, java.lang.Double max, java.lang.Double step, RangeModel.RangeEditorType editorType, java.util.HashMap<java.lang.Double,java.lang.String> labels)
           
 
Method Summary
 int getRangeSize()
           
 java.lang.Double getValueForIndex(int index)
           
 int indexOf(java.lang.Double value)
          Calculates the index of the specified value within the range, according to the current minimum value and step
 boolean isValid(java.lang.Double 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

DoubleRangeModel

public DoubleRangeModel(java.lang.Double defaultValue,
                        java.lang.Double min,
                        java.lang.Double max,
                        java.lang.Double step)

DoubleRangeModel

public DoubleRangeModel(java.lang.Double defaultValue,
                        java.lang.Double min,
                        java.lang.Double max,
                        java.lang.Double step,
                        RangeModel.RangeEditorType editorType,
                        java.util.HashMap<java.lang.Double,java.lang.String> labels)
Method Detail

isValid

public boolean isValid(java.lang.Double value)

getRangeSize

public int getRangeSize()
Specified by:
getRangeSize in class RangeModel<java.lang.Double>
Returns:
the number of values covered by this range, i.e., (max - min) / step

getValueForIndex

public java.lang.Double getValueForIndex(int index)
Specified by:
getValueForIndex in class RangeModel<java.lang.Double>
Returns:
the value corresponding to the specified zero-based index, i.e., min + index * step

indexOf

public int indexOf(java.lang.Double 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.Double>
Returns:
the number of step from the minimum to the specified value