|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jrobin.core.RrdOpener
org.jrobin.graph.RrdGraph
Class to represent JRobin graphs. This class needs an appropriate RrdGraphDef to generate graphs.
| Field Summary |
| Fields inherited from class org.jrobin.core.RrdOpener |
pool, readOnly, usePool |
| Constructor Summary | |
RrdGraph()
Constructs a new JRobin graph object, without a shared database pool. |
|
RrdGraph(boolean usePool)
Constructs a new JRobin graph object. |
|
RrdGraph(RrdGraphDef graphDef)
Constructs a new JRobin graph object from the supplied definition. |
|
RrdGraph(RrdGraphDef graphDef,
boolean usePool)
Constructs a new JRobin graph from the supplied definition. |
|
| Method Summary | |
ExportData |
fetchExportData()
This retrieves the ExportData object associated with the reduced dataset of this Graph, by calculating the dataset on the spot. |
ExportData |
fetchExportData(int maxRows)
This retrieves the ExportData object associated with the reduced dataset of this Graph, by calculating the dataset on the spot. |
java.awt.image.BufferedImage |
getBufferedImage(int width,
int height)
Returns the underlying BufferedImage of a graph with custom dimensions. |
ChartPanel |
getChartPanel()
Returns panel object so that graph can be easily embedded in swing applications. |
ExportData |
getExportData()
This retrieves the ExportData object associated with the reduced dataset of this Graph. |
byte[] |
getGIFBytes()
Returns graph with default chart dimensions (400 by 100) as an array of GIF bytes. |
byte[] |
getGIFBytes(int width,
int height)
Returns graph with custom chart dimensions as an array of GIF bytes. |
byte[] |
getJPEGBytes(float quality)
Returns graph with default chart dimensions (400 by 100) as an array of JPEG bytes. |
byte[] |
getJPEGBytes(int width,
int height,
float quality)
Returns graph with custom chart dimensions as an array of JPEG bytes. |
byte[] |
getPNGBytes()
Returns graph with default chart dimensions (400 by 100) as an array of PNG bytes. |
byte[] |
getPNGBytes(int width,
int height)
Returns graph with custom chart dimensions as an array of PNG bytes. |
void |
renderImage(java.awt.Graphics2D graphics,
int width,
int height)
Renders the graph onto a specified Graphics2D object. |
void |
saveAsGIF(java.lang.String path)
Creates and saves a graph image with default dimensions as a GIF file. |
void |
saveAsGIF(java.lang.String path,
int width,
int height)
Creates and saves a graph image with custom chart dimensions as a GIF file. |
void |
saveAsJPEG(java.lang.String path,
float quality)
Creates and saves a graph image with default dimensions as a JPEG file. |
void |
saveAsJPEG(java.lang.String path,
int width,
int height,
float quality)
Creates and saves a graph image with custom chart dimensions as a JPEG file. |
void |
saveAsPNG(java.lang.String path)
Creates and saves a graph image with default dimensions as a PNG file. |
void |
saveAsPNG(java.lang.String path,
int width,
int height)
Creates and saves a graph image with custom chart dimensions as a PNG file. |
void |
setGraphDef(RrdGraphDef graphDef)
Sets the graph definition to use for the graph construction. |
void |
specifyImageSize(boolean specImgSize)
Determines if graph creation should specify dimensions for the chart graphing are, of for the entire image size. |
| Methods inherited from class org.jrobin.core.RrdOpener |
getRrd, releaseRrd |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RrdGraph()
public RrdGraph(boolean usePool)
usePool - True if this object should use RrdDbPoolpublic RrdGraph(RrdGraphDef graphDef)
graphDef - Graph definition.
public RrdGraph(RrdGraphDef graphDef,
boolean usePool)
graphDef - Graph definition.usePool - True if this should object should use RrdDbPool| Method Detail |
public void specifyImageSize(boolean specImgSize)
specImgSize - True if the dimensions for the entire image will be specified, false if only for the chart area.public void setGraphDef(RrdGraphDef graphDef)
graphDef - Graph definition.
public void saveAsPNG(java.lang.String path)
throws RrdException,
java.io.IOException
path - Path to the PNG file to be created.
java.io.IOException - Thrown in case of I/O error.
RrdException - Thrown in case of JRobin specific error.
public void saveAsPNG(java.lang.String path,
int width,
int height)
throws RrdException,
java.io.IOException
path - Path to the PNG file to be created.width - Width of the chart area in pixels.height - Height of the chart area in pixels.
java.io.IOException - Thrown in case of I/O error.
RrdException - Thrown in case of JRobin specific error.
public void saveAsGIF(java.lang.String path)
throws RrdException,
java.io.IOException
path - Path to the GIF file to be created.
java.io.IOException - Thrown in case of I/O error.
RrdException - Thrown in case of JRobin specific error.
public void saveAsGIF(java.lang.String path,
int width,
int height)
throws RrdException,
java.io.IOException
path - Path to the GIF file to be created.width - Width of the chart area in pixels.height - Height of the chart area in pixels.
java.io.IOException - Thrown in case of I/O error.
RrdException - Thrown in case of JRobin specific error.
public void saveAsJPEG(java.lang.String path,
float quality)
throws RrdException,
java.io.IOException
path - Path to the JPEG file to be created.quality - JPEG quality, between 0 (= low) and 1.0f (= high).
java.io.IOException - Thrown in case of I/O error.
RrdException
public void saveAsJPEG(java.lang.String path,
int width,
int height,
float quality)
throws RrdException,
java.io.IOException
path - Path to the JPEG file to be created.width - Width of the chart area in pixels.height - Height of the chart area in pixels.quality - JPEG quality, between 0 (= low) and 1.0f (= high).
java.io.IOException - Thrown in case of I/O error.
RrdException
public byte[] getPNGBytes()
throws java.io.IOException,
RrdException
java.io.IOException - Thrown in case of I/O error.
RrdException
public byte[] getPNGBytes(int width,
int height)
throws java.io.IOException,
RrdException
width - Width of the chart area in pixels.height - Height of the chart area in pixels.
java.io.IOException - Thrown in case of I/O error.
RrdException
public byte[] getJPEGBytes(float quality)
throws java.io.IOException,
RrdException
quality - JPEG quality, between 0 (= low) and 1.0f (= high).
java.io.IOException - Thrown in case of I/O error.
RrdException
public byte[] getJPEGBytes(int width,
int height,
float quality)
throws java.io.IOException,
RrdException
width - Width of the chart area in pixels.height - Height of the chart area in pixels.quality - JPEG quality, between 0 (= low) and 1.0f (= high).
java.io.IOException - Thrown in case of I/O error.
RrdException
public byte[] getGIFBytes()
throws RrdException,
java.io.IOException
java.io.IOException - Thrown in case of I/O error.
RrdException
public byte[] getGIFBytes(int width,
int height)
throws RrdException,
java.io.IOException
width - Width of the chart area in pixels.height - Height of the chart area in pixels.
java.io.IOException - Thrown in case of I/O error.
RrdException
public java.awt.image.BufferedImage getBufferedImage(int width,
int height)
throws java.io.IOException,
RrdException
width - Width of the chart area in pixels.height - Height of the chart area in pixels.
java.io.IOException - Thrown in case of I/O error.
RrdException - Thrown in case of JRobin specific error.
public ChartPanel getChartPanel()
throws RrdException,
java.io.IOException
RrdException
java.io.IOException
public void renderImage(java.awt.Graphics2D graphics,
int width,
int height)
throws RrdException,
java.io.IOException
graphics - Handle to a Graphics2D object to render the graph on.width - Width of the chart area in pixels.height - Height of the chart area in pixels.
RrdException - Thrown in case of JRobin specific error.
java.io.IOException - Thrown in case of I/O error
public ExportData getExportData()
throws RrdException
RrdException - Thrown in case of JRobin specific error.
public ExportData fetchExportData()
throws RrdException,
java.io.IOException
RrdException - Thrown in case of JRobin specific error.
java.io.IOException - Thrown in case of I/O error
public ExportData fetchExportData(int maxRows)
throws RrdException,
java.io.IOException
maxRows - Ballpark figure 'maximum number of rows' that the dataset can contain.
Note that this is not an absolute maximum and can be overruled in some cases.
RrdException - Thrown in case of JRobin specific error.
java.io.IOException - Thrown in case of I/O error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||