Package org.jfree.chart.event
Class ChartChangeEvent
java.lang.Object
java.util.EventObject
org.jfree.chart.event.ChartChangeEvent
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- AxisChangeEvent,- LegendChangeEvent,- PlotChangeEvent,- RendererChangeEvent,- TitleChangeEvent
public class ChartChangeEvent extends EventObject
A change event that encapsulates information about a change to a chart.
- See Also:
- Serialized Form
- 
Field SummaryFields Modifier and Type Field Description static intGENERALEvent type indicating a general change to a chart (typically just requires a redraw).static intNEW_DATASETEvent type indicating that the chart has a new dataset.static intUPDATED_DATASETEvent type indicating that the chart's data source has been modified.
- 
Constructor SummaryConstructors Constructor Description ChartChangeEvent(Object source)Creates a new chart change event.ChartChangeEvent(Object source, JFreeChart chart)Creates a new chart change event.ChartChangeEvent(Object source, JFreeChart chart, int type)Creates a new chart change event.
- 
Method SummaryModifier and Type Method Description JFreeChartgetChart()Returns the chart that generated the change event.intgetType()Returns the event type.voidsetChart(JFreeChart chart)Sets the chart that generated the change event.voidsetType(int type)Sets the event type.Methods inherited from class java.util.EventObjectgetSource, toString
- 
Field Details- 
GENERALpublic static final int GENERALEvent type indicating a general change to a chart (typically just requires a redraw).- See Also:
- Constant Field Values
 
- 
NEW_DATASETpublic static final int NEW_DATASETEvent type indicating that the chart has a new dataset.- See Also:
- Constant Field Values
 
- 
UPDATED_DATASETpublic static final int UPDATED_DATASETEvent type indicating that the chart's data source has been modified.- See Also:
- Constant Field Values
 
 
- 
- 
Constructor Details- 
ChartChangeEventCreates a new chart change event.- Parameters:
- source- the source of the event (could be the chart, a title, an axis etc.)
 
- 
ChartChangeEventCreates 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.
 
- 
ChartChangeEventCreates 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 Details- 
getChartReturns the chart that generated the change event.- Returns:
- the chart that generated the change event.
 
- 
setChartSets the chart that generated the change event.- Parameters:
- chart- the chart that generated the event.
 
- 
getTypepublic int getType()Returns the event type.- Returns:
- the event type.
 
- 
setTypepublic void setType(int type)Sets the event type.- Parameters:
- type- the event type.
 
 
-