com.jrefinery.chart
Class PeriodMarkerPlot

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

public class PeriodMarkerPlot
extends XYPlot
implements HorizontalValuePlot, VerticalValuePlot

Author:
sylvain

Field Summary
 
Fields inherited from class com.jrefinery.chart.XYPlot
domainAxis, horizontalColors, horizontalLines, parent, rangeAxis, renderer, verticalColors, verticalLines, weight
 
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, firstSeriesIndex, foregroundAlpha, insets, listeners, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, 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_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).
 Range getHorizontalDataRange()
          Returns the range of data values to be plotted along the horizontal axis.
 java.util.List getLegendItemLabels()
          Returns an array of labels to be displayed by the legend.
 java.lang.Number getMaximumVerticalDataValue()
          Returns the maximum value in the range, since this is plotted against the vertical axis for a HighLowPlot.
 java.lang.Number getMinimumVerticalDataValue()
          Returns the minimum value in the range, since this is plotted against the vertical axis for a HighLowPlot.
 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 HighLowDataset.
 Range getVerticalDataRange()
          Returns the range for the data to be plotted against the vertical axis.
 Range getVerticalRange()
           
 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
addHorizontalLine, addHorizontalLine, addVerticalLine, addVerticalLine, datasetChanged, draw, draw, drawHorizontalLine, drawHorizontalLines, drawVerticalLine, drawVerticalLines, getDomainAxis, getHorizontalAxis, getHorizontalValueAxis, getItemRenderer, getParent, getRangeAxis, getSeriesCount, getVerticalAxis, getVerticalValueAxis, getWeight, getXYDataset, handleClick, handleClick, isCompatibleDomainAxis, isCompatibleRangeAxis, isSubplot, propertyChange, render, setDomainAxis, setParent, setRangeAxis, setWeight, setXYItemRenderer
 
Methods inherited from class com.jrefinery.chart.Plot
addChangeListener, axisChanged, drawOutlineAndBackground, getBackgroundAlpha, getBackgroundPaint, getDataset, getFirstSeriesIndex, getForegroundAlpha, getInsets, getOutlinePaint, getOutlineStroke, getSeriesOutlinePaint, getSeriesOutlineStroke, getSeriesPaint, getSeriesStroke, getShape, getShape, getShapeFactory, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundPaint, setDataset, setFirstSeriesIndex, setForegroundAlpha, setInsets, 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
getHorizontalValueAxis
 
Methods inherited from interface com.jrefinery.chart.VerticalValuePlot
getVerticalValueAxis
 

Constructor Detail

PeriodMarkerPlot

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

Throws:
AxisNotCompatibleException
PlotNotCompatibleException
Method Detail

getLegendItemLabels

public java.util.List getLegendItemLabels()
Description copied from class: XYPlot
Returns an array of labels to be displayed by the legend.

Overrides:
getLegendItemLabels in class XYPlot
Returns:
An array of legend item labels (or null).

getPlotType

public java.lang.String getPlotType()
Returns the plot type as a string. This implementation returns "HiLow Plot".

Overrides:
getPlotType in class XYPlot
Returns:
A short string describing the type of plot.

getVerticalDataRange

public Range getVerticalDataRange()
Description copied from interface: VerticalValuePlot
Returns the range for the data to be plotted against the vertical axis.

Specified by:
getVerticalDataRange in interface VerticalValuePlot
Overrides:
getVerticalDataRange in class XYPlot
Returns:
The range.

getTempXYDataset

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


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.

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.

getHorizontalDataRange

public Range getHorizontalDataRange()
Description copied from interface: HorizontalValuePlot
Returns the range of data values to be plotted along the horizontal axis.

Specified by:
getHorizontalDataRange in interface HorizontalValuePlot
Overrides:
getHorizontalDataRange in class XYPlot
Returns:
The range.

getVerticalRange

public Range getVerticalRange()

getMinimumVerticalDataValue

public java.lang.Number getMinimumVerticalDataValue()
Returns the minimum value in the range, since this is plotted against the vertical axis for a HighLowPlot.


getMaximumVerticalDataValue

public java.lang.Number getMaximumVerticalDataValue()
Returns the maximum value in the range, since this is plotted against the vertical axis for a HighLowPlot.


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 - Collects chart drawing information (null permitted).

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.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.