Class MarkerData

java.lang.Object
org.jfree.chart3d.marker.MarkerData

public class MarkerData extends Object
A record holder for data relating to markers that needs to be passed to the 3D engine.
Since:
1.2
  • Constructor Details

    • MarkerData

      public MarkerData(String key, double pos)
      Creates marker data for the case where there is a single line (for example, the NumberMarker 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, the RangeMarker 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

      public MarkerData(MarkerData source, int v0, int v1)
      Creates a new instance based on an existing source that has type MarkerDataType.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

      public MarkerData(MarkerData source, int v0, int v1, int v2, int v3)
      Creates a new instance based on an existing source that has type MarkerDataType.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

      public String 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

      public void setLabelAnchor(Anchor2D anchor)
      Sets the label anchor.
      Parameters:
      anchor - the label anchor.
    • getLabelVertexIndex

      public int getLabelVertexIndex()
      Returns the label vertex index.
      Returns:
      The label vertex index.
    • setLabelVertexIndex

      public void setLabelVertexIndex(int labelVertexIndex)
      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

      public void updateProjection(Point2D[] pts)
      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

      public String toString()
      Overrides:
      toString in class Object