|
|||||||||
| Home >> All >> org >> jfree >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jfree.chart
Class JFreeChart

java.lang.Objectorg.jfree.chart.JFreeChart
- All Implemented Interfaces:
- java.lang.Cloneable, org.jfree.ui.Drawable, java.util.EventListener, org.jfree.chart.event.LegendChangeListener, org.jfree.chart.event.PlotChangeListener, java.io.Serializable, org.jfree.chart.event.TitleChangeListener
- public class JFreeChart
- extends java.lang.Object
- implements org.jfree.ui.Drawable, org.jfree.chart.event.TitleChangeListener, org.jfree.chart.event.LegendChangeListener, org.jfree.chart.event.PlotChangeListener, java.io.Serializable, java.lang.Cloneable
- extends java.lang.Object
A chart class implemented using the Java 2D APIs. The current version supports bar charts, line charts, pie charts and xy plots (including time series data).
JFreeChart coordinates several objects to achieve its aim of being able to draw a chart on a Java 2D graphics device: a list of org.jfree.chart.title.Title objects, a OldLegend, a org.jfree.chart.plot.Plot and a org.jfree.data.general.Dataset (the plot in turn manages a horizontal axis and a vertical axis).
You should use a ChartPanel to display a chart in a GUI.
The ChartFactory class contains static methods for creating 'ready-made' charts.
| Field Summary | |
private java.awt.Image |
backgroundImage
An optional background image for the chart. |
private int |
backgroundImageAlignment
The alignment for the background image. |
private float |
backgroundImageAlpha
The alpha transparency for the background image. |
private java.awt.Paint |
backgroundPaint
Paint used to draw the background of the chart. |
private java.awt.Paint |
borderPaint
The paint used to draw the chart border (if visible). |
private java.awt.Stroke |
borderStroke
The stroke used to draw the chart border (if visible). |
private boolean |
borderVisible
A flag that controls whether or not the chart border is drawn. |
private javax.swing.event.EventListenerList |
changeListeners
Storage for registered change listeners. |
static java.awt.Image |
DEFAULT_BACKGROUND_IMAGE
The default background image. |
static int |
DEFAULT_BACKGROUND_IMAGE_ALIGNMENT
The default background image alignment. |
static float |
DEFAULT_BACKGROUND_IMAGE_ALPHA
The default background image alpha. |
static java.awt.Paint |
DEFAULT_BACKGROUND_PAINT
The default background color. |
static java.awt.Font |
DEFAULT_TITLE_FONT
The default font for titles. |
static org.jfree.ui.about.ProjectInfo |
INFO
Information about the project. |
private boolean |
notify
A flag that can be used to enable/disable notification of chart change events. |
private OldLegend |
oldLegend
The chart legend. |
private org.jfree.chart.plot.Plot |
plot
Draws the visual representation of the data. |
private javax.swing.event.EventListenerList |
progressListeners
Storage for registered progress listeners. |
private java.awt.RenderingHints |
renderingHints
Rendering hints that will be used for chart drawing. |
private static long |
serialVersionUID
For serialization. |
private java.util.List |
subtitles
The chart subtitles (zero, one or many). |
private org.jfree.chart.title.TextTitle |
title
The chart title (optional). |
| Constructor Summary | |
JFreeChart(org.jfree.chart.plot.Plot plot)
Creates a new chart based on the supplied plot. |
|
JFreeChart(java.lang.String title,
java.awt.Font titleFont,
org.jfree.chart.plot.Plot plot,
boolean createLegend)
Creates a new chart with the given title and plot. |
|
JFreeChart(java.lang.String title,
org.jfree.chart.plot.Plot plot)
Creates a new chart with the given title and plot. |
|
| Method Summary | |
void |
addChangeListener(org.jfree.chart.event.ChartChangeListener listener)
Registers an object for notification of changes to the chart. |
void |
addProgressListener(org.jfree.chart.event.ChartProgressListener listener)
Registers an object for notification of progress events relating to the chart. |
void |
addSubtitle(org.jfree.chart.title.Title subtitle)
Adds a chart subtitle, and notifies registered listeners that the chart has been modified. |
void |
clearSubtitles()
Clears all subtitles from the chart and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
java.lang.Object |
clone()
Clones the object, and takes care of listeners. |
private java.awt.geom.Rectangle2D |
createAlignedRectangle2D(org.jfree.ui.Size2D dimensions,
java.awt.geom.Rectangle2D frame,
org.jfree.ui.HorizontalAlignment hAlign,
org.jfree.ui.VerticalAlignment vAlign)
Creates a rectangle that is aligned to the frame. |
java.awt.image.BufferedImage |
createBufferedImage(int width,
int height)
Creates and returns a buffered image into which the chart has been drawn. |
java.awt.image.BufferedImage |
createBufferedImage(int width,
int height,
ChartRenderingInfo info)
Creates and returns a buffered image into which the chart has been drawn. |
java.awt.image.BufferedImage |
createBufferedImage(int imageWidth,
int imageHeight,
double drawWidth,
double drawHeight,
ChartRenderingInfo info)
Creates and returns a buffered image into which the chart has been drawn. |
java.awt.image.BufferedImage |
createBufferedImage(int width,
int height,
int imageType,
ChartRenderingInfo info)
Creates and returns a buffered image into which the chart has been drawn. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area)
Draws the chart on a Java 2D graphics device (such as the screen or a printer). |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
ChartRenderingInfo info)
Draws the chart on a Java 2D graphics device (such as the screen or a printer). |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D chartArea,
java.awt.geom.Point2D anchor,
ChartRenderingInfo info)
Draws the chart on a Java 2D graphics device (such as the screen or a printer). |
protected org.jfree.chart.entity.EntityCollection |
drawTitle(org.jfree.chart.title.Title t,
java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D area,
boolean entities)
Draws a title. |
boolean |
equals(java.lang.Object obj)
Tests this chart for equality with another object. |
void |
fireChartChanged()
Sends a default org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
boolean |
getAntiAlias()
Returns a flag that indicates whether or not anti-aliasing is used when the chart is drawn. |
java.awt.Image |
getBackgroundImage()
Returns the background image for the chart, or null if
there is no image. |
int |
getBackgroundImageAlignment()
Returns the background image alignment. |
float |
getBackgroundImageAlpha()
Returns the alpha-transparency for the chart's background image. |
java.awt.Paint |
getBackgroundPaint()
Returns the paint used for the chart background. |
java.awt.Paint |
getBorderPaint()
Returns the paint used to draw the chart border (if visible). |
java.awt.Stroke |
getBorderStroke()
Returns the stroke used to draw the chart border (if visible). |
org.jfree.chart.plot.CategoryPlot |
getCategoryPlot()
Returns the plot cast as a org.jfree.chart.plot.CategoryPlot. |
org.jfree.chart.title.LegendTitle |
getLegend()
Returns the legend for the chart, if there is one. |
org.jfree.chart.title.LegendTitle |
getLegend(int index)
Returns the nth legend for a chart, or null. |
OldLegend |
getOldLegend()
Returns the chart legend. |
org.jfree.chart.plot.Plot |
getPlot()
Returns the plot for the chart. |
java.awt.RenderingHints |
getRenderingHints()
Returns the collection of rendering hints for the chart. |
org.jfree.chart.title.Title |
getSubtitle(int index)
Returns a chart subtitle. |
int |
getSubtitleCount()
Returns the number of titles for the chart. |
java.util.List |
getSubtitles()
Returns the list of subtitles for the chart. |
org.jfree.chart.title.TextTitle |
getTitle()
Returns the main chart title. |
org.jfree.chart.plot.XYPlot |
getXYPlot()
Returns the plot cast as an org.jfree.chart.plot.XYPlot. |
void |
handleClick(int x,
int y,
ChartRenderingInfo info)
Handles a 'click' on the chart. |
boolean |
isBorderVisible()
Returns a flag that controls whether or not a border is drawn around the outside of the chart. |
boolean |
isNotify()
Returns a flag that controls whether or not change events are sent to registered listeners. |
void |
legendChanged(org.jfree.chart.event.LegendChangeEvent event)
Receives notification that the chart legend has changed, and passes this on to registered listeners. |
static void |
main(java.lang.String[] args)
Prints information about JFreeChart to standard output. |
protected void |
notifyListeners(org.jfree.chart.event.ChartChangeEvent event)
Sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
protected void |
notifyListeners(org.jfree.chart.event.ChartProgressEvent event)
Sends a org.jfree.chart.event.ChartProgressEvent to all registered listeners. |
void |
plotChanged(org.jfree.chart.event.PlotChangeEvent event)
Receives notification that the plot has changed, and passes this on to registered listeners. |
private void |
readObject(java.io.ObjectInputStream stream)
Provides serialization support. |
void |
removeChangeListener(org.jfree.chart.event.ChartChangeListener listener)
Deregisters an object for notification of changes to the chart. |
void |
removeLegend()
Removes the first legend in the chart and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
void |
removeProgressListener(org.jfree.chart.event.ChartProgressListener listener)
Deregisters an object for notification of changes to the chart. |
void |
removeSubtitle(org.jfree.chart.title.Title title)
Removes the specified subtitle and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
void |
setAntiAlias(boolean flag)
Sets a flag that indicates whether or not anti-aliasing is used when the chart is drawn. |
void |
setBackgroundImage(java.awt.Image image)
Sets the background image for the chart and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
void |
setBackgroundImageAlignment(int alignment)
Sets the background alignment. |
void |
setBackgroundImageAlpha(float alpha)
Sets the alpha-transparency for the chart's background image. |
void |
setBackgroundPaint(java.awt.Paint paint)
Sets the paint used to fill the chart background and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
void |
setBorderPaint(java.awt.Paint paint)
Sets the paint used to draw the chart border (if visible). |
void |
setBorderStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the chart border (if visible). |
void |
setBorderVisible(boolean visible)
Sets a flag that controls whether or not a border is drawn around the outside of the chart. |
void |
setNotify(boolean notify)
Sets a flag that controls whether or not listeners receive org.jfree.chart.event.ChartChangeEvent notifications. |
void |
setOldLegend(OldLegend legend)
Sets the chart legend. |
void |
setRenderingHints(java.awt.RenderingHints renderingHints)
Sets the rendering hints for the chart. |
void |
setSubtitles(java.util.List subtitles)
Sets the title list for the chart (completely replaces any existing titles). |
void |
setTitle(java.lang.String text)
Sets the chart title and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
void |
setTitle(org.jfree.chart.title.TextTitle title)
Sets the main title for the chart and sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners. |
void |
titleChanged(org.jfree.chart.event.TitleChangeEvent event)
Receives notification that a chart title has changed, and passes this on to registered listeners. |
private void |
writeObject(java.io.ObjectOutputStream stream)
Provides serialization support. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- For serialization.
- See Also:
- Constant Field Values
INFO
public static final org.jfree.ui.about.ProjectInfo INFO
- Information about the project.
DEFAULT_TITLE_FONT
public static final java.awt.Font DEFAULT_TITLE_FONT
- The default font for titles.
DEFAULT_BACKGROUND_PAINT
public static final java.awt.Paint DEFAULT_BACKGROUND_PAINT
- The default background color.
DEFAULT_BACKGROUND_IMAGE
public static final java.awt.Image DEFAULT_BACKGROUND_IMAGE
- The default background image.
DEFAULT_BACKGROUND_IMAGE_ALIGNMENT
public static final int DEFAULT_BACKGROUND_IMAGE_ALIGNMENT
- The default background image alignment.
- See Also:
- Constant Field Values
DEFAULT_BACKGROUND_IMAGE_ALPHA
public static final float DEFAULT_BACKGROUND_IMAGE_ALPHA
- The default background image alpha.
- See Also:
- Constant Field Values
renderingHints
private transient java.awt.RenderingHints renderingHints
- Rendering hints that will be used for chart drawing.
borderVisible
private boolean borderVisible
- A flag that controls whether or not the chart border is drawn.
borderStroke
private transient java.awt.Stroke borderStroke
- The stroke used to draw the chart border (if visible).
borderPaint
private transient java.awt.Paint borderPaint
- The paint used to draw the chart border (if visible).
title
private org.jfree.chart.title.TextTitle title
- The chart title (optional).
subtitles
private java.util.List subtitles
- The chart subtitles (zero, one or many).
oldLegend
private OldLegend oldLegend
- The chart legend.
plot
private org.jfree.chart.plot.Plot plot
- Draws the visual representation of the data.
backgroundPaint
private transient java.awt.Paint backgroundPaint
- Paint used to draw the background of the chart.
backgroundImage
private transient java.awt.Image backgroundImage
- An optional background image for the chart.
backgroundImageAlignment
private int backgroundImageAlignment
- The alignment for the background image.
backgroundImageAlpha
private float backgroundImageAlpha
- The alpha transparency for the background image.
changeListeners
private transient javax.swing.event.EventListenerList changeListeners
- Storage for registered change listeners.
progressListeners
private transient javax.swing.event.EventListenerList progressListeners
- Storage for registered progress listeners.
notify
private boolean notify
- A flag that can be used to enable/disable notification of chart change
events.
| Constructor Detail |
JFreeChart
public JFreeChart(org.jfree.chart.plot.Plot plot)
- Creates a new chart based on the supplied plot. The chart will have
a legend added automatically, but no title (although you can easily add
one later).
Note that the ChartFactory class contains a range of static methods that will return ready-made charts, and often this is a more convenient way to create charts than using this constructor.
JFreeChart
public JFreeChart(java.lang.String title, org.jfree.chart.plot.Plot plot)
- Creates a new chart with the given title and plot. A default font
(@link DEFAULT_TITLE_FONT) is used for the title, and the chart will
have a legend added automatically.
Note that the ChartFactory class contains a range of static methods that will return ready-made charts, and often this is a more convenient way to create charts than using this constructor.
JFreeChart
public JFreeChart(java.lang.String title, java.awt.Font titleFont, org.jfree.chart.plot.Plot plot, boolean createLegend)
- Creates a new chart with the given title and plot. The
createLegendargument specifies whether or not a legend should be added to the chart.
Note that the ChartFactory class contains a range of static methods that will return ready-made charts, and often this is a more convenient way to create charts than using this constructor.
| Method Detail |
getRenderingHints
public java.awt.RenderingHints getRenderingHints()
- Returns the collection of rendering hints for the chart.
setRenderingHints
public void setRenderingHints(java.awt.RenderingHints renderingHints)
- Sets the rendering hints for the chart. These will be added (using the
Graphics2D.addRenderingHints() method) near the start of the
JFreeChart.draw() method.
isBorderVisible
public boolean isBorderVisible()
- Returns a flag that controls whether or not a border is drawn around the
outside of the chart.
setBorderVisible
public void setBorderVisible(boolean visible)
- Sets a flag that controls whether or not a border is drawn around the
outside of the chart.
getBorderStroke
public java.awt.Stroke getBorderStroke()
- Returns the stroke used to draw the chart border (if visible).
setBorderStroke
public void setBorderStroke(java.awt.Stroke stroke)
- Sets the stroke used to draw the chart border (if visible).
getBorderPaint
public java.awt.Paint getBorderPaint()
- Returns the paint used to draw the chart border (if visible).
setBorderPaint
public void setBorderPaint(java.awt.Paint paint)
- Sets the paint used to draw the chart border (if visible).
getTitle
public org.jfree.chart.title.TextTitle getTitle()
- Returns the main chart title. Very often a chart will have just one
title, so we make this case simple by providing accessor methods for
the main title. However, multiple titles are supported - see the
addSubtitle(Title)55 method.
setTitle
public void setTitle(org.jfree.chart.title.TextTitle title)
- Sets the main title for the chart and sends a org.jfree.chart.event.ChartChangeEvent
to all registered listeners. If you do not want a title for the
chart, set it to
null. If you want more than one title on a chart, use theaddSubtitle(Title)55 method.
setTitle
public void setTitle(java.lang.String text)
- Sets the chart title and sends a org.jfree.chart.event.ChartChangeEvent to all
registered listeners. This is a convenience method that ends up calling
the
setTitle(TextTitle)55 method. If there is an existing title, its text is updated, otherwise a new title using the default font is added to the chart. Iftextisnullthe chart title is set tonull.
getLegend
public org.jfree.chart.title.LegendTitle getLegend()
- Returns the legend for the chart, if there is one. Note that a chart
can have more than one legend - this method returns the first.
getLegend
public org.jfree.chart.title.LegendTitle getLegend(int index)
- Returns the nth legend for a chart, or
null.
removeLegend
public void removeLegend()
- Removes the first legend in the chart and sends a
org.jfree.chart.event.ChartChangeEvent to all registered listeners.
getSubtitles
public java.util.List getSubtitles()
- Returns the list of subtitles for the chart.
setSubtitles
public void setSubtitles(java.util.List subtitles)
- Sets the title list for the chart (completely replaces any existing
titles).
getSubtitleCount
public int getSubtitleCount()
- Returns the number of titles for the chart.
getSubtitle
public org.jfree.chart.title.Title getSubtitle(int index)
- Returns a chart subtitle.
addSubtitle
public void addSubtitle(org.jfree.chart.title.Title subtitle)
- Adds a chart subtitle, and notifies registered listeners that the chart
has been modified.
clearSubtitles
public void clearSubtitles()
- Clears all subtitles from the chart and sends a org.jfree.chart.event.ChartChangeEvent
to all registered listeners.
removeSubtitle
public void removeSubtitle(org.jfree.chart.title.Title title)
- Removes the specified subtitle and sends a org.jfree.chart.event.ChartChangeEvent to
all registered listeners.
getOldLegend
public OldLegend getOldLegend()
- Returns the chart legend.
setOldLegend
public void setOldLegend(OldLegend legend)
- Sets the chart legend. Registered listeners are notified that the chart
has been modified. The legends chart reference is updated.
getPlot
public org.jfree.chart.plot.Plot getPlot()
- Returns the plot for the chart. The plot is a class responsible for
coordinating the visual representation of the data, including the axes
(if any).
getCategoryPlot
public org.jfree.chart.plot.CategoryPlot getCategoryPlot()
- Returns the plot cast as a org.jfree.chart.plot.CategoryPlot.
NOTE: if the plot is not an instance of org.jfree.chart.plot.CategoryPlot, then a
ClassCastExceptionis thrown.
getXYPlot
public org.jfree.chart.plot.XYPlot getXYPlot()
- Returns the plot cast as an org.jfree.chart.plot.XYPlot.
NOTE: if the plot is not an instance of org.jfree.chart.plot.XYPlot, then a
ClassCastExceptionis thrown.
getAntiAlias
public boolean getAntiAlias()
- Returns a flag that indicates whether or not anti-aliasing is used when
the chart is drawn.
setAntiAlias
public void setAntiAlias(boolean flag)
- Sets a flag that indicates whether or not anti-aliasing is used when the
chart is drawn.
Anti-aliasing usually improves the appearance of charts, but is slower.
getBackgroundPaint
public java.awt.Paint getBackgroundPaint()
- Returns the paint used for the chart background.
setBackgroundPaint
public void setBackgroundPaint(java.awt.Paint paint)
- Sets the paint used to fill the chart background and sends a
org.jfree.chart.event.ChartChangeEvent to all registered listeners.
getBackgroundImage
public java.awt.Image getBackgroundImage()
- Returns the background image for the chart, or
nullif there is no image.
setBackgroundImage
public void setBackgroundImage(java.awt.Image image)
- Sets the background image for the chart and sends a
org.jfree.chart.event.ChartChangeEvent to all registered listeners.
getBackgroundImageAlignment
public int getBackgroundImageAlignment()
- Returns the background image alignment. Alignment constants are defined
in the
org.jfree.ui.Alignclass in the JCommon class library.
setBackgroundImageAlignment
public void setBackgroundImageAlignment(int alignment)
- Sets the background alignment. Alignment options are defined by the
org.jfree.ui.Align class.
getBackgroundImageAlpha
public float getBackgroundImageAlpha()
- Returns the alpha-transparency for the chart's background image.
setBackgroundImageAlpha
public void setBackgroundImageAlpha(float alpha)
- Sets the alpha-transparency for the chart's background image.
Registered listeners are notified that the chart has been changed.
isNotify
public boolean isNotify()
- Returns a flag that controls whether or not change events are sent to
registered listeners.
setNotify
public void setNotify(boolean notify)
- Sets a flag that controls whether or not listeners receive
org.jfree.chart.event.ChartChangeEvent notifications.
draw
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area)
- Draws the chart on a Java 2D graphics device (such as the screen or a
printer).
This method is the focus of the entire JFreeChart library.
- Specified by:
drawin interfaceorg.jfree.ui.Drawable
draw
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, ChartRenderingInfo info)
- Draws the chart on a Java 2D graphics device (such as the screen or a
printer). This method is the focus of the entire JFreeChart library.
draw
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D chartArea, java.awt.geom.Point2D anchor, ChartRenderingInfo info)
- Draws the chart on a Java 2D graphics device (such as the screen or a
printer).
This method is the focus of the entire JFreeChart library.
createAlignedRectangle2D
private java.awt.geom.Rectangle2D createAlignedRectangle2D(org.jfree.ui.Size2D dimensions, java.awt.geom.Rectangle2D frame, org.jfree.ui.HorizontalAlignment hAlign, org.jfree.ui.VerticalAlignment vAlign)
- Creates a rectangle that is aligned to the frame.
drawTitle
protected org.jfree.chart.entity.EntityCollection drawTitle(org.jfree.chart.title.Title t, java.awt.Graphics2D g2, java.awt.geom.Rectangle2D area, boolean entities)
- Draws a title. The title should be drawn at the top, bottom, left or
right of the specified area, and the area should be updated to reflect
the amount of space used by the title.
createBufferedImage
public java.awt.image.BufferedImage createBufferedImage(int width, int height)
- Creates and returns a buffered image into which the chart has been drawn.
createBufferedImage
public java.awt.image.BufferedImage createBufferedImage(int width, int height, ChartRenderingInfo info)
- Creates and returns a buffered image into which the chart has been drawn.
createBufferedImage
public java.awt.image.BufferedImage createBufferedImage(int width, int height, int imageType, ChartRenderingInfo info)
- Creates and returns a buffered image into which the chart has been drawn.
createBufferedImage
public java.awt.image.BufferedImage createBufferedImage(int imageWidth, int imageHeight, double drawWidth, double drawHeight, ChartRenderingInfo info)
- Creates and returns a buffered image into which the chart has been drawn.
handleClick
public void handleClick(int x,
int y,
ChartRenderingInfo info)
- Handles a 'click' on the chart.
JFreeChart is not a UI component, so some other object (e.g. ChartPanel) needs to capture the click event and pass it onto the JFreeChart object. If you are not using JFreeChart in a client application, then this method is not required (and hopefully it doesn't get in the way).
addChangeListener
public void addChangeListener(org.jfree.chart.event.ChartChangeListener listener)
- Registers an object for notification of changes to the chart.
removeChangeListener
public void removeChangeListener(org.jfree.chart.event.ChartChangeListener listener)
- Deregisters an object for notification of changes to the chart.
fireChartChanged
public void fireChartChanged()
- Sends a default org.jfree.chart.event.ChartChangeEvent to all registered listeners.
This method is for convenience only.
notifyListeners
protected void notifyListeners(org.jfree.chart.event.ChartChangeEvent event)
- Sends a org.jfree.chart.event.ChartChangeEvent to all registered listeners.
addProgressListener
public void addProgressListener(org.jfree.chart.event.ChartProgressListener listener)
- Registers an object for notification of progress events relating to the
chart.
removeProgressListener
public void removeProgressListener(org.jfree.chart.event.ChartProgressListener listener)
- Deregisters an object for notification of changes to the chart.
notifyListeners
protected void notifyListeners(org.jfree.chart.event.ChartProgressEvent event)
- Sends a org.jfree.chart.event.ChartProgressEvent to all registered listeners.
titleChanged
public void titleChanged(org.jfree.chart.event.TitleChangeEvent event)
- Receives notification that a chart title has changed, and passes this
on to registered listeners.
- Specified by:
titleChangedin interfaceorg.jfree.chart.event.TitleChangeListener
legendChanged
public void legendChanged(org.jfree.chart.event.LegendChangeEvent event)
- Receives notification that the chart legend has changed, and passes this
on to registered listeners.
- Specified by:
legendChangedin interfaceorg.jfree.chart.event.LegendChangeListener
plotChanged
public void plotChanged(org.jfree.chart.event.PlotChangeEvent event)
- Receives notification that the plot has changed, and passes this on to
registered listeners.
- Specified by:
plotChangedin interfaceorg.jfree.chart.event.PlotChangeListener
equals
public boolean equals(java.lang.Object obj)
- Tests this chart for equality with another object.
writeObject
private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException
- Provides serialization support.
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
- Provides serialization support.
main
public static void main(java.lang.String[] args)
- Prints information about JFreeChart to standard output.
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Clones the object, and takes care of listeners.
Note: caller shall register its own listeners on cloned graph.
|
|||||||||
| Home >> All >> org >> jfree >> [ chart overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jfree.chart.JFreeChart