com.jrefinery.chart
Class StackedVerticalBarRenderer3D

java.lang.Object
  extended by com.jrefinery.chart.AbstractCategoryItemRenderer
      extended by com.jrefinery.chart.BarRenderer
          extended by com.jrefinery.chart.VerticalBarRenderer
              extended by com.jrefinery.chart.VerticalBarRenderer3D
                  extended by com.jrefinery.chart.StackedVerticalBarRenderer3D
All Implemented Interfaces:
CategoryItemRenderer

public class StackedVerticalBarRenderer3D
extends VerticalBarRenderer3D

Renders vertical stacked bars with 3D-effect.


Field Summary
 
Fields inherited from class com.jrefinery.chart.VerticalBarRenderer3D
effect3d
 
Fields inherited from class com.jrefinery.chart.BarRenderer
BAR_OUTLINE_WIDTH_THRESHOLD, categoryGapSpan, categorySpan, itemGapSpan, itemSpan, itemWidth, zeroInJava2D
 
Fields inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer
info, toolTipGenerator
 
Constructor Summary
StackedVerticalBarRenderer3D()
           
 
Method Summary
 int barWidthsPerCategory(CategoryDataset data)
          This will be a method in the renderer that tells whether there is one bar width per category or onebarwidth per series per category.
 void drawCategoryItem(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, ValueAxis axis, CategoryDataset data, int series, java.lang.Object category, int categoryIndex, java.lang.Object previousCategory)
          Draws an individual item.
 boolean hasItemGaps()
          Returns false, since the items in each category are stacked on top of one another.
 boolean isStacked()
          Returns true, to indicate that this renderer stacks values.
 
Methods inherited from class com.jrefinery.chart.VerticalBarRenderer3D
drawPlotBackground, drawRangeMarker, getAxisArea, getDataClipRegion
 
Methods inherited from class com.jrefinery.chart.VerticalBarRenderer
initialise
 
Methods inherited from class com.jrefinery.chart.BarRenderer
calculateCategoryAndItemSpans
 
Methods inherited from class com.jrefinery.chart.AbstractCategoryItemRenderer
getToolTipGenerator, setToolTipGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackedVerticalBarRenderer3D

public StackedVerticalBarRenderer3D()
Method Detail

isStacked

public boolean isStacked()
Returns true, to indicate that this renderer stacks values. This affects the axis range required to display all values.

Specified by:
isStacked in interface CategoryItemRenderer
Overrides:
isStacked in class BarRenderer
Returns:
The flag.

barWidthsPerCategory

public int barWidthsPerCategory(CategoryDataset data)
This will be a method in the renderer that tells whether there is one bar width per category or onebarwidth per series per category.

Overrides:
barWidthsPerCategory in class VerticalBarRenderer3D
Parameters:
data - The dataset.
Returns:
The number of bar widths per category.

hasItemGaps

public boolean hasItemGaps()
Returns false, since the items in each category are stacked on top of one another.

Overrides:
hasItemGaps in class VerticalBarRenderer3D
Returns:
Always true.

drawCategoryItem

public void drawCategoryItem(java.awt.Graphics2D g2,
                             java.awt.geom.Rectangle2D dataArea,
                             CategoryPlot plot,
                             ValueAxis axis,
                             CategoryDataset data,
                             int series,
                             java.lang.Object category,
                             int categoryIndex,
                             java.lang.Object previousCategory)
Draws an individual item. There are some bug-fixes in the StackedVerticalBarRenderer class that need to get applied here...

Specified by:
drawCategoryItem in interface CategoryItemRenderer
Overrides:
drawCategoryItem in class VerticalBarRenderer3D
Parameters:
g2 - The graphics device.
dataArea - The area for plotting the data.
plot - The plot.
axis - The range axis.
data - The dataset.
series - The series (zero-based index).
category - The category.
categoryIndex - The category index (zero-based).
previousCategory - The previous category.


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.