de.pxlab.gui
Class LinearAxisModel

java.lang.Object
  extended by de.pxlab.gui.AxisModel
      extended by de.pxlab.gui.LinearAxisModel

public class LinearAxisModel
extends AxisModel

This is a model for a linear axis.

Version:
0.2.0, 03/08/00
Author:
H. Irtel
See Also:
AxisListener, Slider

Field Summary
 
Fields inherited from class de.pxlab.gui.AxisModel
axisListener, maximum, minimum, value
 
Constructor Summary
LinearAxisModel(double mn, double mx, double v)
           
 
Method Summary
protected  double getMappedValue(double x)
          Map a scale value to the range [0.0, 1.0]
protected  double getStepSizeValue(int n)
          Return the size of a single step when the range [min, max] is divided by n steps.
protected  double getValueForSteps(int n, double step)
          Get the position on the scale where we arrive when moving from position start by n steps of size step.
protected  double getValueFromMap(double v)
          Get a scale value from a value in the range [0.0, 1.0]
 
Methods inherited from class de.pxlab.gui.AxisModel
getMaximum, getMinimum, getValue, removeAxisListener, setAxisListener, setMaximum, setMinimum, setValue, setValueFromMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearAxisModel

public LinearAxisModel(double mn,
                       double mx,
                       double v)
Method Detail

getMappedValue

protected double getMappedValue(double x)
Map a scale value to the range [0.0, 1.0]

Specified by:
getMappedValue in class AxisModel

getValueFromMap

protected double getValueFromMap(double v)
Get a scale value from a value in the range [0.0, 1.0]

Specified by:
getValueFromMap in class AxisModel

getStepSizeValue

protected double getStepSizeValue(int n)
Return the size of a single step when the range [min, max] is divided by n steps.

Specified by:
getStepSizeValue in class AxisModel

getValueForSteps

protected double getValueForSteps(int n,
                                  double step)
Get the position on the scale where we arrive when moving from position start by n steps of size step.

Specified by:
getValueForSteps in class AxisModel