edu.ucla.stat.SOCR.chart.gui
Class ExtendedStackedBarRenderer

java.lang.Object
  extended by StackedBarRenderer
      extended by edu.ucla.stat.SOCR.chart.gui.ExtendedStackedBarRenderer

public class ExtendedStackedBarRenderer
extends StackedBarRenderer

An extension of the StackedBarRenderer that can draw positive and negative totals at the top and bottom of the stacked bars.


Constructor Summary
ExtendedStackedBarRenderer()
          Creates a new renderer.
 
Method Summary
 void drawItem(java.awt.Graphics2D g2, CategoryItemRendererState state, java.awt.geom.Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, int pass)
          Draws a stacked bar for a specific item.
 java.text.NumberFormat getTotalFormatter()
          Returns the total formatter.
 void setTotalFormatter(java.text.NumberFormat format)
          Sets the total formatter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedStackedBarRenderer

public ExtendedStackedBarRenderer()
Creates a new renderer.

Method Detail

getTotalFormatter

public java.text.NumberFormat getTotalFormatter()
Returns the total formatter.

Returns:
the total formatter (never null).

setTotalFormatter

public void setTotalFormatter(java.text.NumberFormat format)
Sets the total formatter.

Parameters:
format - the formatter (null not permitted).

drawItem

public void drawItem(java.awt.Graphics2D g2,
                     CategoryItemRendererState state,
                     java.awt.geom.Rectangle2D dataArea,
                     CategoryPlot plot,
                     CategoryAxis domainAxis,
                     ValueAxis rangeAxis,
                     CategoryDataset dataset,
                     int row,
                     int column,
                     int pass)
Draws a stacked bar for a specific item.

Parameters:
g2 - the graphics device.
state - the renderer state.
dataArea - the plot area.
plot - the plot.
domainAxis - the domain (category) axis.
rangeAxis - the range (value) axis.
dataset - the data.
row - the row index (zero-based).
column - the column index (zero-based).
pass - the pass index.