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 booleanequals(java.lang.Object o)CaptiongetLabel()Returns this tick's text label.doublegetValue()Returns this tick's numeric value.inthashCode()java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-