ifi.dsb
Class AxisValues

java.lang.Object
  extended byifi.dsb.AxisValues
Direct Known Subclasses:
FrequencyAxis, TimeAxis

public class AxisValues
extends java.lang.Object

Class for creation of a linear array. Can be used to aid in creating axis values for plotting.

Author:
Svein Bøe, svein@ifi.uio.no, 2002-2003.

Constructor Summary
AxisValues(double[] data)
          Constructs AxisValues object.
AxisValues(double[] data, java.lang.String label)
          Constructs AxisValues object.
AxisValues(double min, double max, int length)
          Constructs AxisValues object.
AxisValues(double min, double max, int length, java.lang.String label)
          Constructs AxisValues object.
AxisValues(int length)
           
 
Method Summary
 java.lang.String getLabel()
          Return the axis label.
 int getLength()
          Return the axis length (number of axis samples).
 double getMax()
          Return the axis maximum value.
 double getMin()
          Return the axis minimum value.
 double[] getValues()
          Return the axis values.
 void setLabel(java.lang.String label)
          Set the axis label.
 void setLength(int length)
          Set the axis length (number of axis samples), and update the axis values accordingly by calling updateValues.
 void setMax(double max)
          Set the axis maximum value and update the axis values accordingly by calling updateValues.
 void setMin(double min)
          Set the axis minimum value and update the axis values accordingly by calling updateValues.
protected  void updateValues()
          Update the axis values based on the current values of min, max and length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AxisValues

public AxisValues(int length)

AxisValues

public AxisValues(double min,
                  double max,
                  int length)
Constructs AxisValues object.

Parameters:
min - Minimum axis value.
max - Maximum axis value.
length - Number of axis values.

AxisValues

public AxisValues(double min,
                  double max,
                  int length,
                  java.lang.String label)
Constructs AxisValues object.

Parameters:
min - Minimum axis value.
max - Maximum axis value.
length - Number of axis values.
label - Axis label.

AxisValues

public AxisValues(double[] data)
Constructs AxisValues object.

Parameters:
data - Axis values. Minimum, maximum and length are set from these values.

AxisValues

public AxisValues(double[] data,
                  java.lang.String label)
Constructs AxisValues object.

Parameters:
data - Axis values. Minimum, maximum and length are set from these values.
label - Axis label.
Method Detail

getValues

public double[] getValues()
Return the axis values.


getMin

public double getMin()
Return the axis minimum value.


setMin

public void setMin(double min)
Set the axis minimum value and update the axis values accordingly by calling updateValues.


getMax

public double getMax()
Return the axis maximum value.


setMax

public void setMax(double max)
Set the axis maximum value and update the axis values accordingly by calling updateValues.


getLength

public int getLength()
Return the axis length (number of axis samples).


setLength

public void setLength(int length)
Set the axis length (number of axis samples), and update the axis values accordingly by calling updateValues.


getLabel

public java.lang.String getLabel()
Return the axis label.


setLabel

public void setLabel(java.lang.String label)
Set the axis label.


updateValues

protected void updateValues()
Update the axis values based on the current values of min, max and length.