plugins.big.bigsnakeutils.icy.gui.pair
Class PairRangeModel

java.lang.Object
  extended by plugins.big.bigsnakeutils.icy.gui.pair.PairRangeModel
All Implemented Interfaces:
plugins.adufour.vars.gui.model.VarEditorModel<Pair>
Direct Known Subclasses:
RangeRangeModel

public class PairRangeModel
extends java.lang.Object
implements plugins.adufour.vars.gui.model.VarEditorModel<Pair>

VarEditorModel of Pair objects. The two values of the pair are simply bounds.

Version:
May 3, 2014
Author:
Julien Jacquemot

Constructor Summary
PairRangeModel(Pair defaultValue, double min, double max, Pair steps)
          Default constructor
 
Method Summary
 Pair getDefaultValue()
           
 double getFirstMaximum()
          Returns the maximum for the first value of the pair.
 double getFirstMinimum()
          Returns the minimum for the first value of the pair.
 double getFirstStepSize()
          Returns the step size for the first value of the pair.
 double getSecondMaximum()
          Returns the maximum for the second value of the pair.
 double getSecondMinimum()
          Returns the minimum for the second value of the pair.
 double getSecondStepSize()
          Returns the step size for the second value of the pair.
 boolean isValid(Pair value)
           
 void setBounds(double min, double max)
          Set the bounds for both values of the pair.
 void setFirstBounds(double min, double max)
          Set the bounds for the first value of the pair.
 void setFirstMaximum(double max)
          Set the maximum for the first value of the pair.
 void setFirstMinimum(double min)
          Set the minimum for the first value of the pair.
 void setFirstStepSize(double step)
          Set the step size for the first value of the pair.
 void setMaximum(double max)
          Set the maximum for both values of the pair.
 void setMinimum(double min)
          Set the minimum for both values of the pair.
 void setSecondBounds(double min, double max)
          Set the bounds for the second value of the pair.
 void setSecondMaximum(double max)
          Set the maximum for the second value of the pair.
 void setSecondMinimum(double min)
          Set the minimum for the second value of the pair.
 void setSecondStepSize(double step)
          Set the step size for the second value of the pair.
 void setStepSize(double step)
          Set the step size for the both values of the pair.
 void updateBounds(Pair value)
          Update the bounds accordingly to the given value if needed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PairRangeModel

public PairRangeModel(Pair defaultValue,
                      double min,
                      double max,
                      Pair steps)
Default constructor

Method Detail

getDefaultValue

public Pair getDefaultValue()
Specified by:
getDefaultValue in interface plugins.adufour.vars.gui.model.VarEditorModel<Pair>

getFirstMinimum

public double getFirstMinimum()
Returns the minimum for the first value of the pair.


getFirstMaximum

public double getFirstMaximum()
Returns the maximum for the first value of the pair.


getSecondMinimum

public double getSecondMinimum()
Returns the minimum for the second value of the pair.


getSecondMaximum

public double getSecondMaximum()
Returns the maximum for the second value of the pair.


setFirstMinimum

public void setFirstMinimum(double min)
Set the minimum for the first value of the pair.


setFirstMaximum

public void setFirstMaximum(double max)
Set the maximum for the first value of the pair.


setFirstBounds

public void setFirstBounds(double min,
                           double max)
Set the bounds for the first value of the pair.


setSecondMinimum

public void setSecondMinimum(double min)
Set the minimum for the second value of the pair.


setSecondMaximum

public void setSecondMaximum(double max)
Set the maximum for the second value of the pair.


setSecondBounds

public void setSecondBounds(double min,
                            double max)
Set the bounds for the second value of the pair.


setMinimum

public void setMinimum(double min)
Set the minimum for both values of the pair.


setMaximum

public void setMaximum(double max)
Set the maximum for both values of the pair.


setBounds

public void setBounds(double min,
                      double max)
Set the bounds for both values of the pair.


setFirstStepSize

public void setFirstStepSize(double step)
Set the step size for the first value of the pair.


getFirstStepSize

public double getFirstStepSize()
Returns the step size for the first value of the pair.


setSecondStepSize

public void setSecondStepSize(double step)
Set the step size for the second value of the pair.


getSecondStepSize

public double getSecondStepSize()
Returns the step size for the second value of the pair.


setStepSize

public void setStepSize(double step)
Set the step size for the both values of the pair.


updateBounds

public void updateBounds(Pair value)
Update the bounds accordingly to the given value if needed. By default this function does nothing.


isValid

public boolean isValid(Pair value)
Specified by:
isValid in interface plugins.adufour.vars.gui.model.VarEditorModel<Pair>