Package net.sf.statcvs.charts
Class SymbolicNameAnnotation
java.lang.Object
net.sf.statcvs.charts.SymbolicNameAnnotation
- All Implemented Interfaces:
org.jfree.chart.annotations.Annotation,org.jfree.chart.annotations.XYAnnotation
public class SymbolicNameAnnotation
extends Object
implements org.jfree.chart.annotations.XYAnnotation
SymbolicNameAnnotation
Provides symbolic name annotations for XYPlots with java.util.Date
objects on the domain axis.
TODO: Move vertically to accommodate annotations that are close together
- Version:
- $Id: SymbolicNameAnnotation.java,v 1.6 2008/04/02 11:22:15 benoitx Exp $
- Author:
- Tammo van Lessen
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final floatstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionSymbolicNameAnnotation(SymbolicName symbolicName, Collection all, int style) Creates an annotation for a symbolic name. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(org.jfree.chart.event.AnnotationChangeListener listener) static ListcreateAnnotations(Collection symbolicNames) static ListcreateAnnotations(Collection symbolicNames, int style) voiddraw(Graphics2D g2d, org.jfree.chart.plot.XYPlot xyPlot, Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, int rendererIndex, org.jfree.chart.plot.PlotRenderingInfo info) voidremoveChangeListener(org.jfree.chart.event.AnnotationChangeListener listener)
-
Field Details
-
STYLE_DEFAULT
public static final int STYLE_DEFAULT- See Also:
-
STYLE_NO_LABELS
public static final int STYLE_NO_LABELS- See Also:
-
MIN_LABEL_X_SPACING
public static final float MIN_LABEL_X_SPACING- See Also:
-
-
Constructor Details
-
SymbolicNameAnnotation
Creates an annotation for a symbolic name. Paints a gray dashed vertical line at the symbolic names date position and draws its name at the top left.- Parameters:
symbolicName-style-orinvalid reference
#STYLE_HEAVYinvalid reference
#STYLE_LIGHT
-
-
Method Details
-
createAnnotations
-
createAnnotations
-
draw
public void draw(Graphics2D g2d, org.jfree.chart.plot.XYPlot xyPlot, Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, int rendererIndex, org.jfree.chart.plot.PlotRenderingInfo info) - Specified by:
drawin interfaceorg.jfree.chart.annotations.XYAnnotation- See Also:
-
removeChangeListener
public void removeChangeListener(org.jfree.chart.event.AnnotationChangeListener listener) - Specified by:
removeChangeListenerin interfaceorg.jfree.chart.annotations.Annotation
-
addChangeListener
public void addChangeListener(org.jfree.chart.event.AnnotationChangeListener listener) - Specified by:
addChangeListenerin interfaceorg.jfree.chart.annotations.Annotation
-