public final class

TickMark

extends Object
java.lang.Object
   ↳ com.shinobicontrols.charts.TickMark

Class Overview

A single tick mark on an axis.

Summary

Nested Classes
enum TickMark.ClippingMode The clipping mode of the tick marks. 
enum TickMark.Orientation The orientation of the tick mark label. 
Public Methods
Point getLabelCenter()
Gets the center point of the label.
TextPaint getLabelPaint()
Gets the Paint object used to draw the tick mark label.
String getLabelText()
Gets the text of the tick mark label.
Paint getLinePaint()
Gets the Paint object used to draw the tick line.
Object getValue()
Returns the data value which the tick mark represents, as an Object.
boolean isLabelShown()
Returns true if the label is set to be shown, otherwise returns false.
boolean isLineShown()
Returns true if the tick mark line is set to be shown, otherwise returns false.
boolean isMajor()
Returns true if the tick mark is a major tick mark, otherwise returns false.
void setLabelShown(boolean showLabel)
Sets if the label is to be shown.
void setLabelText(String labelText)
Sets the text to be drawn to the tick mark label.
void setLineShown(boolean showLine)
Sets if the tick mark line is to be shown.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public Point getLabelCenter ()

Gets the center point of the label. You can manipulate the X and Y values of the center point in order to move the tick mark label.

Returns
  • the labelCenter

public TextPaint getLabelPaint ()

Gets the Paint object used to draw the tick mark label.

Returns
  • the labelPaint

public String getLabelText ()

Gets the text of the tick mark label.

Returns
  • the labelText

public Paint getLinePaint ()

Gets the Paint object used to draw the tick line.

Returns
  • the linePaint

public Object getValue ()

Returns the data value which the tick mark represents, as an Object. You will need to cast this object to a suitable data type based on the axis the tick mark belongs to. For NumberAxis and CategoryAxis this will be a java.lang.Double. For a DateTimeAxis this will be a java.util.Date. You may find it useful to use this method in conjunction with the getFormattedString(T value) method on the Axis subclasses.

Returns
  • the value

public boolean isLabelShown ()

Returns true if the label is set to be shown, otherwise returns false.

Returns
  • true if the label is to be shown

public boolean isLineShown ()

Returns true if the tick mark line is set to be shown, otherwise returns false.

Returns
  • true if the tick mark line is to be shown

public boolean isMajor ()

Returns true if the tick mark is a major tick mark, otherwise returns false.

Returns
  • true if the tick mark is a major tick mark, otherwise returns false

public void setLabelShown (boolean showLabel)

Sets if the label is to be shown.

Parameters
showLabel set to true if the label is to be shown
See Also

public void setLabelText (String labelText)

Sets the text to be drawn to the tick mark label.

Parameters
labelText the labelText to set
See Also

public void setLineShown (boolean showLine)

Sets if the tick mark line is to be shown.

Parameters
showLine set to true if the tick line is to be shown
See Also