Class ChartMouseEvent

java.lang.Object
java.util.EventObject
org.jfree.chart.ChartMouseEvent
All Implemented Interfaces:
Serializable

public class ChartMouseEvent extends EventObject implements Serializable
A mouse event for a chart that is displayed in a ChartPanel.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For serialization.
      See Also:
    • chart

      private final JFreeChart chart
      The chart that the mouse event relates to.
    • trigger

      private final MouseEvent trigger
      The Java mouse event that triggered this event.
    • entity

      private final ChartEntity entity
      The chart entity (if any).
  • Constructor Details

    • ChartMouseEvent

      public ChartMouseEvent(JFreeChart chart, MouseEvent trigger, ChartEntity entity)
      Constructs a new event.
      Parameters:
      chart - the source chart (null not permitted).
      trigger - the mouse event that triggered this event (null not permitted).
      entity - the chart entity (if any) under the mouse point (null permitted).
  • Method Details

    • getChart

      public JFreeChart getChart()
      Returns the chart that the mouse event relates to.
      Returns:
      The chart (never null).
    • getTrigger

      public MouseEvent getTrigger()
      Returns the mouse event that triggered this event.
      Returns:
      The event (never null).
    • getEntity

      public ChartEntity getEntity()
      Returns the chart entity (if any) under the mouse point.
      Returns:
      The chart entity (possibly null).