java.lang.Object
org.jfree.chart3d.axis.TickData
public class TickData extends Object
Data related to the tick marks and labels on a chart.
-
Constructor Summary
Constructors Constructor Description TickData(double pos, double dataValue)
Creates a new instance.TickData(double pos, Comparable<?> key, String keyLabel)
Creates a new instance.TickData(TickData source, int vertexIndex)
Creates a new instance by copying an existing instance but altering the vertex index. -
Method Summary
Modifier and Type Method Description Point2D
getAnchorPt()
Returns the anchor point.double
getDataValue()
Returns the data value when the tick data is for aNumberAxis3D
, andDouble.NaN
otherwise.Comparable<?>
getKey()
Returns the key when the tick data is for aCategoryAxis3D
, andnull
otherwise.String
getKeyLabel()
Returns the key label.double
getPos()
Returns the position of the tick, as a percentage along the axis (for example, 0.5 is halfway along the axis).int
getVertexIndex()
Returns the vertex index that is the anchor point for the tick mark.void
setAnchorPt(Point2D anchorPt)
Sets the anchor point.void
setVertexIndex(int index)
Sets the vertex index.
-
Constructor Details
-
TickData
Creates a new instance. This constructor is used for category axes.- Parameters:
pos
- the position along the axis as a percentage of the range.key
- the key.keyLabel
- the key label.
-
TickData
Creates a new instance. This constructor is used for numerical axes.- Parameters:
pos
- the position along the axis as a percentage of the range.dataValue
- the data value.
-
TickData
Creates a new instance by copying an existing instance but altering the vertex index.- Parameters:
source
- a source to copy (null
not permitted).vertexIndex
- the vertex index.
-
-
Method Details
-
getPos
Returns the position of the tick, as a percentage along the axis (for example, 0.5 is halfway along the axis).- Returns:
- The position.
-
getKey
Returns the key when the tick data is for aCategoryAxis3D
, andnull
otherwise.- Returns:
- The key (possibly
null
).
-
getKeyLabel
Returns the key label.- Returns:
- The key label (possibly
null
). - Since:
- 1.2
-
getDataValue
Returns the data value when the tick data is for aNumberAxis3D
, andDouble.NaN
otherwise.- Returns:
- The data value.
-
getVertexIndex
Returns the vertex index that is the anchor point for the tick mark.- Returns:
- The vertex index.
-
setVertexIndex
Sets the vertex index. The vertex is a point in 3D space that is the anchor point for the tick mark, after this is projected to 2D space we have a reference point for the tick mark.- Parameters:
index
- the index.
-
getAnchorPt
Returns the anchor point.- Returns:
- The anchor point.
-
setAnchorPt
Sets the anchor point. This is the projected point in 2D space of the vertex we track in 3D space.- Parameters:
anchorPt
- the anchor point.
-