Java Doc for JFreeChart.java in  » Chart » jfreechart » org » jfree » chart » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jfreechart » org.jfree.chart 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.chart.JFreeChart

JFreeChart
public class JFreeChart implements Drawable,TitleChangeListener,PlotChangeListener,Serializable,Cloneable(Code)
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 Title objects (which often includes the chart's legend), a Plot and a org.jfree.data.general.Dataset (the plot in turn manages a domain axis and a range axis).

You should use a ChartPanel to display a chart in a GUI.

The ChartFactory class contains static methods for creating 'ready-made' charts.
See Also:   ChartPanel
See Also:   ChartFactory
See Also:   Title
See Also:   Plot



Field Summary
final public static  ImageDEFAULT_BACKGROUND_IMAGE
     The default background image.
final public static  intDEFAULT_BACKGROUND_IMAGE_ALIGNMENT
     The default background image alignment.
final public static  floatDEFAULT_BACKGROUND_IMAGE_ALPHA
     The default background image alpha.
final public static  PaintDEFAULT_BACKGROUND_PAINT
     The default background color.
final public static  FontDEFAULT_TITLE_FONT
     The default font for titles.
final public static  ProjectInfoINFO
     Information about the project.

Constructor Summary
public  JFreeChart(Plot plot)
     Creates a new chart based on the supplied plot.
public  JFreeChart(String title, Plot plot)
     Creates a new chart with the given title and plot.
public  JFreeChart(String title, Font titleFont, Plot plot, boolean createLegend)
     Creates a new chart with the given title and plot.

Method Summary
public  voidaddChangeListener(ChartChangeListener listener)
     Registers an object for notification of changes to the chart.
public  voidaddLegend(LegendTitle legend)
     Adds a legend to the plot and sends a ChartChangeEvent to all registered listeners.
public  voidaddProgressListener(ChartProgressListener listener)
     Registers an object for notification of progress events relating to the chart.
public  voidaddSubtitle(Title subtitle)
     Adds a chart subtitle, and notifies registered listeners that the chart has been modified.
public  voidaddSubtitle(int index, Title subtitle)
     Adds a subtitle at a particular position in the subtitle list, and sends a ChartChangeEvent to all registered listeners.
public  voidclearSubtitles()
     Clears all subtitles from the chart and sends a ChartChangeEvent to all registered listeners.
public  Objectclone()
     Clones the object, and takes care of listeners.
public  BufferedImagecreateBufferedImage(int width, int height)
     Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  width - the width.
Parameters:
  height - the height.
public  BufferedImagecreateBufferedImage(int width, int height, ChartRenderingInfo info)
     Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  width - the width.
Parameters:
  height - the height.
Parameters:
  info - carries back chart state information (null permitted).
public  BufferedImagecreateBufferedImage(int width, int height, int imageType, ChartRenderingInfo info)
     Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  width - the width.
Parameters:
  height - the height.
Parameters:
  imageType - the image type.
Parameters:
  info - carries back chart state information (null permitted).
public  BufferedImagecreateBufferedImage(int imageWidth, int imageHeight, double drawWidth, double drawHeight, ChartRenderingInfo info)
     Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  imageWidth - the image width.
Parameters:
  imageHeight - the image height.
Parameters:
  drawWidth - the width for drawing the chart (will be scaled to fit image).
Parameters:
  drawHeight - the height for drawing the chart (will be scaled to fit image).
Parameters:
  info - optional object for collection chart dimension and entity information.
public  voiddraw(Graphics2D g2, Rectangle2D area)
     Draws the chart on a Java 2D graphics device (such as the screen or a printer).
public  voiddraw(Graphics2D g2, Rectangle2D area, ChartRenderingInfo info)
     Draws the chart on a Java 2D graphics device (such as the screen or a printer).
public  voiddraw(Graphics2D g2, Rectangle2D chartArea, Point2D anchor, ChartRenderingInfo info)
     Draws the chart on a Java 2D graphics device (such as the screen or a printer).
protected  EntityCollectiondrawTitle(Title t, Graphics2D g2, Rectangle2D area, boolean entities)
     Draws a title.
public  booleanequals(Object obj)
     Tests this chart for equality with another object.
Parameters:
  obj - the object (null permitted).
public  voidfireChartChanged()
     Sends a default ChartChangeEvent to all registered listeners.
public  booleangetAntiAlias()
     Returns a flag that indicates whether or not anti-aliasing is used when the chart is drawn.
public  ImagegetBackgroundImage()
     Returns the background image for the chart, or null if there is no image.
public  intgetBackgroundImageAlignment()
     Returns the background image alignment.
public  floatgetBackgroundImageAlpha()
     Returns the alpha-transparency for the chart's background image.
public  PaintgetBackgroundPaint()
     Returns the paint used for the chart background.
public  PaintgetBorderPaint()
     Returns the paint used to draw the chart border (if visible).
public  StrokegetBorderStroke()
     Returns the stroke used to draw the chart border (if visible).
public  CategoryPlotgetCategoryPlot()
     Returns the plot cast as a CategoryPlot .
public  LegendTitlegetLegend()
     Returns the legend for the chart, if there is one.
public  LegendTitlegetLegend(int index)
     Returns the nth legend for a chart, or null.
Parameters:
  index - the legend index (zero-based).
public  RectangleInsetsgetPadding()
     Returns the padding between the chart border and the chart drawing area.
public  PlotgetPlot()
     Returns the plot for the chart.
public  RenderingHintsgetRenderingHints()
     Returns the collection of rendering hints for the chart.
public  TitlegetSubtitle(int index)
     Returns a chart subtitle.
Parameters:
  index - the index of the chart subtitle (zero based).
public  intgetSubtitleCount()
     Returns the number of titles for the chart.
public  ListgetSubtitles()
     Returns the list of subtitles for the chart.
public  ObjectgetTextAntiAlias()
     Returns the current value stored in the rendering hints table for RenderingHints.KEY_TEXT_ANTIALIASING .
public  TextTitlegetTitle()
     Returns the main chart title.
public  XYPlotgetXYPlot()
     Returns the plot cast as an XYPlot .
public  voidhandleClick(int x, int y, ChartRenderingInfo info)
     Handles a 'click' on the chart.

JFreeChart is not a UI component, so some other object (e.g.

public  booleanisBorderVisible()
     Returns a flag that controls whether or not a border is drawn around the outside of the chart.
public  booleanisNotify()
     Returns a flag that controls whether or not change events are sent to registered listeners.
public static  voidmain(String[] args)
     Prints information about JFreeChart to standard output.
protected  voidnotifyListeners(ChartChangeEvent event)
     Sends a ChartChangeEvent to all registered listeners.
protected  voidnotifyListeners(ChartProgressEvent event)
     Sends a ChartProgressEvent to all registered listeners.
public  voidplotChanged(PlotChangeEvent event)
     Receives notification that the plot has changed, and passes this on to registered listeners.
public  voidremoveChangeListener(ChartChangeListener listener)
     Deregisters an object for notification of changes to the chart.
public  voidremoveLegend()
     Removes the first legend in the chart and sends a ChartChangeEvent to all registered listeners.
public  voidremoveProgressListener(ChartProgressListener listener)
     Deregisters an object for notification of changes to the chart.
public  voidremoveSubtitle(Title title)
     Removes the specified subtitle and sends a ChartChangeEvent to all registered listeners.
public  voidsetAntiAlias(boolean flag)
     Sets a flag that indicates whether or not anti-aliasing is used when the chart is drawn.
public  voidsetBackgroundImage(Image image)
     Sets the background image for the chart and sends a ChartChangeEvent to all registered listeners.
public  voidsetBackgroundImageAlignment(int alignment)
     Sets the background alignment.
public  voidsetBackgroundImageAlpha(float alpha)
     Sets the alpha-transparency for the chart's background image.
public  voidsetBackgroundPaint(Paint paint)
     Sets the paint used to fill the chart background and sends a ChartChangeEvent to all registered listeners.
public  voidsetBorderPaint(Paint paint)
     Sets the paint used to draw the chart border (if visible).
public  voidsetBorderStroke(Stroke stroke)
     Sets the stroke used to draw the chart border (if visible).
public  voidsetBorderVisible(boolean visible)
     Sets a flag that controls whether or not a border is drawn around the outside of the chart.
public  voidsetNotify(boolean notify)
     Sets a flag that controls whether or not listeners receive ChartChangeEvent notifications.
public  voidsetPadding(RectangleInsets padding)
     Sets the padding between the chart border and the chart drawing area, and sends a ChartChangeEvent to all registered listeners.
public  voidsetRenderingHints(RenderingHints renderingHints)
     Sets the rendering hints for the chart.
public  voidsetSubtitles(List subtitles)
     Sets the title list for the chart (completely replaces any existing titles) and sends a ChartChangeEvent to all registered listeners.
public  voidsetTextAntiAlias(boolean flag)
     Sets the value in the rendering hints table for RenderingHints.KEY_TEXT_ANTIALIASING to either RenderingHints.VALUE_TEXT_ANTIALIAS_ON or RenderingHints.VALUE_TEXT_ANTIALIAS_OFF , then sends a ChartChangeEvent to all registered listeners.
public  voidsetTextAntiAlias(Object val)
     Sets the value in the rendering hints table for RenderingHints.KEY_TEXT_ANTIALIASING and sends a ChartChangeEvent to all registered listeners.
public  voidsetTitle(TextTitle title)
     Sets the main title for the chart and sends a ChartChangeEvent to all registered listeners.
public  voidsetTitle(String text)
     Sets the chart title and sends a ChartChangeEvent to all registered listeners.
public  voidtitleChanged(TitleChangeEvent event)
     Receives notification that a chart title has changed, and passes this on to registered listeners.

Field Detail
DEFAULT_BACKGROUND_IMAGE
final public static Image DEFAULT_BACKGROUND_IMAGE(Code)
The default background image.



DEFAULT_BACKGROUND_IMAGE_ALIGNMENT
final public static int DEFAULT_BACKGROUND_IMAGE_ALIGNMENT(Code)
The default background image alignment.



DEFAULT_BACKGROUND_IMAGE_ALPHA
final public static float DEFAULT_BACKGROUND_IMAGE_ALPHA(Code)
The default background image alpha.



DEFAULT_BACKGROUND_PAINT
final public static Paint DEFAULT_BACKGROUND_PAINT(Code)
The default background color.



DEFAULT_TITLE_FONT
final public static Font DEFAULT_TITLE_FONT(Code)
The default font for titles.



INFO
final public static ProjectInfo INFO(Code)
Information about the project.




Constructor Detail
JFreeChart
public JFreeChart(Plot plot)(Code)
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.
Parameters:
  plot - the plot (null not permitted).



JFreeChart
public JFreeChart(String title, Plot plot)(Code)
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.
Parameters:
  title - the chart title (null permitted).
Parameters:
  plot - the plot (null not permitted).



JFreeChart
public JFreeChart(String title, Font titleFont, Plot plot, boolean createLegend)(Code)
Creates a new chart with the given title and plot. The createLegend argument 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.
Parameters:
  title - the chart title (null permitted).
Parameters:
  titleFont - the font for displaying the chart title (null permitted).
Parameters:
  plot - controller of the visual representation of the data (null not permitted).
Parameters:
  createLegend - a flag indicating whether or not a legend should be created for the chart.




Method Detail
addChangeListener
public void addChangeListener(ChartChangeListener listener)(Code)
Registers an object for notification of changes to the chart.
Parameters:
  listener - the listener (null not permitted).
See Also:   JFreeChart.removeChangeListener(ChartChangeListener)



addLegend
public void addLegend(LegendTitle legend)(Code)
Adds a legend to the plot and sends a ChartChangeEvent to all registered listeners.
Parameters:
  legend - the legend (null not permitted).
See Also:   JFreeChart.removeLegend()



addProgressListener
public void addProgressListener(ChartProgressListener listener)(Code)
Registers an object for notification of progress events relating to the chart.
Parameters:
  listener - the object being registered.
See Also:   JFreeChart.removeProgressListener(ChartProgressListener)



addSubtitle
public void addSubtitle(Title subtitle)(Code)
Adds a chart subtitle, and notifies registered listeners that the chart has been modified.
Parameters:
  subtitle - the subtitle (null not permitted).
See Also:   JFreeChart.getSubtitle(int)



addSubtitle
public void addSubtitle(int index, Title subtitle)(Code)
Adds a subtitle at a particular position in the subtitle list, and sends a ChartChangeEvent to all registered listeners.
Parameters:
  index - the index (in the range 0 to JFreeChart.getSubtitleCount()).
Parameters:
  subtitle - the subtitle to add (null not permitted).
since:
   1.0.6



clearSubtitles
public void clearSubtitles()(Code)
Clears all subtitles from the chart and sends a ChartChangeEvent to all registered listeners.
See Also:   JFreeChart.addSubtitle(Title)



clone
public Object clone() throws CloneNotSupportedException(Code)
Clones the object, and takes care of listeners. Note: caller shall register its own listeners on cloned graph. A clone.
throws:
  CloneNotSupportedException - if the chart is not cloneable.



createBufferedImage
public BufferedImage createBufferedImage(int width, int height)(Code)
Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  width - the width.
Parameters:
  height - the height. A buffered image.



createBufferedImage
public BufferedImage createBufferedImage(int width, int height, ChartRenderingInfo info)(Code)
Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  width - the width.
Parameters:
  height - the height.
Parameters:
  info - carries back chart state information (null permitted). A buffered image.



createBufferedImage
public BufferedImage createBufferedImage(int width, int height, int imageType, ChartRenderingInfo info)(Code)
Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  width - the width.
Parameters:
  height - the height.
Parameters:
  imageType - the image type.
Parameters:
  info - carries back chart state information (null permitted). A buffered image.



createBufferedImage
public BufferedImage createBufferedImage(int imageWidth, int imageHeight, double drawWidth, double drawHeight, ChartRenderingInfo info)(Code)
Creates and returns a buffered image into which the chart has been drawn.
Parameters:
  imageWidth - the image width.
Parameters:
  imageHeight - the image height.
Parameters:
  drawWidth - the width for drawing the chart (will be scaled to fit image).
Parameters:
  drawHeight - the height for drawing the chart (will be scaled to fit image).
Parameters:
  info - optional object for collection chart dimension and entity information. A buffered image.



draw
public void draw(Graphics2D g2, Rectangle2D area)(Code)
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.
Parameters:
  g2 - the graphics device.
Parameters:
  area - the area within which the chart should be drawn.




draw
public void draw(Graphics2D g2, Rectangle2D area, ChartRenderingInfo info)(Code)
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.
Parameters:
  g2 - the graphics device.
Parameters:
  area - the area within which the chart should be drawn.
Parameters:
  info - records info about the drawing (null means collect no info).



draw
public void draw(Graphics2D g2, Rectangle2D chartArea, Point2D anchor, ChartRenderingInfo info)(Code)
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.
Parameters:
  g2 - the graphics device.
Parameters:
  chartArea - the area within which the chart should be drawn.
Parameters:
  anchor - the anchor point (in Java2D space) for the chart (null permitted).
Parameters:
  info - records info about the drawing (null means collect no info).




drawTitle
protected EntityCollection drawTitle(Title t, Graphics2D g2, Rectangle2D area, boolean entities)(Code)
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.
Parameters:
  t - the title (null not permitted).
Parameters:
  g2 - the graphics device (null not permitted).
Parameters:
  area - the chart area, excluding any existing titles (null not permitted).
Parameters:
  entities - a flag that controls whether or not an entity collection is returned for the title. An entity collection for the title (possibly null).



equals
public boolean equals(Object obj)(Code)
Tests this chart for equality with another object.
Parameters:
  obj - the object (null permitted). A boolean.



fireChartChanged
public void fireChartChanged()(Code)
Sends a default ChartChangeEvent to all registered listeners.

This method is for convenience only.




getAntiAlias
public boolean getAntiAlias()(Code)
Returns a flag that indicates whether or not anti-aliasing is used when the chart is drawn. The flag.
See Also:   JFreeChart.setAntiAlias(boolean)



getBackgroundImage
public Image getBackgroundImage()(Code)
Returns the background image for the chart, or null if there is no image. The image (possibly null).
See Also:   JFreeChart.setBackgroundImage(Image)



getBackgroundImageAlignment
public int getBackgroundImageAlignment()(Code)
Returns the background image alignment. Alignment constants are defined in the org.jfree.ui.Align class in the JCommon class library. The alignment.
See Also:   JFreeChart.setBackgroundImageAlignment(int)



getBackgroundImageAlpha
public float getBackgroundImageAlpha()(Code)
Returns the alpha-transparency for the chart's background image. The alpha-transparency.
See Also:   JFreeChart.setBackgroundImageAlpha(float)



getBackgroundPaint
public Paint getBackgroundPaint()(Code)
Returns the paint used for the chart background. The paint (possibly null).
See Also:   JFreeChart.setBackgroundPaint(Paint)



getBorderPaint
public Paint getBorderPaint()(Code)
Returns the paint used to draw the chart border (if visible). The border paint.
See Also:   JFreeChart.setBorderPaint(Paint)



getBorderStroke
public Stroke getBorderStroke()(Code)
Returns the stroke used to draw the chart border (if visible). The border stroke.
See Also:   JFreeChart.setBorderStroke(Stroke)



getCategoryPlot
public CategoryPlot getCategoryPlot()(Code)
Returns the plot cast as a CategoryPlot .

NOTE: if the plot is not an instance of CategoryPlot , then a ClassCastException is thrown. The plot.
See Also:   JFreeChart.getPlot()




getLegend
public LegendTitle getLegend()(Code)
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. The legend (possibly null).
See Also:   JFreeChart.getLegend(int)



getLegend
public LegendTitle getLegend(int index)(Code)
Returns the nth legend for a chart, or null.
Parameters:
  index - the legend index (zero-based). The legend (possibly null).
See Also:   JFreeChart.addLegend(LegendTitle)



getPadding
public RectangleInsets getPadding()(Code)
Returns the padding between the chart border and the chart drawing area. The padding (never null).
See Also:   JFreeChart.setPadding(RectangleInsets)



getPlot
public Plot getPlot()(Code)
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). The plot.



getRenderingHints
public RenderingHints getRenderingHints()(Code)
Returns the collection of rendering hints for the chart. The rendering hints for the chart (never null).
See Also:   JFreeChart.setRenderingHints(RenderingHints)



getSubtitle
public Title getSubtitle(int index)(Code)
Returns a chart subtitle.
Parameters:
  index - the index of the chart subtitle (zero based). A chart subtitle.
See Also:   JFreeChart.addSubtitle(Title)



getSubtitleCount
public int getSubtitleCount()(Code)
Returns the number of titles for the chart. The number of titles for the chart.
See Also:   JFreeChart.getSubtitles()



getSubtitles
public List getSubtitles()(Code)
Returns the list of subtitles for the chart. The subtitle list (possibly empty, but never null).
See Also:   JFreeChart.setSubtitles(List)



getTextAntiAlias
public Object getTextAntiAlias()(Code)
Returns the current value stored in the rendering hints table for RenderingHints.KEY_TEXT_ANTIALIASING . The hint value (possibly null).
since:
   1.0.5
See Also:   JFreeChart.setTextAntiAlias(Object)



getTitle
public TextTitle getTitle()(Code)
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 JFreeChart.addSubtitle(Title) method. The chart title (possibly null).
See Also:   JFreeChart.setTitle(TextTitle)



getXYPlot
public XYPlot getXYPlot()(Code)
Returns the plot cast as an XYPlot .

NOTE: if the plot is not an instance of XYPlot , then a ClassCastException is thrown. The plot.
See Also:   JFreeChart.getPlot()




handleClick
public void handleClick(int x, int y, ChartRenderingInfo info)(Code)
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).
Parameters:
  x - x-coordinate of the click (in Java2D space).
Parameters:
  y - y-coordinate of the click (in Java2D space).
Parameters:
  info - contains chart dimension and entity information.




isBorderVisible
public boolean isBorderVisible()(Code)
Returns a flag that controls whether or not a border is drawn around the outside of the chart. A boolean.
See Also:   JFreeChart.setBorderVisible(boolean)



isNotify
public boolean isNotify()(Code)
Returns a flag that controls whether or not change events are sent to registered listeners. A boolean.
See Also:   JFreeChart.setNotify(boolean)



main
public static void main(String[] args)(Code)
Prints information about JFreeChart to standard output.
Parameters:
  args - no arguments are honored.



notifyListeners
protected void notifyListeners(ChartChangeEvent event)(Code)
Sends a ChartChangeEvent to all registered listeners.
Parameters:
  event - information about the event that triggered the notification.



notifyListeners
protected void notifyListeners(ChartProgressEvent event)(Code)
Sends a ChartProgressEvent to all registered listeners.
Parameters:
  event - information about the event that triggered the notification.



plotChanged
public void plotChanged(PlotChangeEvent event)(Code)
Receives notification that the plot has changed, and passes this on to registered listeners.
Parameters:
  event - information about the plot change.



removeChangeListener
public void removeChangeListener(ChartChangeListener listener)(Code)
Deregisters an object for notification of changes to the chart.
Parameters:
  listener - the listener (null not permitted)
See Also:   JFreeChart.addChangeListener(ChartChangeListener)



removeLegend
public void removeLegend()(Code)
Removes the first legend in the chart and sends a ChartChangeEvent to all registered listeners.
See Also:   JFreeChart.getLegend()



removeProgressListener
public void removeProgressListener(ChartProgressListener listener)(Code)
Deregisters an object for notification of changes to the chart.
Parameters:
  listener - the object being deregistered.
See Also:   JFreeChart.addProgressListener(ChartProgressListener)



removeSubtitle
public void removeSubtitle(Title title)(Code)
Removes the specified subtitle and sends a ChartChangeEvent to all registered listeners.
Parameters:
  title - the title.
See Also:   JFreeChart.addSubtitle(Title)



setAntiAlias
public void setAntiAlias(boolean flag)(Code)
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.
Parameters:
  flag - the new value of the flag.
See Also:   JFreeChart.getAntiAlias()




setBackgroundImage
public void setBackgroundImage(Image image)(Code)
Sets the background image for the chart and sends a ChartChangeEvent to all registered listeners.
Parameters:
  image - the image (null permitted).
See Also:   JFreeChart.getBackgroundImage()



setBackgroundImageAlignment
public void setBackgroundImageAlignment(int alignment)(Code)
Sets the background alignment. Alignment options are defined by the org.jfree.ui.Align class.
Parameters:
  alignment - the alignment.
See Also:   JFreeChart.getBackgroundImageAlignment()



setBackgroundImageAlpha
public void setBackgroundImageAlpha(float alpha)(Code)
Sets the alpha-transparency for the chart's background image. Registered listeners are notified that the chart has been changed.
Parameters:
  alpha - the alpha value.
See Also:   JFreeChart.getBackgroundImageAlpha()



setBackgroundPaint
public void setBackgroundPaint(Paint paint)(Code)
Sets the paint used to fill the chart background and sends a ChartChangeEvent to all registered listeners.
Parameters:
  paint - the paint (null permitted).
See Also:   JFreeChart.getBackgroundPaint()



setBorderPaint
public void setBorderPaint(Paint paint)(Code)
Sets the paint used to draw the chart border (if visible).
Parameters:
  paint - the paint.
See Also:   JFreeChart.getBorderPaint()



setBorderStroke
public void setBorderStroke(Stroke stroke)(Code)
Sets the stroke used to draw the chart border (if visible).
Parameters:
  stroke - the stroke.
See Also:   JFreeChart.getBorderStroke()



setBorderVisible
public void setBorderVisible(boolean visible)(Code)
Sets a flag that controls whether or not a border is drawn around the outside of the chart.
Parameters:
  visible - the flag.
See Also:   JFreeChart.isBorderVisible()



setNotify
public void setNotify(boolean notify)(Code)
Sets a flag that controls whether or not listeners receive ChartChangeEvent notifications.
Parameters:
  notify - a boolean.
See Also:   JFreeChart.isNotify()



setPadding
public void setPadding(RectangleInsets padding)(Code)
Sets the padding between the chart border and the chart drawing area, and sends a ChartChangeEvent to all registered listeners.
Parameters:
  padding - the padding (null not permitted).
See Also:   JFreeChart.getPadding()



setRenderingHints
public void setRenderingHints(RenderingHints renderingHints)(Code)
Sets the rendering hints for the chart. These will be added (using the Graphics2D.addRenderingHints() method) near the start of the JFreeChart.draw() method.
Parameters:
  renderingHints - the rendering hints (null not permitted).
See Also:   JFreeChart.getRenderingHints()



setSubtitles
public void setSubtitles(List subtitles)(Code)
Sets the title list for the chart (completely replaces any existing titles) and sends a ChartChangeEvent to all registered listeners.
Parameters:
  subtitles - the new list of subtitles (null not permitted).
See Also:   JFreeChart.getSubtitles()



setTextAntiAlias
public void setTextAntiAlias(boolean flag)(Code)
Sets the value in the rendering hints table for RenderingHints.KEY_TEXT_ANTIALIASING to either RenderingHints.VALUE_TEXT_ANTIALIAS_ON or RenderingHints.VALUE_TEXT_ANTIALIAS_OFF , then sends a ChartChangeEvent to all registered listeners.
Parameters:
  flag -
since:
   1.0.5
See Also:   JFreeChart.getTextAntiAlias()
See Also:   JFreeChart.setTextAntiAlias(Object)



setTextAntiAlias
public void setTextAntiAlias(Object val)(Code)
Sets the value in the rendering hints table for RenderingHints.KEY_TEXT_ANTIALIASING and sends a ChartChangeEvent to all registered listeners.
Parameters:
  val - the new value (null permitted).
since:
   1.0.5
See Also:   JFreeChart.getTextAntiAlias()
See Also:   JFreeChart.setTextAntiAlias(boolean)



setTitle
public void setTitle(TextTitle title)(Code)
Sets the main title for the chart and sends a 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 the JFreeChart.addSubtitle(Title) method.
Parameters:
  title - the title (null permitted).
See Also:   JFreeChart.getTitle()



setTitle
public void setTitle(String text)(Code)
Sets the chart title and sends a ChartChangeEvent to all registered listeners. This is a convenience method that ends up calling the JFreeChart.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.
Parameters:
  text - the title text (null permitted).
See Also:   JFreeChart.getTitle()



titleChanged
public void titleChanged(TitleChangeEvent event)(Code)
Receives notification that a chart title has changed, and passes this on to registered listeners.
Parameters:
  event - information about the chart title change.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.