com.jrefinery.chart
Class Tick

java.lang.Object
  extended by com.jrefinery.chart.Tick

public class Tick
extends java.lang.Object

Represents the dimensions of a tick on an axis (used during the process of drawing a chart, but not retained).


Field Summary
protected  java.lang.String text
          A text version of the tick value.
protected  java.lang.Object value
          The tick value.
protected  float x
          The x-coordinate of the tick.
protected  float y
          The y-coordinate of the tick.
 
Constructor Summary
Tick(java.lang.Object value, java.lang.String text, float x, float y)
          Standard constructor: creates a Tick with the specified properties.
Tick(java.lang.String text, float x, float y)
          Standard constructor: creates a Tick with the specified properties.
 
Method Summary
 double getNumericalValue()
          Returns the numerical value of the tick, or null if the value is not a Number.
 java.lang.String getText()
          Returns the text version of the tick value.
 float getX()
          Returns the x-coordinate of the tick.
 float getY()
          Returns the y-coordinate of the tick.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected java.lang.Object value
The tick value.


text

protected java.lang.String text
A text version of the tick value.


x

protected float x
The x-coordinate of the tick.


y

protected float y
The y-coordinate of the tick.

Constructor Detail

Tick

public Tick(java.lang.Object value,
            java.lang.String text,
            float x,
            float y)
Standard constructor: creates a Tick with the specified properties.

Parameters:
value - The tick value;
formattedValue - The formatted version of the tick value;
x - The x-coordinate of the tick;
y - The y-coordinate of the tick;

Tick

public Tick(java.lang.String text,
            float x,
            float y)
Standard constructor: creates a Tick with the specified properties.

Parameters:
formattedValue - The formatted version of the tick value;
x - The x-coordinate of the tick;
y - The y-coordinate of the tick;
Method Detail

getNumericalValue

public double getNumericalValue()
Returns the numerical value of the tick, or null if the value is not a Number.

Returns:
The tick value.

getText

public java.lang.String getText()
Returns the text version of the tick value.

Returns:
The formatted version of the tick value;

getX

public float getX()
Returns the x-coordinate of the tick.

Returns:
The x-coordinate of the tick.

getY

public float getY()
Returns the y-coordinate of the tick.

Returns:
The y-coordinate of the tick.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.