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) RrdGraphDefgdef(package private) ImageParametersim(package private) Mappermapper(package private) ImageWorkerworker-
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 correspondingRrdGraphDefobject.RrdGraph(RrdGraphDef gdef, ImageWriter writer, ImageWriteParam param)Creates graph from the correspondingRrdGraphDefobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) doublegetBoxSpace()(package private) doublegetFontCharWidth(RrdGraphConstants.FontTag fonttag)(package private) doublegetFontHeight(RrdGraphConstants.FontTag fonttag)(package private) doublegetInterlegendSpace()(package private) doublegetLeading()RrdGraphInfogetRrdGraphInfo()Returns complete graph information in a single object.(package private) doublegetSmallFontHeight()Deprecated.(package private) doublegetSmallLeading()(package private) doublegetTitleFontHeight()voidrender(Graphics g)Renders this graph onto graphing device
-
-
-
Field Detail
-
gdef
final RrdGraphDef gdef
-
im
final ImageParameters im
-
worker
ImageWorker worker
-
mapper
Mapper mapper
-
-
Constructor Detail
-
RrdGraph
public RrdGraph(RrdGraphDef gdef) throws IOException
Creates graph from the correspondingRrdGraphDefobject.- Parameters:
gdef- Graph definition- Throws:
IOException- Thrown in case of I/O error
-
RrdGraph
public RrdGraph(RrdGraphDef gdef, ImageWriter writer, ImageWriteParam param) throws IOException
Creates graph from the corresponding
RrdGraphDefobject.The graph will be created using customs
ImageWriterandImageWriteParamgiven.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...)
-
getFontHeight
double getFontHeight(RrdGraphConstants.FontTag fonttag)
-
getFontCharWidth
double getFontCharWidth(RrdGraphConstants.FontTag fonttag)
-
getSmallFontHeight
@Deprecated double getSmallFontHeight()
Deprecated.
-
getTitleFontHeight
double getTitleFontHeight()
-
getInterlegendSpace
double getInterlegendSpace()
-
getLeading
double getLeading()
-
getSmallLeading
double getSmallLeading()
-
getBoxSpace
double getBoxSpace()
-
render
public void render(Graphics g)
Renders this graph onto graphing device- Parameters:
g- Graphics handle
-
-