public class MotionChart
extends java.lang.Object
implements org.jfree.data.general.DatasetChangeListener, org.jfree.chart.event.ChartChangeListener
Constructor and Description |
---|
MotionChart(MotionDataSet dataset)
Creates a new chart based on the supplied dataset.
|
MotionChart(java.lang.String title,
java.awt.Font titleFont,
MotionDataSet dataset,
boolean createLegend)
Creates a new chart with the given title and dataset.
|
MotionChart(java.lang.String title,
MotionDataSet dataset)
Creates a new chart with the given title and dataset.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(org.jfree.chart.event.ChartChangeListener listener)
Registers an object for notification of changes to the chart.
|
void |
chartChanged(org.jfree.chart.event.ChartChangeEvent event)
Receives notification of a chart change event.
|
java.lang.Object |
clone()
Clones the object, and takes care of listeners.
|
void |
datasetChanged(org.jfree.data.general.DatasetChangeEvent event)
Receives notification of an dataset change event.
|
boolean |
equals(java.lang.Object obj)
Tests this chart for equality with another object.
|
void |
fireChartChanged()
Sends a default
ChartChangeEvent to all registered listeners. |
org.jfree.chart.JFreeChart |
getChart() |
org.jfree.chart.ChartPanel |
getChartPanel() |
MotionDataSet |
getDataset() |
org.jfree.chart.plot.XYPlot |
getPlot() |
MotionBubbleRenderer |
getRenderer() |
org.jfree.chart.title.TextTitle |
getTitle()
Returns the main chart title.
|
boolean |
isNotify()
Returns a flag that controls whether or not change events are sent to
registered listeners.
|
protected void |
notifyListeners(org.jfree.chart.event.ChartChangeEvent event)
Sends a
ChartChangeEvent to all registered listeners. |
void |
removeChangeListener(org.jfree.chart.event.ChartChangeListener listener)
Deregisters an object for notification of changes to the chart.
|
void |
setNotify(boolean notify)
Sets a flag that controls whether or not listeners receive
ChartChangeEvent notifications. |
void |
setTitle(java.lang.String text)
Sets the chart title and sends a
ChartChangeEvent to all
registered listeners. |
void |
setTitle(org.jfree.chart.title.TextTitle title)
Sets the main title for the chart and sends a
ChartChangeEvent
to all registered listeners. |
public MotionChart(MotionDataSet dataset)
dataset
- the dataset (null
not permitted).public MotionChart(java.lang.String title, MotionDataSet dataset)
title
- the chart title (null
permitted).dataset
- the dataset (null
not permitted).public MotionChart(java.lang.String title, java.awt.Font titleFont, MotionDataSet dataset, boolean createLegend)
createLegend
argument specifies whether or not a legend
should be added to the chart.title
- the chart title (null
permitted).titleFont
- the font for displaying the chart title
(null
permitted).dataset
- the dataset
(null
not permitted).createLegend
- a flag indicating whether or not a legend should
be created for the chart.public org.jfree.chart.JFreeChart getChart()
public org.jfree.chart.ChartPanel getChartPanel()
public MotionBubbleRenderer getRenderer()
public MotionDataSet getDataset()
public org.jfree.chart.plot.XYPlot getPlot()
public org.jfree.chart.title.TextTitle getTitle()
null
).setTitle(TextTitle)
public void setTitle(org.jfree.chart.title.TextTitle title)
ChartChangeEvent
to all registered listeners. If you do not want a title for the
chart, set it to null
.title
- the title (null
permitted).getTitle()
public void setTitle(java.lang.String text)
ChartChangeEvent
to all
registered listeners. This is a convenience method that ends up calling
the setTitle(TextTitle)
method. If there is an existing title,
its text is updated, otherwise a new title using the default font is
added to the chart. If text
is null
the chart
title is set to null
.text
- the title text (null
permitted).getTitle()
public void datasetChanged(org.jfree.data.general.DatasetChangeEvent event)
datasetChanged
in interface org.jfree.data.general.DatasetChangeListener
event
- information about the event.public void chartChanged(org.jfree.chart.event.ChartChangeEvent event)
chartChanged
in interface org.jfree.chart.event.ChartChangeListener
event
- the event.public boolean isNotify()
setNotify(boolean)
public void setNotify(boolean notify)
ChartChangeEvent
notifications.notify
- a boolean.isNotify()
public void addChangeListener(org.jfree.chart.event.ChartChangeListener listener)
listener
- the listener (null
not permitted).removeChangeListener(ChartChangeListener)
public void removeChangeListener(org.jfree.chart.event.ChartChangeListener listener)
listener
- the listener (null
not permitted)addChangeListener(ChartChangeListener)
public void fireChartChanged()
ChartChangeEvent
to all registered listeners.
This method is for convenience only.
protected void notifyListeners(org.jfree.chart.event.ChartChangeEvent event)
ChartChangeEvent
to all registered listeners.event
- information about the event that triggered the
notification.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object (null
permitted).public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- if the chart is not cloneable.