Class SymbolicNameAnnotation

  • All Implemented Interfaces:
    org.jfree.chart.annotations.Annotation, org.jfree.chart.annotations.XYAnnotation

    public class SymbolicNameAnnotation
    extends java.lang.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
    • Constructor Summary

      Constructors 
      Constructor Description
      SymbolicNameAnnotation​(SymbolicName symbolicName, java.util.Collection all, int style)
      Creates an annotation for a symbolic name.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChangeListener​(org.jfree.chart.event.AnnotationChangeListener listener)  
      static java.util.List createAnnotations​(java.util.Collection symbolicNames)  
      static java.util.List createAnnotations​(java.util.Collection symbolicNames, int style)  
      void draw​(java.awt.Graphics2D g2d, org.jfree.chart.plot.XYPlot xyPlot, java.awt.geom.Rectangle2D dataArea, org.jfree.chart.axis.ValueAxis domainAxis, org.jfree.chart.axis.ValueAxis rangeAxis, int rendererIndex, org.jfree.chart.plot.PlotRenderingInfo info)  
      void removeChangeListener​(org.jfree.chart.event.AnnotationChangeListener listener)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SymbolicNameAnnotation

        public SymbolicNameAnnotation​(SymbolicName symbolicName,
                                      java.util.Collection all,
                                      int style)
        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 - #STYLE_HEAVY or #STYLE_LIGHT
    • Method Detail

      • createAnnotations

        public static java.util.List createAnnotations​(java.util.Collection symbolicNames)
      • createAnnotations

        public static java.util.List createAnnotations​(java.util.Collection symbolicNames,
                                                       int style)
      • draw

        public void draw​(java.awt.Graphics2D g2d,
                         org.jfree.chart.plot.XYPlot xyPlot,
                         java.awt.geom.Rectangle2D dataArea,
                         org.jfree.chart.axis.ValueAxis domainAxis,
                         org.jfree.chart.axis.ValueAxis rangeAxis,
                         int rendererIndex,
                         org.jfree.chart.plot.PlotRenderingInfo info)
        Specified by:
        draw in interface org.jfree.chart.annotations.XYAnnotation
        See Also:
        XYAnnotation.draw(java.awt.Graphics2D, org.jfree.chart.plot.XYPlot, java.awt.geom.Rectangle2D, org.jfree.chart.axis.ValueAxis, org.jfree.chart.axis.ValueAxis, int, org.jfree.chart.plot.PlotRenderingInfo)
      • removeChangeListener

        public void removeChangeListener​(org.jfree.chart.event.AnnotationChangeListener listener)
        Specified by:
        removeChangeListener in interface org.jfree.chart.annotations.Annotation
      • addChangeListener

        public void addChangeListener​(org.jfree.chart.event.AnnotationChangeListener listener)
        Specified by:
        addChangeListener in interface org.jfree.chart.annotations.Annotation