com.jrefinery.chart
Class PeriodMarkerPlot

java.lang.Object
  |
  +--com.jrefinery.chart.Plot
        |
        +--com.jrefinery.chart.XYPlot
              |
              +--com.jrefinery.chart.PeriodMarkerPlot
All Implemented Interfaces:
AxisChangeListener, AxisConstants, DatasetChangeListener, java.util.EventListener, HorizontalValuePlot, java.beans.PropertyChangeListener, VerticalValuePlot

public class PeriodMarkerPlot
extends XYPlot
implements HorizontalValuePlot, VerticalValuePlot

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

Author:
sylvain

Fields inherited from class com.jrefinery.chart.Plot
backgroundAlpha, backgroundImage, backgroundPaint, dataset, DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_INSETS, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, foregroundAlpha, insets, listenerList, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, noDataMessage, noDataMessageFont, outlinePaint, outlineStroke, seriesOutlinePaint, seriesOutlineStroke, seriesPaint, seriesStroke, shapeFactory, ZERO
 
Fields inherited from interface com.jrefinery.chart.AxisConstants
DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_PAINT, DEFAULT_TICK_STROKE
 
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 com.jrefinery.chart.XYPlot
addAnnotation, addDomainMarker, addHorizontalLine, addHorizontalLine, addRangeMarker, addVerticalLine, addVerticalLine, clearAnnotations, clearDomainMarkers, clearRangeMarkers, datasetChanged, drawHorizontalLine, drawVerticalLine, getDomainAxis, getHorizontalAxis, getHorizontalDataRange, getHorizontalValueAxis, getItemRenderer, getParent, getRangeAxis, getRenderer, getSeriesCount, getVerticalAxis, getVerticalValueAxis, getWeight, getXYDataset, handleClick, isCompatibleDomainAxis, isCompatibleRangeAxis, isSubplot, propertyChange, render, setDomainAxis, setParent, setRangeAxis, setRenderer, setWeight, setXYItemRenderer
 
Methods inherited from class com.jrefinery.chart.Plot
addChangeListener, axisChanged, drawNoDataMessage, drawOutlineAndBackground, getBackgroundAlpha, getBackgroundPaint, getDataset, getDatasetGroup, getForegroundAlpha, getInsets, getNoDataMessage, getNoDataMessageFont, getOutlinePaint, getOutlineStroke, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesStroke, getShape, getShape, getShapeFactory, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundPaint, setDataset, setDatasetGroup, setForegroundAlpha, setInsets, setNoDataMessage, setNoDataMessageFont, setOutlinePaint, setOutlineStroke, setSeriesOutlinePaint, setSeriesOutlineStroke, setSeriesOutlineStroke, setSeriesPaint, setSeriesPaint, setSeriesStroke, setSeriesStroke, setShapeFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jrefinery.chart.HorizontalValuePlot
getHorizontalDataRange, getHorizontalValueAxis
 
Methods inherited from interface com.jrefinery.chart.VerticalValuePlot
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.
Specified by:
getVerticalDataRange in interface VerticalValuePlot
Overrides:
getVerticalDataRange in class XYPlot
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.
Overrides:
getLegendItemLabels in class XYPlot
Returns:
the legend item labels.