## 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:
  AxisChangeEvent, LegendChangeEvent, PlotChangeEvent, RendererChangeEvent, TitleChangeEvent

public class ChartChangeEvent
extends java.util.EventObject

A change event that encapsulates information about a change to a chart.

See Also:
  Serialized Form

Field Summary
`static int` `GENERAL` Event type indicating a general change to a chart (typically just requires a redraw).
`static int` `NEW_DATASET` Event type indicating that the chart has a new dataset.
`static int` `UPDATED_DATASET` Event type indicating that the chart's data source has been modified.

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`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, int type)` Creates a new chart change event.

Method Summary
`JFreeChart` `getChart()` Returns the chart that generated the change event.
`int` `getType()` Returns the event type.
`void` `setChart(JFreeChart chart)` Sets the chart that generated the change event.
`void` `setType(int type)` Sets the event type.

Methods inherited from class java.util.EventObject
`getSource, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### GENERAL

    public static final int GENERAL

  Event type indicating a general change to a chart (typically just requires a redraw).

  See Also:
    Constant Field Values

### NEW_DATASET

    public static final int NEW_DATASET

  Event type indicating that the chart has a new dataset.

  See Also:
    Constant Field Values

### UPDATED_DATASET

    public static final int UPDATED_DATASET

  Event type indicating that the chart's data source has been modified.

  See Also:
    Constant Field Values

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,
                            int 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 int getType()

  Returns the event type.

  Returns:
    the event type.

### setType

    public void setType(int type)

  Sets the event type.

  Parameters:
    `type` - the event type.