use of org.jfree.chart.annotations.XYAnnotation in project SIMVA-SoS by SESoS.
the class XYPlot method drawAnnotations.
/**
* Draws the annotations for the plot.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param info the chart rendering info.
*/
public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info) {
Iterator iterator = this.annotations.iterator();
while (iterator.hasNext()) {
XYAnnotation annotation = (XYAnnotation) iterator.next();
ValueAxis xAxis = getDomainAxis();
ValueAxis yAxis = getRangeAxis();
annotation.draw(g2, this, dataArea, xAxis, yAxis, 0, info);
}
}
use of org.jfree.chart.annotations.XYAnnotation in project SIMVA-SoS by SESoS.
the class AbstractXYItemRenderer method removeAnnotations.
/**
* Removes all annotations and sends a {@link RendererChangeEvent}
* to all registered listeners.
*/
@Override
public void removeAnnotations() {
for (int i = 0; i < this.foregroundAnnotations.size(); i++) {
XYAnnotation annotation = (XYAnnotation) this.foregroundAnnotations.get(i);
annotation.removeChangeListener(this);
}
for (int i = 0; i < this.backgroundAnnotations.size(); i++) {
XYAnnotation annotation = (XYAnnotation) this.backgroundAnnotations.get(i);
annotation.removeChangeListener(this);
}
this.foregroundAnnotations.clear();
this.backgroundAnnotations.clear();
fireChangeEvent();
}
Aggregations