multigraph
Class BarRenderer

java.lang.Object
  extended bymultigraph.TimeSeriesMFFunction.Renderer
      extended bymultigraph.BarRenderer

public class BarRenderer
extends TimeSeriesMFFunction.Renderer

Render the graph of a function using the "BAR" style: a bar graph with filled color bars outlined in black. Works for functions whose getFieldCount() is 1.

Version:
$Id: BarRenderer.java,v 1.1.1.1 2004/11/30 22:30:41 mphillips Exp $
Author:
Mark Phillips

Field Summary
static long barWidthInMillis
           
 
Fields inherited from class multigraph.TimeSeriesMFFunction.Renderer
color, flaggedColor, flaggedRunPlotter, missingRunPlotter, multiPlotter, verticalScale
 
Constructor Summary
BarRenderer(VerticalScale verticalScale, MultiPlotter multiPlotter, java.awt.Color color, java.awt.Color flaggedColor, int missingYTop, int missingYBottom)
           
 
Method Summary
 void begin(java.awt.Graphics g, java.util.Date date)
          Prepare to plot beginning at a given date.
 java.lang.String getName()
          Return the name of this renderer: "BAR"
 void renderLegend(java.awt.Graphics g, PlotPoint p)
          Render a legend icon for this renderer.
 void renderValue(java.awt.Graphics g, java.util.Date date, MFDatum datum)
          Plot a function value at a given time point.
 
Methods inherited from class multigraph.TimeSeriesMFFunction.Renderer
createByName, end, getColor, getVScale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

barWidthInMillis

public static final long barWidthInMillis
See Also:
Constant Field Values
Constructor Detail

BarRenderer

public BarRenderer(VerticalScale verticalScale,
                   MultiPlotter multiPlotter,
                   java.awt.Color color,
                   java.awt.Color flaggedColor,
                   int missingYTop,
                   int missingYBottom)
Method Detail

getName

public java.lang.String getName()
Return the name of this renderer: "BAR"

Specified by:
getName in class TimeSeriesMFFunction.Renderer

begin

public void begin(java.awt.Graphics g,
                  java.util.Date date)
Prepare to plot beginning at a given date.

Overrides:
begin in class TimeSeriesMFFunction.Renderer
Parameters:
g - the Graphics object to draw in
date - the date where plotting will begin

renderValue

public void renderValue(java.awt.Graphics g,
                        java.util.Date date,
                        MFDatum datum)
Plot a function value at a given time point.

Overrides:
renderValue in class TimeSeriesMFFunction.Renderer
Parameters:
g - the Graphics object to draw in
date - the date value of the sample to render
datum - the function value of the sample to render; must have field count 1.

renderLegend

public void renderLegend(java.awt.Graphics g,
                         PlotPoint p)
Render a legend icon for this renderer.

Overrides:
renderLegend in class TimeSeriesMFFunction.Renderer
Parameters:
g - the Graphics object to draw in
p - the location to draw the icon at