JIDE 3.5.15

com.jidesoft.chart.axis
Class Tick

java.lang.Object
  extended by com.jidesoft.chart.axis.Tick

public class Tick
extends Object

Ticks are generated at regular intervals along an axis and displayed as little dashed lines on the axis to give an indication of the gradation.

Author:
Simon White (swhite@catalysoft.com)

Constructor Summary
Tick()
          Construct a Tick object.
Tick(double position)
          Creates a minor tick at the supplied position.
Tick(double position, boolean isMajor)
          Create a tick at the supplied position.
Tick(double position, String label)
          Create a Tick object with the supplied position and label.
 
Method Summary
 boolean equals(Object obj)
           
 String getLabel()
          Returns the label for this tick, or null if there is none
 double getPosition()
          Returns the position of the tick along the axis
 int hashCode()
           
 boolean isMajor()
          Returns whether the tick is a major tick.
 void setLabel(String label)
          Sets the label for this tick
 void setMajor(boolean major)
          Specify whether the tick is a major tick.
 void setPosition(double position)
          Sets the position of the tick along the axis
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tick

public Tick()
Construct a Tick object. By default the position along the axis is zero.


Tick

public Tick(double position)
Creates a minor tick at the supplied position.

Parameters:
position - the position for the tick.

Tick

public Tick(double position,
            boolean isMajor)
Create a tick at the supplied position. The second parameter determines whether it is a major or a minor tick.

Parameters:
position - the position for the tick
isMajor - whether the tick is a major tick

Tick

public Tick(double position,
            String label)
Create a Tick object with the supplied position and label. As a label is supplied, this is assumed to be a major tick.

Parameters:
position - the new position of the tick along the axis
label - the new label
Method Detail

isMajor

public boolean isMajor()
Returns whether the tick is a major tick. If not major, it is a minor tick.

Returns:
a boolean to indicate whether the tick is a major tick

setMajor

public void setMajor(boolean major)
Specify whether the tick is a major tick. If the tick is not major it is minor (that is, these are the only two possibilities.)

Parameters:
major - whether the tick is a major tick

getLabel

public String getLabel()
Returns the label for this tick, or null if there is none

Returns:
the label for this tick

setLabel

public void setLabel(String label)
Sets the label for this tick

Parameters:
label - the label for the tick

getPosition

public double getPosition()
Returns the position of the tick along the axis

Returns:
the position of the tick along the axis

setPosition

public void setPosition(double position)
Sets the position of the tick along the axis

Parameters:
position - the position for the tick, given in axis coordinates

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

JIDE 3.5.15