datavisualizer::XYSimpleCellRenderer Class Reference

This class fills in map cell rectangles on a plot. More...

List of all members.

Public Member Functions

 XYSimpleCellRenderer ()
 Constructor.
void drawItem (java.awt.Graphics2D g2, XYItemRendererState state, java.awt.geom.Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, XYDataset dataset, int series, int item, CrosshairState crosshairState, int pass)
 Draws a single grid cell.
void SetColor (int iRed, int iGreen, int iBlue, int iSeries) throws javawrapper.ModelException
 Sets the fill color for a series.
void SetColor (Color jColor, int iSeries)
 Sets the fill color for a series.
void SetXCellLength (float fLength)
 Sets the X cell length.
void SetYCellLength (float fLength)
 Sets the Y cell length.
Color GetColor (int iSeries)
 Gets the color for a series.
Paint GetSeriesPaint (int iSeries)
 Returns the color for a series.


Detailed Description

This class fills in map cell rectangles on a plot.

The rectangle size can be set; the size defaults to the same as the underlying grid size.

The X and Y are expected to be integers which equal cell numbers in the X and Y directions. The Z is expected to be a number which controls the presence or absence of fill in a cell. true means fill; false means don't fill. Each filled cell is filled in the same color. A non-filled cell is not filled in white; it is not filled at all, which will allow anything underneath to show through.

The color can be controlled by setting the RGB value.

Originally this task was performed by XYCellRenderer. But then JFreeChart upgraded and took away my only way to find out if a cell was not to be filled, so I made this class for subplots, and simplified it for the job while I was at it.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
December 21, 2006: Created (LEM)


Constructor & Destructor Documentation

datavisualizer::XYSimpleCellRenderer::XYSimpleCellRenderer (  )  [inline]

Constructor.

Sets defaults.


Member Function Documentation

void datavisualizer::XYSimpleCellRenderer::drawItem ( java.awt.Graphics2D  g2,
XYItemRendererState  state,
java.awt.geom.Rectangle2D  dataArea,
PlotRenderingInfo  info,
XYPlot  plot,
ValueAxis  domainAxis,
ValueAxis  rangeAxis,
XYDataset  dataset,
int  series,
int  item,
CrosshairState  crosshairState,
int  pass 
) [inline]

Draws a single grid cell.

If the Z value is not true, nothing is drawn.

Parameters:
g2 - the graphics device.
state - the renderer state.
dataArea - the area within which the data is being rendered.
info - collects drawing info.
plot - the plot.
domainAxis - the domain axis.
rangeAxis - the range axis.
dataset - the dataset.
series - the series index (zero-based).
item - the item index (zero-based).
crosshairState - crosshair information for the plot (null permitted).
pass - the pass index.

Edit history:
------------------
December 21, 2006: Created while updating for JFreeChart 1.0.3 (LEM)

void datavisualizer::XYSimpleCellRenderer::SetColor ( int  iRed,
int  iGreen,
int  iBlue,
int  iSeries 
) throws javawrapper.ModelException [inline]

Sets the fill color for a series.

Parameters:
iRed The RGB red value, between 0 and 255.
iGreen The RGB green value, between 0 and 255.
iBlue The RGB blue value, between 0 and 255.
iSeries The series to set the color for.
Exceptions:
javawrapper.ModelException if the rgb values are invalid.

void datavisualizer::XYSimpleCellRenderer::SetColor ( Color  jColor,
int  iSeries 
) [inline]

Sets the fill color for a series.

Parameters:
jColor Color to set.
iSeries Series for which to set the color.

void datavisualizer::XYSimpleCellRenderer::SetXCellLength ( float  fLength  )  [inline]

Sets the X cell length.

Parameters:
fLength X cell length, in m.

void datavisualizer::XYSimpleCellRenderer::SetYCellLength ( float  fLength  )  [inline]

Sets the Y cell length.

Parameters:
fLength Y cell length, in m.

Color datavisualizer::XYSimpleCellRenderer::GetColor ( int  iSeries  )  [inline]

Gets the color for a series.

Parameters:
iSeries The series to get the color for.
Returns:
The color.

Paint datavisualizer::XYSimpleCellRenderer::GetSeriesPaint ( int  iSeries  )  [inline]

Returns the color for a series.

If the series has not been explicitly set, it returns the default.

Parameters:
iSeries the series index (zero-based).
Returns:
The paint.


The documentation for this class was generated from the following file:
Generated on Thu May 24 09:34:52 2007 for SORTIE Java Interface by  doxygen 1.5.2