de.laures.cewolf.cpp
Class AnnotationProcessor
java.lang.Object
de.laures.cewolf.cpp.AnnotationProcessor
- All Implemented Interfaces:
- ChartPostProcessor, java.io.Serializable
public class AnnotationProcessor
- extends java.lang.Object
- implements ChartPostProcessor, java.io.Serializable
A postprocessor for adding annotation to an X/Y or Category plot.
If either arrowPaint or arrowAngle is set then a pointer will be drawn; otherwise, just the text.
text the text to display; mandatory
x (for X/Y plots only) the X value at which to show the text; mandatory
y (for X/Y plots only) the Y value at which to show the text; mandatory
category (for category plots only) the category for which to show the text; mandatory
value (for category plots only) the value at which to show the text; mandatory
fontname optional; default SansSerif
fontsize optional; default 14
bold true/false; optional; default false
italic true/false; optional; default false
textPaint the color to use for the text; optional; default #000000 (i.e., black)
arrowPaint the color to use for the text; optional; default #000000 (i.e., black)
arrowAngle the angle at which to display the arrow; optional; default 0
textAnchor the position of text relative to its origin point; optional; possible values are:
BASELINE_CENTER, BASELINE_LEFT, BASELINE_RIGHT, BOTTOM_CENTER, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER, CENTER_LEFT,
CENTER_RIGHT, HALF_ASCENT_CENTER, HALF_ASCENT_LEFT, HALF_ASCENT_RIGHT, TOP_CENTER, TOP_LEFT, TOP_RIGHT
See the annotations.jsp page of the sample web app for usage examples.
- See Also:
- Serialized Form
Method Summary |
void |
processChart(org.jfree.chart.JFreeChart chart,
java.util.Map<java.lang.String,java.lang.String> params)
Processes a generated chart. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationProcessor
public AnnotationProcessor()
processChart
public void processChart(org.jfree.chart.JFreeChart chart,
java.util.Map<java.lang.String,java.lang.String> params)
- Description copied from interface:
ChartPostProcessor
- Processes a generated chart. This method is called by the ChartProducer
after a chart instance is generated and before it is rendered (if so).
The ChartProducer is responsible for post processing a chart dependant
on and only on the provided parameters. This means that the same parameters
should result in the same postprocessings.
- Specified by:
processChart
in interface ChartPostProcessor
- Parameters:
chart
- the chart instanceparams
- parameters passed to the postprocessor. These are defined in the JSP- See Also:
ChartPostProcessorTag
cewolf tag library - web charts with JFreeChart