Package org.jfree.chart.event
Class ChartChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.jfree.chart.event.ChartChangeEvent
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AnnotationChangeEvent,AxisChangeEvent,DialLayerChangeEvent,MarkerChangeEvent,PlotChangeEvent,RendererChangeEvent,TitleChangeEvent
public class ChartChangeEvent extends java.util.EventObjectA change event that encapsulates information about a change to a chart.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private JFreeChartchartThe chart that generated the event.private ChartChangeEventTypetypeThe type of event.
-
Constructor Summary
Constructors Constructor Description ChartChangeEvent(java.lang.Object source)Creates a new chart change event.ChartChangeEvent(java.lang.Object source, JFreeChart chart)Creates a new chart change event.ChartChangeEvent(java.lang.Object source, JFreeChart chart, ChartChangeEventType type)Creates a new chart change event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JFreeChartgetChart()Returns the chart that generated the change event.ChartChangeEventTypegetType()Returns the event type.voidsetChart(JFreeChart chart)Sets the chart that generated the change event.voidsetType(ChartChangeEventType type)Sets the event type.
-
-
-
Field Detail
-
type
private ChartChangeEventType type
The type of event.
-
chart
private JFreeChart chart
The chart that generated the event.
-
-
Constructor Detail
-
ChartChangeEvent
public ChartChangeEvent(java.lang.Object source)
Creates a new chart change event.- Parameters:
source- the source of the event (could be the chart, a title, an axis etc.)
-
ChartChangeEvent
public ChartChangeEvent(java.lang.Object source, JFreeChart chart)Creates a new chart change event.- Parameters:
source- the source of the event (could be the chart, a title, an axis etc.)chart- the chart that generated the event.
-
ChartChangeEvent
public ChartChangeEvent(java.lang.Object source, JFreeChart chart, ChartChangeEventType type)Creates a new chart change event.- Parameters:
source- the source of the event (could be the chart, a title, an axis etc.)chart- the chart that generated the event.type- the type of event.
-
-
Method Detail
-
getChart
public JFreeChart getChart()
Returns the chart that generated the change event.- Returns:
- The chart that generated the change event.
-
setChart
public void setChart(JFreeChart chart)
Sets the chart that generated the change event.- Parameters:
chart- the chart that generated the event.
-
getType
public ChartChangeEventType getType()
Returns the event type.- Returns:
- The event type.
-
setType
public void setType(ChartChangeEventType type)
Sets the event type.- Parameters:
type- the event type.
-
-