com.jrefinery.chart
Class OverlaidVerticalCategoryPlot

java.lang.Object
  |
  +--com.jrefinery.chart.Plot
        |
        +--com.jrefinery.chart.CategoryPlot
              |
              +--com.jrefinery.chart.VerticalCategoryPlot
                    |
                    +--com.jrefinery.chart.OverlaidVerticalCategoryPlot
All Implemented Interfaces:
AxisChangeListener, AxisConstants, CategoryPlotConstants, DatasetChangeListener, java.util.EventListener, VerticalValuePlot

public class OverlaidVerticalCategoryPlot
extends VerticalCategoryPlot

An extension of VerticalCategoryPlot that allows multiple VerticalCategoryPlots to be overlaid in one space, using common axes.

Author:
Jeremy Bowman

Fields inherited from class com.jrefinery.chart.CategoryPlot
categoryGapsPercent, domainAxis, introGapPercent, itemGapsPercent, labelFont, labelFormatPattern, labelFormatter, labelPaint, parent, rangeAxis, rangeMarkers, renderer, trailGapPercent, valueLabelsVisible, verticalLabels
 
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.CategoryPlotConstants
DEFAULT_CATEGORY_GAPS_PERCENT, DEFAULT_INTRO_GAP_PERCENT, DEFAULT_ITEM_GAPS_PERCENT, DEFAULT_LABEL_FONT, DEFAULT_TRAIL_GAP_PERCENT, MAX_CATEGORY_GAPS_PERCENT, MAX_INTRO_GAP_PERCENT, MAX_ITEM_GAPS_PERCENT, MAX_TRAIL_GAP_PERCENT
 
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
OverlaidVerticalCategoryPlot(CategoryAxis domain, ValueAxis range, java.lang.Object[] categories)
          Constructs a new overlaid vertical category plot.
OverlaidVerticalCategoryPlot(java.lang.String domainAxisLabel, java.lang.String rangeAxisLabel, java.lang.Object[] categories)
          Constructs a new overlaid vertical category plot.
 
Method Summary
 void add(VerticalCategoryPlot subplot)
          Adds a subplot.
 java.util.List getLegendItemLabels()
          Deprecated. use getLegendItems().
 LegendItemCollection getLegendItems()
          Returns the legend items.
 java.lang.Number getMaximumVerticalDataValue()
          Returns the maximum value in the range (since the range values are plotted against the vertical axis by this plot).
 java.lang.Number getMinimumVerticalDataValue()
          Returns the minimum value in the range (since this is plotted against the vertical axis by VerticalBarPlot).
 java.lang.String getPlotType()
          Returns a string for the plot type.
 int getSeriesCount()
          Returns the number of series in the plot.
 Range getVerticalDataRange()
          Returns the range of data values that will be plotted against the range axis.
 void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, java.awt.Shape backgroundPlotArea)
          Performs the actual drawing of the data.
 
Methods inherited from class com.jrefinery.chart.VerticalCategoryPlot
draw, getCategoryCoordinate, getCategoryDataset, getVerticalValueAxis, handleClick, isCompatibleDomainAxis, isCompatibleHorizontalAxis, isCompatibleRangeAxis, isCompatibleVerticalAxis
 
Methods inherited from class com.jrefinery.chart.CategoryPlot
addRangeMarker, clearRangeMarkers, datasetChanged, getCategoryGapsPercent, getDomainAxis, getIntroGapPercent, getItemGapsPercent, getLabelFont, getLabelFormatter, getLabelPaint, getLabelsVisible, getParent, getRangeAxis, getRenderer, getTrailGapPercent, getValueLabelsVisible, getVerticalLabels, isSubplot, setCategoryGapsPercent, setDomainAxis, setIntroGapPercent, setItemGapsPercent, setLabelFont, setLabelFormatString, setLabelPaint, setLabelsVisible, setParent, setRangeAxis, setRenderer, setTrailGapPercent, setValueLabelsVisible, setVerticalLabels, zoom
 
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
 

Constructor Detail

OverlaidVerticalCategoryPlot

public OverlaidVerticalCategoryPlot(java.lang.String domainAxisLabel,
                                    java.lang.String rangeAxisLabel,
                                    java.lang.Object[] categories)
Constructs a new overlaid vertical category plot.
Parameters:
domainAxisLabel - the label for the domain axis.
rangeAxisLabel - the label for the range axis.
categories - the categories to be shown on the domain axis.

OverlaidVerticalCategoryPlot

public OverlaidVerticalCategoryPlot(CategoryAxis domain,
                                    ValueAxis range,
                                    java.lang.Object[] categories)
Constructs a new overlaid vertical category plot.
Parameters:
domain - horizontal axis to use for all sub-plots.
range - vertical axis to use for all sub-plots.
categories - the categories to be shown on the domain axis.
Method Detail

add

public void add(VerticalCategoryPlot subplot)
Adds a subplot.

This method sets the axes of the subplot to null.

Parameters:
subplot - the subplot.

getLegendItemLabels

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

Returns an array of labels to be displayed by the legend.
Overrides:
getLegendItemLabels in class CategoryPlot
Returns:
An array of legend item labels (or null).

getLegendItems

public LegendItemCollection getLegendItems()
Returns the legend items.
Overrides:
getLegendItems in class CategoryPlot
Returns:
the legend items.

render

public void render(java.awt.Graphics2D g2,
                   java.awt.geom.Rectangle2D dataArea,
                   ChartRenderingInfo info,
                   java.awt.Shape backgroundPlotArea)
Performs the actual drawing of the data.
Overrides:
render in class VerticalCategoryPlot
Parameters:
g2 - the graphics device.
dataArea - the data area.
info - the chart rendering info.
backgroundPlotArea - ??

getPlotType

public java.lang.String getPlotType()
Returns a string for the plot type.
Overrides:
getPlotType in class VerticalCategoryPlot
Returns:
a string for the plot type.

getSeriesCount

public int getSeriesCount()
Returns the number of series in the plot.
Overrides:
getSeriesCount in class CategoryPlot
Returns:
the series count.

getVerticalDataRange

public Range getVerticalDataRange()
Returns the range of data values that will be plotted against the range axis.

If the dataset is null, this method returns null.

Overrides:
getVerticalDataRange in class VerticalCategoryPlot
Returns:
the data range.

getMinimumVerticalDataValue

public java.lang.Number getMinimumVerticalDataValue()
Returns the minimum value in the range (since this is plotted against the vertical axis by VerticalBarPlot).

This method will return null if the dataset is null.

Overrides:
getMinimumVerticalDataValue in class VerticalCategoryPlot
Returns:
The minimum value.

getMaximumVerticalDataValue

public java.lang.Number getMaximumVerticalDataValue()
Returns the maximum value in the range (since the range values are plotted against the vertical axis by this plot).

This method will return null if the dataset is null.

Overrides:
getMaximumVerticalDataValue in class VerticalCategoryPlot
Returns:
The maximum value.