java.lang.Object
org.jfree.chart3d.marker.MarkerData
A record holder for data relating to markers that needs to be passed
to the 3D engine.
- Since:
- 1.2
-
Constructor Summary
ConstructorsConstructorDescriptionMarkerData
(String key, double pos) Creates marker data for the case where there is a single line (for example, theNumberMarker
class).MarkerData
(String key, double startPos, boolean startPegged, double endPos, boolean endPegged) Creates marker data for the case where there are two lines.MarkerData
(MarkerData source, int v0, int v1) Creates a new instance based on an existing source that has typeMarkerDataType.VALUE
.MarkerData
(MarkerData source, int v0, int v1, int v2, int v3) Creates a new instance based on an existing source that has typeMarkerDataType.Range
. -
Method Summary
Modifier and TypeMethodDescriptionA convenience method that returns the end line data for a range marker.Returns the label anchor.Returns the label projection point.int
Returns the label vertex index.Returns the marker key (allows retrieval of the original marker object when required).A convenience method that returns the start line data for a range marker.getType()
Returns the type of marker data (value or range).A convenience method that returns the value line data for a value marker.void
setLabelAnchor
(Anchor2D anchor) Sets the label anchor.void
setLabelVertexIndex
(int labelVertexIndex) Sets the label vertex index.toString()
void
updateProjection
(Point2D[] pts) Updates the projected points for this marker.
-
Constructor Details
-
MarkerData
Creates marker data for the case where there is a single line (for example, theNumberMarker
class).- Parameters:
key
- the key for the marker (null
not permitted).pos
- the relative position along the axis (in the range 0.0 to 1.0).
-
MarkerData
public MarkerData(String key, double startPos, boolean startPegged, double endPos, boolean endPegged) Creates marker data for the case where there are two lines. (for example, theRangeMarker
class).- Parameters:
key
- the key (null
not permitted).startPos
- the relative start position.startPegged
- is the start position pegged?endPos
- the relative end position.endPegged
- is the end position pegged?
-
MarkerData
Creates a new instance based on an existing source that has typeMarkerDataType.VALUE
.- Parameters:
source
- the source (null
not permitted).v0
- the vertex index for the start of the line.v1
- the vertex index for the end of the line.
-
MarkerData
Creates a new instance based on an existing source that has typeMarkerDataType.Range
.- Parameters:
source
- the source (null
not permitted).v0
- the vertex index for the start of the first line.v1
- the vertex index for the end of the first line.v2
- the vertex index for the start of the second line.v3
- the vertex index for the end of the second line.
-
-
Method Details
-
getMarkerKey
Returns the marker key (allows retrieval of the original marker object when required).- Returns:
- The marker key (never
null
).
-
getType
Returns the type of marker data (value or range).- Returns:
- The type (never
null
).
-
getValueLine
A convenience method that returns the value line data for a value marker.- Returns:
- The value line (or
null
).
-
getStartLine
A convenience method that returns the start line data for a range marker.- Returns:
- The start line (or
null
).
-
getEndLine
A convenience method that returns the end line data for a range marker.- Returns:
- The end line (or
null
).
-
getLabelAnchor
Returns the label anchor.- Returns:
- The label anchor.
-
setLabelAnchor
Sets the label anchor.- Parameters:
anchor
- the label anchor.
-
getLabelVertexIndex
Returns the label vertex index.- Returns:
- The label vertex index.
-
setLabelVertexIndex
Sets the label vertex index.- Parameters:
labelVertexIndex
- the label vertex index.
-
getLabelPoint
Returns the label projection point.- Returns:
- The label projection point (possibly
null
).
-
updateProjection
Updates the projected points for this marker. This needs to be done before the markers can be drawn.- Parameters:
pts
- the projected points for the world.
-
toString
-