Class Crosshair

java.lang.Object
org.jfree.chart.plot.Crosshair
All Implemented Interfaces:
Serializable, Cloneable, org.jfree.util.PublicCloneable

public class Crosshair extends Object implements Cloneable, org.jfree.util.PublicCloneable, Serializable
A crosshair for display on a plot.
Since:
1.0.13
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new crosshair with value 0.0.
    Crosshair(double value)
    Creates a new crosshair with the specified value.
    Crosshair(double value, Paint paint, Stroke stroke)
    Creates a new crosshair value with the specified value and line style.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a property change listener.
    Returns an independent copy of this instance.
    boolean
    Tests this crosshair for equality with an arbitrary object.
    org.jfree.ui.RectangleAnchor
    Returns the label anchor point.
    Returns the label background paint.
    Returns the label font.
    Returns the crosshair label generator.
    Returns the label outline paint.
    Returns the label outline stroke.
    Returns the label paint.
    double
    Returns the x-offset for the label (in Java2D units).
    double
    Returns the y-offset for the label (in Java2D units).
    Returns the paint for the crosshair line.
    Returns the stroke for the crosshair line.
    double
    Returns the crosshair value.
    int
    Returns a hash code for this instance.
    boolean
    Returns the flag that controls the visibility of the label outline.
    boolean
    Returns the flag that controls whether or not a label is drawn for this crosshair.
    boolean
    Returns the flag that indicates whether or not the crosshair is currently visible.
    void
    Removes a property change listener.
    void
    setLabelAnchor(org.jfree.ui.RectangleAnchor anchor)
    Sets the label anchor point and sends a property change event (with the name 'labelAnchor') to all registered listeners.
    void
    Sets the label background paint and sends a property change event with the name 'labelBackgroundPaint') to all registered listeners.
    void
    Sets the label font and sends a property change event (with the name 'labelFont') to all registered listeners.
    void
    Sets the crosshair label generator and sends a property change event (with the name 'labelGenerator') to all registered listeners.
    void
    Sets the label outline paint and sends a property change event (with the name "labelOutlinePaint") to all registered listeners.
    void
    Sets the label outline stroke and sends a property change event (with the name 'labelOutlineStroke') to all registered listeners.
    void
    setLabelOutlineVisible(boolean visible)
    Sets the flag that controls the visibility of the label outlines and sends a property change event (with the name "labelOutlineVisible") to all registered listeners.
    void
    Sets the label paint and sends a property change event (with the name 'labelPaint') to all registered listeners.
    void
    setLabelVisible(boolean visible)
    Sets the flag that controls whether or not a label is drawn for the crosshair and sends a property change event (with the name 'labelVisible') to all registered listeners.
    void
    setLabelXOffset(double offset)
    Sets the x-offset and sends a property change event (with the name 'labelXOffset') to all registered listeners.
    void
    setLabelYOffset(double offset)
    Sets the y-offset and sends a property change event (with the name 'labelYOffset') to all registered listeners.
    void
    setPaint(Paint paint)
    Sets the paint for the crosshair line and sends a property change event with the name "paint" to all registered listeners.
    void
    setStroke(Stroke stroke)
    Sets the stroke for the crosshair line and sends a property change event with the name "stroke" to all registered listeners.
    void
    setValue(double value)
    Sets the crosshair value and sends a property change event with the name 'value' to all registered listeners.
    void
    setVisible(boolean visible)
    Sets the flag that controls the visibility of the crosshair and sends a proerty change event (with the name 'visible') to all registered listeners.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Crosshair

      public Crosshair()
      Creates a new crosshair with value 0.0.
    • Crosshair

      public Crosshair(double value)
      Creates a new crosshair with the specified value.
      Parameters:
      value - the value.
    • Crosshair

      public Crosshair(double value, Paint paint, Stroke stroke)
      Creates a new crosshair value with the specified value and line style.
      Parameters:
      value - the value.
      paint - the line paint (null not permitted).
      stroke - the line stroke (null not permitted).
  • Method Details