org.jfree.chart.plot
Class PeriodMarkerPlot

java.lang.Object
  |
  +--org.jfree.chart.plot.Plot
        |
        +--org.jfree.chart.plot.XYPlot
              |
              +--org.jfree.chart.plot.PeriodMarkerPlot
All Implemented Interfaces:
AxisChangeListener, AxisConstants, DatasetChangeListener, java.util.EventListener, HorizontalValuePlot, java.beans.PropertyChangeListener, java.io.Serializable, VerticalValuePlot

public class PeriodMarkerPlot
extends XYPlot
implements HorizontalValuePlot, VerticalValuePlot

A plot that marks time periods, for use in overlaid plots.

Author:
sylvain
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jfree.chart.plot.XYPlot
DEFAULT_CROSSHAIR_PAINT, DEFAULT_CROSSHAIR_STROKE, DEFAULT_CROSSHAIR_VISIBLE, DEFAULT_GRIDLINE_PAINT, DEFAULT_GRIDLINE_STROKE
 
Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
 
Fields inherited from interface org.jfree.chart.axis.AxisConstants
BOTTOM, DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_AXIS_VISIBLE, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_LABELS_VISIBLE, DEFAULT_TICK_MARK_INSIDE_LENGTH, DEFAULT_TICK_MARK_OUTSIDE_LENGTH, DEFAULT_TICK_MARK_PAINT, DEFAULT_TICK_MARK_STROKE, DEFAULT_TICK_MARKS_VISIBLE, LEFT, RIGHT, TOP
 
Constructor Summary
PeriodMarkerPlot(XYDataset data, ValueAxis domainAxis, ValueAxis rangeAxis)
          Creates a new period marker plot.
 
Method Summary
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, ChartRenderingInfo info)
          Draws the plot on a Java 2D graphics device (such as the screen or a printer).
 java.util.List getLegendItemLabels()
          Deprecated. use getLegendItems().
 LegendItemCollection getLegendItems()
          Returns the legend items (null for this plot).
 java.lang.String getPlotType()
          Returns the plot type as a string.
 XYDataset getTempXYDataset()
          A convenience method that returns the dataset for the plot, cast as an XYDataset.
 Range getVerticalDataRange()
          Returns the range for the vertical axis.
 boolean isCompatibleHorizontalAxis(Axis axis)
          Checks the compatibility of a horizontal axis, returning true if the axis is compatible with the plot, and false otherwise.
 boolean isCompatibleVerticalAxis(Axis axis)
          Checks the compatibility of a vertical axis, returning true if the axis is compatible with the plot, and false otherwise.
 void zoom(double percent)
          A zoom method that does nothing.
 
Methods inherited from class org.jfree.chart.plot.XYPlot
addAnnotation, addDomainMarker, addRangeMarker, addSecondaryRangeMarker, clearAnnotations, clearDomainMarkers, clearRangeMarkers, clearSecondaryRangeMarkers, datasetChanged, drawHorizontalLine, drawVerticalLine, equals, getDomainAxis, getDomainAxisLocation, getDomainCrosshairPaint, getDomainCrosshairStroke, getDomainCrosshairValue, getDomainGridlinePaint, getDomainGridlineStroke, getHorizontalAxis, getHorizontalDataRange, getHorizontalValueAxis, getRangeAxis, getRangeAxisLocation, getRangeCrosshairPaint, getRangeCrosshairStroke, getRangeCrosshairValue, getRangeGridlinePaint, getRangeGridlineStroke, getRenderer, getSecondaryRangeAxis, getSecondaryRenderer, getSecondaryXYDataset, getSeriesCount, getVerticalAxis, getVerticalDataRange, getVerticalValueAxis, getWeight, getXYDataset, handleClick, isCompatibleDomainAxis, isCompatibleRangeAxis, isDomainCrosshairLockedOnData, isDomainCrosshairVisible, isDomainGridlinesVisible, isRangeCrosshairLockedOnData, isRangeCrosshairVisible, isRangeGridlinesVisible, propertyChange, render, render2, setDomainAxis, setDomainAxisLocation, setDomainAxisLocation, setDomainCrosshairLockedOnData, setDomainCrosshairPaint, setDomainCrosshairStroke, setDomainCrosshairValue, setDomainCrosshairValue, setDomainCrosshairVisible, setDomainGridlinePaint, setDomainGridlineStroke, setDomainGridlinesVisible, setRangeAxis, setRangeAxisLocation, setRangeAxisLocation, setRangeCrosshairLockedOnData, setRangeCrosshairPaint, setRangeCrosshairStroke, setRangeCrosshairValue, setRangeCrosshairValue, setRangeCrosshairVisible, setRangeGridlinePaint, setRangeGridlineStroke, setRangeGridlinesVisible, setRenderer, setSecondaryRangeAxis, setSecondaryRenderer, setWeight
 
Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, axisChanged, drawBackground, drawNoDataMessage, drawOutline, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundPaint, getDataAreaRatio, getDataset, getDatasetGroup, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOppositeAxisLocation, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, getSecondaryDataset, isSubplot, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundPaint, setDataAreaRatio, setDataset, setDatasetGroup, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent, setSecondaryDataset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jfree.chart.plot.HorizontalValuePlot
getHorizontalDataRange, getHorizontalValueAxis
 
Methods inherited from interface org.jfree.chart.plot.VerticalValuePlot
getVerticalDataRange, getVerticalValueAxis
 

Constructor Detail

PeriodMarkerPlot

public PeriodMarkerPlot(XYDataset data,
                        ValueAxis domainAxis,
                        ValueAxis rangeAxis)
Creates a new period marker plot.

Parameters:
data - the data series.
domainAxis - the domain axis.
rangeAxis - the range axis.
Method Detail

getLegendItems

public LegendItemCollection getLegendItems()
Returns the legend items (null for this plot).

Overrides:
getLegendItems in class XYPlot
Returns:
the legend items.

getPlotType

public java.lang.String getPlotType()
Returns the plot type as a string.

Overrides:
getPlotType in class XYPlot
Returns:
Period Marker Plot.

getVerticalDataRange

public Range getVerticalDataRange()
Returns the range for the vertical axis.

Returns:
the axis range.

getTempXYDataset

public XYDataset getTempXYDataset()
A convenience method that returns the dataset for the plot, cast as an XYDataset.

Returns:
a dataset.

isCompatibleHorizontalAxis

public boolean isCompatibleHorizontalAxis(Axis axis)
Checks the compatibility of a horizontal axis, returning true if the axis is compatible with the plot, and false otherwise.

Parameters:
axis - the horizontal axis.
Returns:
true if the axis is compatible with the plot.

isCompatibleVerticalAxis

public boolean isCompatibleVerticalAxis(Axis axis)
Checks the compatibility of a vertical axis, returning true if the axis is compatible with the plot, and false otherwise. The vertical axis for this plot must be an instance of VerticalNumberAxis.

Parameters:
axis - the vertical axis.
Returns:
true if the axis is compatible with the plot.

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D drawArea,
                 ChartRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer).

Overrides:
draw in class XYPlot
Parameters:
g2 - the graphics device.
drawArea - the area within which the plot should be drawn.
info - an optional info collection object to return data back to the caller.

zoom

public void zoom(double percent)
A zoom method that does nothing. TO BE DONE.

Overrides:
zoom in class XYPlot
Parameters:
percent - the zoom percentage.

getLegendItemLabels

public java.util.List getLegendItemLabels()
Deprecated. use getLegendItems().

Returns the legend item labels.

Returns:
the legend item labels.