Package uk.ac.starlink.ttools.plot2
Class Tick
- java.lang.Object
-
- uk.ac.starlink.ttools.plot2.Tick
-
@Equality public class Tick extends java.lang.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Caption
getLabel()
Returns this tick's text label.double
getValue()
Returns this tick's numeric value.int
hashCode()
java.lang.String
toString()
-
-
-
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, Caption label)
Constructs a tick. As long as the label is non-null, this is considered a major tick.- Parameters:
value
- numeric valuelabel
- tick label
-
-
Method Detail
-
getValue
public double getValue()
Returns this tick's numeric value.- Returns:
- value
-
getLabel
public Caption getLabel()
Returns this tick's text label.- Returns:
- tick label
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-