Class MarkerLine

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

public class MarkerLine extends Object
A data object that represents a line within a MarkerData structure.
Since:
1.2
  • Constructor Summary

    Constructors
    Constructor
    Description
    MarkerLine(double pos, boolean pegged)
    Creates a new marker line.
    MarkerLine(double pos, boolean pegged, int v0, int v1)
    Creates a new marker line with vertex indices.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the relative position of the line along the axis.
    int
    Returns the index of the vertex for the start of the line.
    int
    Returns the index of the vertex for the end of the line.
    boolean
    Returns true if the line is pegged, and false otherwise.
    void
    Sets the projected ending point for the line.
    void
    Sets the projected starting point for the line.
    void
    setV0(int v0)
    Sets the index of the vertex for the start of the line.
    void
    setV1(int v1)
    Sets the index of the vertex for the end of the line.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MarkerLine

      public MarkerLine(double pos, boolean pegged)
      Creates a new marker line.
      Parameters:
      pos - the relative position (in the range 0.0 to 1.0).
      pegged - a flag indicating whether or not the line has been pegged to the end of the range.
    • MarkerLine

      public MarkerLine(double pos, boolean pegged, int v0, int v1)
      Creates a new marker line with vertex indices.
      Parameters:
      pos - the relative position (in the range 0.0 to 1.0).
      pegged - a flag indicating whether or not the line has been pegged to the end of the range.
      v0 - the index of the first vertex.
      v1 - the index of the second vertex.
  • Method Details

    • getPos

      public double getPos()
      Returns the relative position of the line along the axis.
      Returns:
      The relative position of the line along the axis.
    • isPegged

      public boolean isPegged()
      Returns true if the line is pegged, and false otherwise. This is used for range markers to indicate that the value represented by the line falls outside the current axis range, so the line has been moved to the nearest axis boundary ("pegged" to the axis range).
      Returns:
      A boolean.
    • getV0

      public int getV0()
      Returns the index of the vertex for the start of the line.
      Returns:
      The index.
    • setV0

      public void setV0(int v0)
      Sets the index of the vertex for the start of the line.
      Parameters:
      v0 - the index.
    • getV1

      public int getV1()
      Returns the index of the vertex for the end of the line.
      Returns:
      The index.
    • setV1

      public void setV1(int v1)
      Sets the index of the vertex for the end of the line.
      Parameters:
      v1 - the index.
    • setStartPoint

      public void setStartPoint(Point2D pt)
      Sets the projected starting point for the line.
      Parameters:
      pt - the projected point.
    • setEndPoint

      public void setEndPoint(Point2D pt)
      Sets the projected ending point for the line.
      Parameters:
      pt - the projected point.