de.erichseifert.gral.plots.axes
Class Axis

java.lang.Object
  extended by de.erichseifert.gral.plots.axes.Axis

public class Axis
extends Object

Class that represents an arbitrary axis.

Functionality includes:


Constructor Summary
Axis(Number min, Number max)
          Initializes a new instance with the specified minimum and maximum values.
 
Method Summary
 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.
 void removeAxisListener(AxisListener listener)
          Removes the specified AxisListener from this Axis.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Axis

public Axis(Number min,
            Number max)
Initializes a new instance with the specified minimum and maximum values.

Parameters:
min - minimum value
max - maximum value
Method Detail

addAxisListener

public void addAxisListener(AxisListener listener)
Adds the specified AxisListener to this Axis. The Listeners will be notified if changes to the Axis occur, for Example if the minimum or maximum value changes.

Parameters:
listener - Listener to be added
See Also:
AxisListener

removeAxisListener

public void removeAxisListener(AxisListener listener)
Removes the specified AxisListener from this Axis.

Parameters:
listener - Listener to be removed
See Also:
AxisListener

getMin

public Number getMin()
Returns the minimum value to be displayed.

Returns:
Minimum value.

setMin

public void setMin(Number min)
Sets the minimum value to be displayed.

Parameters:
min - Minimum value.

getMax

public Number getMax()
Returns the maximum value to be displayed.

Returns:
Maximum value.

setMax

public void setMax(Number max)
Sets the maximum value to be displayed.

Parameters:
max - Maximum value.

getRange

public double getRange()
Returns the range of values to be displayed.

Returns:
Distance between maximum and minimum value.

setRange

public void setRange(Number min,
                     Number max)
Sets the range of values to be displayed.

Parameters:
min - Minimum value.
max - Maximum value.


Copyright © 2009-2010. All Rights Reserved.