net.sf.statcvs.charts

Class SymbolicNameAnnotation

Implemented Interfaces:
XYAnnotation

public class SymbolicNameAnnotation
extends Object
implements 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

static float
MIN_LABEL_X_SPACING
static int
STYLE_DEFAULT
static int
STYLE_NO_LABELS

Constructor Summary

SymbolicNameAnnotation(SymbolicName symbolicName, Collection all, int style)
Creates an annotation for a symbolic name.

Method Summary

static List
createAnnotations(Collection symbolicNames)
static List
createAnnotations(Collection symbolicNames, int style)
void
draw(Graphics2D g2d, XYPlot xyPlot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info)

Field Details

MIN_LABEL_X_SPACING

public static final float MIN_LABEL_X_SPACING
Field Value:
7.0f

STYLE_DEFAULT

public static final int STYLE_DEFAULT
Field Value:
0

STYLE_NO_LABELS

public static final int STYLE_NO_LABELS
Field Value:
1

Constructor Details

SymbolicNameAnnotation

public SymbolicNameAnnotation(SymbolicName symbolicName,
                              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 - SymbolicNameAnnotation or SymbolicNameAnnotation

Method Details

createAnnotations

public static List createAnnotations(Collection symbolicNames)

createAnnotations

public static List createAnnotations(Collection symbolicNames,
                                     int style)

draw

public void draw(Graphics2D g2d,
                 XYPlot xyPlot,
                 Rectangle2D dataArea,
                 ValueAxis domainAxis,
                 ValueAxis rangeAxis,
                 int rendererIndex,
                 PlotRenderingInfo info)