public class Axis extends Object implements Serializable
Class that represents an arbitrary axis.
Functionality includes:
AxisListeners
Constructor and Description |
---|
Axis()
Initializes a new instance without minimum and maximum values.
|
Axis(Number min,
Number max)
Initializes a new instance with the specified minimum and maximum values.
|
Modifier and Type | Method and Description |
---|---|
void |
addAxisListener(AxisListener listener)
Adds the specified
AxisListener to this Axis. |
Number |
getMax()
Returns the maximum value to be displayed.
|
Number |
getMin()
Returns the minimum value to be displayed.
|
double |
getRange()
Returns the range of values to be displayed.
|
boolean |
isAutoscaled()
Returns whether the axis range should be determined automatically rather
than using the axis's minimum and a maximum values.
|
boolean |
isValid()
Returns whether the currently set minimum and maximum values are valid.
|
void |
removeAxisListener(AxisListener listener)
Removes the specified
AxisListener from this Axis. |
void |
setAutoscaled(boolean autoscaled)
Sets whether the axis range should be determined automatically rather
than using the axis's minimum and a maximum values.
|
void |
setMax(Number max)
Sets the maximum value to be displayed.
|
void |
setMin(Number min)
Sets the minimum value to be displayed.
|
void |
setRange(Number min,
Number max)
Sets the range of values to be displayed.
|
public Axis()
public void addAxisListener(AxisListener listener)
AxisListener
to this Axis.
The Listeners will be notified if changes to the Axis occur,
for Example if the minimum or maximum value changes.listener
- Listener to be addedAxisListener
public void removeAxisListener(AxisListener listener)
AxisListener
from this Axis.listener
- Listener to be removedAxisListener
public Number getMin()
public void setMin(Number min)
min
- Minimum value.public Number getMax()
public void setMax(Number max)
max
- Maximum value.public double getRange()
public void setRange(Number min, Number max)
min
- Minimum value.max
- Maximum value.public boolean isAutoscaled()
public void setAutoscaled(boolean autoscaled)
autoscaled
- Defines whether the axis should be automatically
scaled to fit the current data.public boolean isValid()
true
when minimum and maximum values are correct,
otherwise false
Copyright © 2009-2013. All Rights Reserved.