Package org.jrobin.graph
Class RrdGraph
- java.lang.Object
-
- org.jrobin.graph.RrdGraph
-
- All Implemented Interfaces:
RrdGraphConstants
public class RrdGraph extends Object implements RrdGraphConstants
Class which actually creates JRobin graphs (does the hard work).
-
-
Field Summary
Fields Modifier and Type Field Description (package private) DataProcessor
dproc
(package private) RrdGraphDef
gdef
(package private) ImageParameters
im
(package private) RrdGraphInfo
info
(package private) Mapper
mapper
(package private) ImageWorker
worker
-
Fields inherited from interface org.jrobin.graph.RrdGraphConstants
ALIGN_CENTER_MARKER, ALIGN_JUSTIFIED_MARKER, ALIGN_LEFT_MARKER, ALIGN_RIGHT_MARKER, COLOR_ARROW, COLOR_BACK, COLOR_CANVAS, COLOR_FONT, COLOR_FRAME, COLOR_GRID, COLOR_MGRID, COLOR_NAMES, COLOR_SHADEA, COLOR_SHADEB, DAY, DEFAULT_ARROW_COLOR, DEFAULT_BACK_COLOR, DEFAULT_BASE, DEFAULT_CANVAS_COLOR, DEFAULT_END, DEFAULT_FONT_COLOR, DEFAULT_FONT_NAME, DEFAULT_FRAME_COLOR, DEFAULT_GRID_COLOR, DEFAULT_HEIGHT, DEFAULT_IMAGE_FORMAT, DEFAULT_IMAGE_QUALITY, DEFAULT_MGRID_COLOR, DEFAULT_MONOSPACE_FONT_FILE, DEFAULT_PROPORTIONAL_FONT_FILE, DEFAULT_SHADEA_COLOR, DEFAULT_SHADEB_COLOR, DEFAULT_START, DEFAULT_UNITS_LENGTH, DEFAULT_WIDTH, FIRST_DAY_OF_WEEK, FONTTAG_AXIS, FONTTAG_DEFAULT, FONTTAG_LEGEND, FONTTAG_NAMES, FONTTAG_TITLE, FONTTAG_UNIT, FONTTAG_WATERMARK, FRIDAY, GLUE_MARKER, GRID_STROKE, HOUR, IN_MEMORY_IMAGE, LEGEND_BOX, LEGEND_BOX_SPACE, LEGEND_INTERSPACING, LEGEND_LEADING, LEGEND_LEADING_SMALL, MARKERS, MINUTE, MONDAY, MONTH, NO_JUSTIFICATION_MARKER, PADDING_BOTTOM, PADDING_LEFT, PADDING_LEGEND, PADDING_PLOT, PADDING_RIGHT, PADDING_TITLE, PADDING_TOP, PADDING_VLABEL, 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) double
getBoxSpace()
(package private) double
getFontCharWidth(int fonttag)
(package private) double
getFontHeight(int fonttag)
(package private) double
getInterlegendSpace()
(package private) double
getLeading()
RrdGraphInfo
getRrdGraphInfo()
Returns complete graph information in a single object.(package private) double
getSmallFontHeight()
(package private) double
getSmallLeading()
void
render(Graphics g)
Renders this graph onto graphing device(package private) double[]
xtr(long[] timestamps)
(package private) double[]
ytr(double[] values)
-
-
-
Field Detail
-
gdef
RrdGraphDef gdef
-
im
ImageParameters im
-
dproc
DataProcessor dproc
-
worker
ImageWorker worker
-
mapper
Mapper mapper
-
info
RrdGraphInfo info
-
-
Constructor Detail
-
RrdGraph
public RrdGraph(RrdGraphDef gdef) throws IOException, RrdException
Creates graph from the correspondingRrdGraphDef
object.- Parameters:
gdef
- Graph definition- Throws:
IOException
- Thrown in case of I/O errorRrdException
- Thrown in case of JRobin related error
-
-
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(int fonttag)
-
getFontCharWidth
double getFontCharWidth(int fonttag)
-
getSmallFontHeight
double getSmallFontHeight()
-
getInterlegendSpace
double getInterlegendSpace()
-
getLeading
double getLeading()
-
getSmallLeading
double getSmallLeading()
-
getBoxSpace
double getBoxSpace()
-
xtr
double[] xtr(long[] timestamps)
-
ytr
double[] ytr(double[] values)
-
render
public void render(Graphics g)
Renders this graph onto graphing device- Parameters:
g
- Graphics handle
-
-