Java Doc for ChartUtilities.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.ChartUtilities

ChartUtilities
abstract public class ChartUtilities (Code)
A collection of utility methods for JFreeChart. Includes methods for converting charts to image formats (PNG and JPEG) plus creating simple HTML image maps.
See Also:   ImageMapUtilities




Method Summary
public static  byte[]encodeAsPNG(BufferedImage image)
     Encodes a BufferedImage to PNG format.
Parameters:
  image - the image (null not permitted).
public static  byte[]encodeAsPNG(BufferedImage image, boolean encodeAlpha, int compression)
     Encodes a BufferedImage to PNG format.
Parameters:
  image - the image (null not permitted).
Parameters:
  encodeAlpha - encode alpha?
Parameters:
  compression - the PNG compression level (0-9).
public static  StringgetImageMap(String name, ChartRenderingInfo info)
     Creates an HTML image map.
public static  StringgetImageMap(String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)
     Creates an HTML image map.
public static  voidsaveChartAsJPEG(File file, JFreeChart chart, int width, int height)
     Saves a chart to a file in JPEG format.
public static  voidsaveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height)
     Saves a chart to a file in JPEG format.
public static  voidsaveChartAsJPEG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info)
     Saves a chart to a file in JPEG format.
public static  voidsaveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height, ChartRenderingInfo info)
     Saves a chart to a file in JPEG format.
public static  voidsaveChartAsPNG(File file, JFreeChart chart, int width, int height)
     Saves a chart to the specified file in PNG format.
public static  voidsaveChartAsPNG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info)
     Saves a chart to a file in PNG format.
public static  voidsaveChartAsPNG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info, boolean encodeAlpha, int compression)
     Saves a chart to a file in PNG format.
public static  voidwriteBufferedImageAsJPEG(OutputStream out, BufferedImage image)
     Writes a BufferedImage to an output stream in JPEG format.
public static  voidwriteBufferedImageAsJPEG(OutputStream out, float quality, BufferedImage image)
     Writes a BufferedImage to an output stream in JPEG format.
public static  voidwriteBufferedImageAsPNG(OutputStream out, BufferedImage image)
     Writes a BufferedImage to an output stream in PNG format.
public static  voidwriteBufferedImageAsPNG(OutputStream out, BufferedImage image, boolean encodeAlpha, int compression)
     Writes a BufferedImage to an output stream in PNG format.
public static  voidwriteChartAsJPEG(OutputStream out, JFreeChart chart, int width, int height)
     Writes a chart to an output stream in JPEG format.
public static  voidwriteChartAsJPEG(OutputStream out, float quality, JFreeChart chart, int width, int height)
     Writes a chart to an output stream in JPEG format.
public static  voidwriteChartAsJPEG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info)
     Writes a chart to an output stream in JPEG format.
public static  voidwriteChartAsJPEG(OutputStream out, float quality, JFreeChart chart, int width, int height, ChartRenderingInfo info)
     Writes a chart to an output stream in JPEG format.
public static  voidwriteChartAsPNG(OutputStream out, JFreeChart chart, int width, int height)
     Writes a chart to an output stream in PNG format.
public static  voidwriteChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, boolean encodeAlpha, int compression)
     Writes a chart to an output stream in PNG format.
public static  voidwriteChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info)
     Writes a chart to an output stream in PNG format.
public static  voidwriteChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info, boolean encodeAlpha, int compression)
     Writes a chart to an output stream in PNG format.
public static  voidwriteImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips)
     Writes an image map to an output stream.
public static  voidwriteImageMap(PrintWriter writer, String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)
     Writes an image map to the specified writer.
public static  voidwriteScaledChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor)
     Writes a scaled version of a chart to an output stream in PNG format.



Method Detail
encodeAsPNG
public static byte[] encodeAsPNG(BufferedImage image) throws IOException(Code)
Encodes a BufferedImage to PNG format.
Parameters:
  image - the image (null not permitted). A byte array in PNG format.
throws:
  IOException - if there is an I/O problem.



encodeAsPNG
public static byte[] encodeAsPNG(BufferedImage image, boolean encodeAlpha, int compression) throws IOException(Code)
Encodes a BufferedImage to PNG format.
Parameters:
  image - the image (null not permitted).
Parameters:
  encodeAlpha - encode alpha?
Parameters:
  compression - the PNG compression level (0-9). The byte array in PNG format.
throws:
  IOException - if there is an I/O problem.



getImageMap
public static String getImageMap(String name, ChartRenderingInfo info)(Code)
Creates an HTML image map. This method maps to ImageMapUtilities.getImageMap(StringChartRenderingInfoToolTipTagFragmentGeneratorURLTagFragmentGenerator) , using default generators.
Parameters:
  name - the map name (null not permitted).
Parameters:
  info - the chart rendering info (null not permitted). The map tag.



getImageMap
public static String getImageMap(String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator)(Code)
Creates an HTML image map. This method maps directly to ImageMapUtilities.getImageMap(StringChartRenderingInfoToolTipTagFragmentGeneratorURLTagFragmentGenerator) .
Parameters:
  name - the map name (null not permitted).
Parameters:
  info - the chart rendering info (null not permitted).
Parameters:
  toolTipTagFragmentGenerator - a generator for the HTML fragmentthat will contain the tooltip text (null not permitted if info contains tooltip information).
Parameters:
  urlTagFragmentGenerator - a generator for the HTML fragment thatwill contain the URL reference (null not permitted if info contains URLs). The map tag.



saveChartAsJPEG
public static void saveChartAsJPEG(File file, JFreeChart chart, int width, int height) throws IOException(Code)
Saves a chart to a file in JPEG format.
Parameters:
  file - the file (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
throws:
  IOException - if there are any I/O errors.



saveChartAsJPEG
public static void saveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height) throws IOException(Code)
Saves a chart to a file in JPEG format.
Parameters:
  file - the file (null not permitted).
Parameters:
  quality - the JPEG quality setting.
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
throws:
  IOException - if there are any I/O errors.



saveChartAsJPEG
public static void saveChartAsJPEG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException(Code)
Saves a chart to a file in JPEG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  file - the file name (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
throws:
  IOException - if there are any I/O errors.



saveChartAsJPEG
public static void saveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException(Code)
Saves a chart to a file in JPEG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  file - the file name (null not permitted).
Parameters:
  quality - the quality setting.
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
throws:
  IOException - if there are any I/O errors.



saveChartAsPNG
public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height) throws IOException(Code)
Saves a chart to the specified file in PNG format.
Parameters:
  file - the file name (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
throws:
  IOException - if there are any I/O errors.



saveChartAsPNG
public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException(Code)
Saves a chart to a file in PNG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  file - the file (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
throws:
  IOException - if there are any I/O errors.



saveChartAsPNG
public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info, boolean encodeAlpha, int compression) throws IOException(Code)
Saves a chart to a file in PNG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  file - the file (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
Parameters:
  encodeAlpha - encode alpha?
Parameters:
  compression - the PNG compression level (0-9).
throws:
  IOException - if there are any I/O errors.



writeBufferedImageAsJPEG
public static void writeBufferedImageAsJPEG(OutputStream out, BufferedImage image) throws IOException(Code)
Writes a BufferedImage to an output stream in JPEG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  image - the image (null not permitted).
throws:
  IOException - if there are any I/O errors.



writeBufferedImageAsJPEG
public static void writeBufferedImageAsJPEG(OutputStream out, float quality, BufferedImage image) throws IOException(Code)
Writes a BufferedImage to an output stream in JPEG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  quality - the image quality (0.0f to 1.0f).
Parameters:
  image - the image (null not permitted).
throws:
  IOException - if there are any I/O errors.



writeBufferedImageAsPNG
public static void writeBufferedImageAsPNG(OutputStream out, BufferedImage image) throws IOException(Code)
Writes a BufferedImage to an output stream in PNG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  image - the image (null not permitted).
throws:
  IOException - if there are any I/O errors.



writeBufferedImageAsPNG
public static void writeBufferedImageAsPNG(OutputStream out, BufferedImage image, boolean encodeAlpha, int compression) throws IOException(Code)
Writes a BufferedImage to an output stream in PNG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  image - the image (null not permitted).
Parameters:
  encodeAlpha - encode alpha?
Parameters:
  compression - the compression level (0-9).
throws:
  IOException - if there are any I/O errors.



writeChartAsJPEG
public static void writeChartAsJPEG(OutputStream out, JFreeChart chart, int width, int height) throws IOException(Code)
Writes a chart to an output stream in JPEG format. Please note that JPEG is a poor format for chart images, use PNG if possible.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
throws:
  IOException - if there are any I/O errors.



writeChartAsJPEG
public static void writeChartAsJPEG(OutputStream out, float quality, JFreeChart chart, int width, int height) throws IOException(Code)
Writes a chart to an output stream in JPEG format. Please note that JPEG is a poor format for chart images, use PNG if possible.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  quality - the quality setting.
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
throws:
  IOException - if there are any I/O errors.



writeChartAsJPEG
public static void writeChartAsJPEG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException(Code)
Writes a chart to an output stream in JPEG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
throws:
  IOException - if there are any I/O errors.



writeChartAsJPEG
public static void writeChartAsJPEG(OutputStream out, float quality, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException(Code)
Writes a chart to an output stream in JPEG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  quality - the output quality (0.0f to 1.0f).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
throws:
  IOException - if there are any I/O errors.



writeChartAsPNG
public static void writeChartAsPNG(OutputStream out, JFreeChart chart, int width, int height) throws IOException(Code)
Writes a chart to an output stream in PNG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
throws:
  IOException - if there are any I/O errors.



writeChartAsPNG
public static void writeChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, boolean encodeAlpha, int compression) throws IOException(Code)
Writes a chart to an output stream in PNG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  encodeAlpha - encode alpha?
Parameters:
  compression - the compression level (0-9).
throws:
  IOException - if there are any I/O errors.



writeChartAsPNG
public static void writeChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info) throws IOException(Code)
Writes a chart to an output stream in PNG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - the chart rendering info (null permitted).
throws:
  IOException - if there are any I/O errors.



writeChartAsPNG
public static void writeChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, ChartRenderingInfo info, boolean encodeAlpha, int compression) throws IOException(Code)
Writes a chart to an output stream in PNG format. This method allows you to pass in a ChartRenderingInfo object, to collect information about the chart dimensions/entities. You will need this info if you want to create an HTML image map.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the image width.
Parameters:
  height - the image height.
Parameters:
  info - carries back chart rendering info (null permitted).
Parameters:
  encodeAlpha - encode alpha?
Parameters:
  compression - the PNG compression level (0-9).
throws:
  IOException - if there are any I/O errors.



writeImageMap
public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips) throws IOException(Code)
Writes an image map to an output stream.
Parameters:
  writer - the writer (null not permitted).
Parameters:
  name - the map name (null not permitted).
Parameters:
  info - the chart rendering info (null not permitted).
Parameters:
  useOverLibForToolTips - whether to use OverLIB for tooltips(http://www.bosrup.com/web/overlib/).
throws:
  IOException - if there are any I/O errors.



writeImageMap
public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) throws IOException(Code)
Writes an image map to the specified writer.
Parameters:
  writer - the writer (null not permitted).
Parameters:
  name - the map name (null not permitted).
Parameters:
  info - the chart rendering info (null not permitted).
Parameters:
  toolTipTagFragmentGenerator - a generator for the HTML fragmentthat will contain the tooltip text (null not permitted if info contains tooltip information).
Parameters:
  urlTagFragmentGenerator - a generator for the HTML fragment thatwill contain the URL reference (null not permitted if info contains URLs).
throws:
  IOException - if there are any I/O errors.



writeScaledChartAsPNG
public static void writeScaledChartAsPNG(OutputStream out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor) throws IOException(Code)
Writes a scaled version of a chart to an output stream in PNG format.
Parameters:
  out - the output stream (null not permitted).
Parameters:
  chart - the chart (null not permitted).
Parameters:
  width - the unscaled chart width.
Parameters:
  height - the unscaled chart height.
Parameters:
  widthScaleFactor - the horizontal scale factor.
Parameters:
  heightScaleFactor - the vertical scale factor.
throws:
  IOException - if there are any I/O problems.



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.