org.statcato.graph
Class GraphUtils
- java.lang.Object
-
- org.statcato.graph.GraphUtils
-
public class GraphUtils extends java.lang.ObjectUtilities for graph generation and manipulation.- Since:
- 1.0
- See Also:
org.jfree.chart
-
-
Constructor Summary
Constructors Constructor and Description GraphUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static javax.swing.IconcreateGraphImageLabel(JFreeChart plot)static voiddrawCharts(java.awt.Graphics2D g, java.util.ArrayList<JFreeChart> charts, int x, int y, int width, int height)Draws the charts on the given Java@d graphics device, with two charts per row at the given position.static java.awt.image.BufferedImagejoinBufferedChartImages(java.util.ArrayList<JFreeChart> charts)Returns a BufferedImage that is the result of joining a list of chartsstatic voidwriteBufferedImageAsPNG(java.io.OutputStream out, java.awt.image.BufferedImage image, int width, int height)Writes a chart to an output stream in PNG format.
-
-
-
Method Detail
-
createGraphImageLabel
public static javax.swing.Icon createGraphImageLabel(JFreeChart plot)
-
joinBufferedChartImages
public static java.awt.image.BufferedImage joinBufferedChartImages(java.util.ArrayList<JFreeChart> charts)
Returns a BufferedImage that is the result of joining a list of charts- Parameters:
charts- an ArrayList of JFreeChart objects- Returns:
- BufferedImage
-
drawCharts
public static void drawCharts(java.awt.Graphics2D g, java.util.ArrayList<JFreeChart> charts, int x, int y, int width, int height)Draws the charts on the given Java@d graphics device, with two charts per row at the given position.- Parameters:
g- graphics devicecharts- list of chartsx- x-positiony- y-positionwidth- widthheight- height
-
writeBufferedImageAsPNG
public static void writeBufferedImageAsPNG(java.io.OutputStream out, java.awt.image.BufferedImage image, int width, int height) throws java.io.IOExceptionWrites a chart to an output stream in PNG format.- Parameters:
out- the output stream (nullnot permitted).image- the BufferedImage objectwidth- the image width.height- the image height.- Throws:
java.io.IOException- if there are any I/O errors.
-
-
DMelt 3.0 © DataMelt by jWork.ORG