plugins.adufour.vars.gui.model
Class DoubleRangeModel
java.lang.Object
  
plugins.adufour.vars.gui.model.RangeModel<java.lang.Double>
      
plugins.adufour.vars.gui.model.DoubleRangeModel
- All Implemented Interfaces: 
 - VarEditorModel<java.lang.Double>
 
public class DoubleRangeModel
- extends RangeModel<java.lang.Double>
 
 
 
 
 
| 
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 java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
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)
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