Package org.jfree.chart
Class ChartMouseEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.jfree.chart.ChartMouseEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class ChartMouseEvent extends java.util.EventObject implements java.io.SerializableA mouse event for a chart that is displayed in aChartPanel.- See Also:
ChartMouseListener, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private JFreeChartchartThe chart that the mouse event relates to.private ChartEntityentityThe chart entity (if any).private static longserialVersionUIDFor serialization.private java.awt.event.MouseEventtriggerThe Java mouse event that triggered this event.
-
Constructor Summary
Constructors Constructor Description ChartMouseEvent(JFreeChart chart, java.awt.event.MouseEvent trigger, ChartEntity entity)Constructs a new event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JFreeChartgetChart()Returns the chart that the mouse event relates to.ChartEntitygetEntity()Returns the chart entity (if any) under the mouse point.java.awt.event.MouseEventgetTrigger()Returns the mouse event that triggered this event.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
For serialization.- See Also:
- Constant Field Values
-
chart
private final JFreeChart chart
The chart that the mouse event relates to.
-
trigger
private final java.awt.event.MouseEvent trigger
The Java mouse event that triggered this event.
-
entity
private final ChartEntity entity
The chart entity (if any).
-
-
Constructor Detail
-
ChartMouseEvent
public ChartMouseEvent(JFreeChart chart, java.awt.event.MouseEvent trigger, ChartEntity entity)
Constructs a new event.- Parameters:
chart- the source chart (nullnot permitted).trigger- the mouse event that triggered this event (nullnot permitted).entity- the chart entity (if any) under the mouse point (nullpermitted).
-
-
Method Detail
-
getChart
public JFreeChart getChart()
Returns the chart that the mouse event relates to.- Returns:
- The chart (never
null).
-
getTrigger
public java.awt.event.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).
-
-