Package org.rrd4j.graph
Class RrdGraph
- java.lang.Object
-
- org.rrd4j.graph.RrdGraph
-
- All Implemented Interfaces:
RrdGraphConstants
public class RrdGraph extends Object implements RrdGraphConstants
Class which actually creates Rrd4j graphs (does the hard work).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.rrd4j.graph.RrdGraphConstants
RrdGraphConstants.FontConstructor, RrdGraphConstants.FontTag
-
-
Field Summary
Fields Modifier and Type Field Description (package private) RrdGraphDef
gdef
(package private) ImageParameters
im
-
Fields inherited from interface org.rrd4j.graph.RrdGraphConstants
ALIGN_CENTER_MARKER, ALIGN_JUSTIFIED_MARKER, ALIGN_LEFT_MARKER, ALIGN_LEFTNONL_MARKER, ALIGN_RIGHT_MARKER, BLIND_COLOR, COLOR_ARROW, COLOR_BACK, COLOR_CANVAS, COLOR_FONT, COLOR_FRAME, COLOR_GRID, COLOR_MGRID, COLOR_SHADEA, COLOR_SHADEB, COLOR_XAXIS, COLOR_YAXIS, DAY, DEFAULT_ARROW_COLOR, DEFAULT_BACK_COLOR, DEFAULT_BASE, DEFAULT_CANVAS_COLOR, DEFAULT_END, DEFAULT_FONT_COLOR, DEFAULT_FRAME_COLOR, DEFAULT_GRID_COLOR, DEFAULT_HEIGHT, DEFAULT_IMAGE_FORMAT, DEFAULT_IMAGE_QUALITY, DEFAULT_LARGE_FONT, DEFAULT_MGRID_COLOR, DEFAULT_SHADEA_COLOR, DEFAULT_SHADEB_COLOR, DEFAULT_SMALL_FONT, DEFAULT_START, DEFAULT_UNITS_LENGTH, DEFAULT_WIDTH, DEFAULT_XAXIS_COLOR, DEFAULT_YAXIS_COLOR, FIRST_DAY_OF_WEEK, FONTTAG_AXIS, FONTTAG_DEFAULT, FONTTAG_LEGEND, FONTTAG_TITLE, FONTTAG_UNIT, FONTTAG_WATERMARK, FRIDAY, GATOR_FONT, GLUE_MARKER, GRID_STROKE, HH_MM, HOUR, IN_MEMORY_IMAGE, LEGEND_BOX, LEGEND_BOX_SPACE, LEGEND_INTERSPACING, LEGEND_LEADING, LEGEND_LEADING_SMALL, MINUTE, MONDAY, MONTH, NO_JUSTIFICATION_MARKER, PADDING_BOTTOM, PADDING_LEFT, PADDING_LEGEND, PADDING_PLOT, PADDING_RIGHT, PADDING_TITLE, PADDING_TOP, PADDING_VLABEL, PROPERTYFONTBOLD, PROPERTYFONTBOLDURL, PROPERTYFONTPLAIN, PROPERTYFONTPLAINURL, PROPERTYFONTSPROPERTIES, PROPERTYFONTSURL, SATURDAY, SECOND, SUNDAY, THURSDAY, TICK_STROKE, TUESDAY, VERTICAL_SPACING_MARKER, WEDNESDAY, WEEK, YEAR
-
-
Constructor Summary
Constructors Constructor Description RrdGraph(RrdGraphDef gdef)
Creates graph from the correspondingRrdGraphDef
object.RrdGraph(RrdGraphDef gdef, ImageWriter writer, ImageWriteParam param)
Creates graph from the correspondingRrdGraphDef
object.RrdGraph(RrdGraphDef gdef, ImageWorker worker)
Create graph from a custom image worker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RrdGraphInfo
getRrdGraphInfo()
Returns complete graph information in a single object.void
render(Graphics g)
Renders this graph onto graphing device
-
-
-
Field Detail
-
gdef
final RrdGraphDef gdef
-
im
final ImageParameters im
-
-
Constructor Detail
-
RrdGraph
public RrdGraph(RrdGraphDef gdef) throws IOException
Creates graph from the correspondingRrdGraphDef
object.- Parameters:
gdef
- Graph definition- Throws:
IOException
- Thrown in case of I/O error
-
RrdGraph
public RrdGraph(RrdGraphDef gdef, ImageWorker worker) throws IOException
Create graph from a custom image worker- Parameters:
gdef
-worker
-- Throws:
IOException
-
RrdGraph
public RrdGraph(RrdGraphDef gdef, ImageWriter writer, ImageWriteParam param) throws IOException
Creates graph from the corresponding
RrdGraphDef
object.The graph will be created using customs
ImageWriter
andImageWriteParam
given.The ImageWriter type and ImageWriteParam settings have priority other the RrdGraphDef settings.
- Parameters:
gdef
- Graph definitionwriter
-param
-- Throws:
IOException
- Thrown in case of I/O error- Since:
- 3.5
-
-
Method Detail
-
getRrdGraphInfo
public RrdGraphInfo getRrdGraphInfo()
Returns complete graph information in a single object.- Returns:
- Graph information (width, height, filename, image bytes, etc...)
-
render
public void render(Graphics g)
Renders this graph onto graphing device- Parameters:
g
- Graphics handle
-
-