Documentation of 'org.jfree.chart.panel.CrosshairOverlay' Java class
CrosshairOverlay
org.jfree.chart.panel

Class CrosshairOverlay

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, Overlay, org.jfree.util.PublicCloneable


    public class CrosshairOverlay
    extends AbstractOverlay
    implements Overlay, java.beans.PropertyChangeListener, org.jfree.util.PublicCloneable, java.lang.Cloneable, java.io.Serializable
    An overlay for a ChartPanel that draws crosshairs on a plot.
    Since:
    1.0.13
    See Also:
    Serialized Form
    • Constructor Detail

      • CrosshairOverlay

        public CrosshairOverlay()
        Default constructor.
    • Method Detail

      • clearDomainCrosshairs

        public void clearDomainCrosshairs()
        Clears all the domain crosshairs from the overlay and sends an OverlayChangeEvent to all registered listeners.
      • getDomainCrosshairs

        public java.util.List getDomainCrosshairs()
        Returns a new list containing the domain crosshairs for this overlay.
        Returns:
        A list of crosshairs.
      • addRangeCrosshair

        public void addRangeCrosshair(Crosshair crosshair)
        Adds a crosshair against the range axis and sends an OverlayChangeEvent to all registered listeners.
        Parameters:
        crosshair - the crosshair (null not permitted).
      • clearRangeCrosshairs

        public void clearRangeCrosshairs()
        Clears all the range crosshairs from the overlay and sends an OverlayChangeEvent to all registered listeners.
      • getRangeCrosshairs

        public java.util.List getRangeCrosshairs()
        Returns a new list containing the range crosshairs for this overlay.
        Returns:
        A list of crosshairs.
      • propertyChange

        public void propertyChange(java.beans.PropertyChangeEvent e)
        Receives a property change event (typically a change in one of the crosshairs).
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
        Parameters:
        e - the event.
      • paintOverlay

        public void paintOverlay(java.awt.Graphics2D g2,
                                 ChartPanel chartPanel)
        Paints the crosshairs in the layer.
        Specified by:
        paintOverlay in interface Overlay
        Parameters:
        g2 - the graphics target.
        chartPanel - the chart panel.
      • equals

        public boolean equals(java.lang.Object obj)
        Tests this overlay for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a clone of this instance.
        Specified by:
        clone in interface org.jfree.util.PublicCloneable
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone of this instance.
        Throws:
        java.lang.CloneNotSupportedException - if there is some problem with the cloning.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.