de.pxlab.gui
Class LinearAxisModel
java.lang.Object
de.pxlab.gui.AxisModel
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinearAxisModel
public LinearAxisModel(double mn,
double mx,
double v)
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