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
(package private) Mapper
mapper
(package private) ImageWorker
worker
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. -
Method Summary
Modifier and Type Method Description (package private) double
getBoxSpace()
(package private) double
getFontCharWidth(RrdGraphConstants.FontTag fonttag)
(package private) double
getFontHeight(RrdGraphConstants.FontTag fonttag)
(package private) double
getInterlegendSpace()
(package private) double
getLeading()
RrdGraphInfo
getRrdGraphInfo()
Returns complete graph information in a single object.(package private) double
getSmallFontHeight()
Deprecated.(package private) double
getSmallLeading()
(package private) double
getTitleFontHeight()
void
render(Graphics g)
Renders this graph onto graphing device
-
Field Details
-
Constructor Details
-
RrdGraph
Creates graph from the correspondingRrdGraphDef
object.- Parameters:
gdef
- Graph definition- Throws:
IOException
- Thrown in case of I/O error
-
RrdGraph
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 Details
-
getRrdGraphInfo
Returns complete graph information in a single object.- Returns:
- Graph information (width, height, filename, image bytes, etc...)
-
getFontHeight
-
getFontCharWidth
-
getSmallFontHeight
Deprecated. -
getTitleFontHeight
double getTitleFontHeight() -
getInterlegendSpace
double getInterlegendSpace() -
getLeading
double getLeading() -
getSmallLeading
double getSmallLeading() -
getBoxSpace
double getBoxSpace() -
render
Renders this graph onto graphing device- Parameters:
g
- Graphics handle
-