uk.ac.starlink.ttools.plot2
Class Tick

java.lang.Object
  extended by uk.ac.starlink.ttools.plot2.Tick

@Equality
public class Tick
extends Object

Defines a tick on an axis. A tick has a numerical value, used for positioning, and optionally a text label. Ticks with no label are considered minor.

Since:
12 Feb 2013
Author:
Mark Taylor

Constructor Summary
Tick(double value)
          Constructs a minor tick.
Tick(double value, String label)
          Constructs a tick.
 
Method Summary
 boolean equals(Object o)
           
 String getLabel()
          Returns this tick's text label.
 double getValue()
          Returns this tick's numeric value.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tick

public Tick(double value)
Constructs a minor tick. This has no text label.

Parameters:
value - numeric value

Tick

public Tick(double value,
            String label)
Constructs a tick. As long as the label is non-null, this is considered a major tick.

Parameters:
value - numeric value
label - text label
Method Detail

getValue

public double getValue()
Returns this tick's numeric value.

Returns:
value

getLabel

public String getLabel()
Returns this tick's text label.

Returns:
text label

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.