datavisualizer::XYCellRenderer Class Reference

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

List of all members.

Public Member Functions

 XYCellRenderer ()
 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 SetMaximumValue (float fValue)
 Sets the value of a cell above which all cells will be painted the maximum color.
void SetMinimumValue (float fValue)
 Sets the value of a cell below which all cells will be painted the minimum color.
void SetKneeValue (float fValue)
 Sets the knee value which corresponds to the knee color.
void SetMaximumColor (int iRed, int iGreen, int iBlue, int iSeries) throws javawrapper.ModelException
 Sets the maximum color.
void SetMinimumColor (int iRed, int iGreen, int iBlue, int iSeries) throws javawrapper.ModelException
 Sets the minimum color.
void SetKneeColor (int iRed, int iGreen, int iBlue, int iSeries) throws javawrapper. ModelException
 Sets the knee color.
void SetKneeColor (Color jColor, int iSeries)
 Sets the knee color for a series.
void SetMaximumColor (Color jColor, int iSeries)
 Sets the max color for a series.
void SetMinimumColor (Color jColor, int iSeries)
 Sets the minimum color for a series.
void SetXCellLength (float fLength)
 Sets the X cell length.
void SetYCellLength (float fLength)
 Sets the Y cell length.
float GetMinimumValue ()
 Gets the minimum value below which the minimum color is always used.
float GetMaximumValue ()
 Gets the maximum value above which the maximum color is always used.
float GetKneeValue ()
 Gets the knee value at which the knee color is always used.
Color GetMinimumColor (int iSeries)
 Gets the minimum color for a series.
Color GetMaximumColor (int iSeries)
 Gets the maximum color for a series.
Color GetKneeColor (int iSeries)
 Gets the knee color for a series.
Paint GetSeriesKneePaint (int iSeries)
 Returns the knee color for a series.
Paint GetSeriesMinPaint (int iSeries)
 Returns the knee color for a series.

Protected Member Functions

void SetSeriesMinPaint (int iSeries, Color jColor)
 Sets the minimum color for a series.
void SetSeriesKneePaint (int iSeries, Color jColor)
 Sets the knee 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 color intensity of the cell. The cells are filled in a specified color at the specified intensity. For a range of values, the grayscale color gradient looks nice. I would intensively test any other color.

The color gradient can be controlled by setting the minimum, maximum, and knee RGB values. Below the minimum value, all cells are minimum color (defaults to black). Above the maximum value, all cells are maximum color (defaults to white). The knee value represents the mid-point knee color (defaults to 50% gray). This lets you tweak the display if your dataset is not evenly distributed.

Copyright: Copyright (c) Charles D. Canham 2003

Company: Institute of Ecosystem Studies

Author:
Lora E. Murphy
Version:
1.0

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
May 5, 2004: Made this from grayscale to color (LEM)
May 11, 2004: Made this both fill and draw the rectangles so there would be grid lines. (LEM)
June 22, 2004: Added support for series colors (LEM)


Constructor & Destructor Documentation

datavisualizer::XYCellRenderer::XYCellRenderer (  )  [inline]

Constructor.

Sets defaults.


Member Function Documentation

void datavisualizer::XYCellRenderer::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 there is no Z value, 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 (can be used to obtain standard color information etc).
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:
------------------
April 28, 2004: Submitted in beta version (LEM)
May 5, 2004: Made this from grayscale to color (LEM)
May 11, 2004: Made this both fill and draw the rectangles so there would be grid lines. (LEM)
June 22, 2004: Added support for series colors (LEM)
June 29, 2004: Made it not draw anything if a value was null
December 21, 2006: Updated for JFreeChart 1.0.3 (LEM)

void datavisualizer::XYCellRenderer::SetMaximumValue ( float  fValue  )  [inline]

Sets the value of a cell above which all cells will be painted the maximum color.

Parameters:
fValue Maximum value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void datavisualizer::XYCellRenderer::SetMinimumValue ( float  fValue  )  [inline]

Sets the value of a cell below which all cells will be painted the minimum color.

Parameters:
fValue Minimum value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

void datavisualizer::XYCellRenderer::SetKneeValue ( float  fValue  )  [inline]

Sets the knee value which corresponds to the knee color.

Parameters:
fValue Knee value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

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

Sets the maximum color.

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 maximum color for.
Exceptions:
javawrapper.ModelException if the rgb values are invalid.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
May 5, 2004: Updated to take RGB instead of grayscale (LEM)

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

Sets the minimum color.

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 minimum color for.
Exceptions:
javawrapper.ModelException if the rgb values are invalid.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
May 5, 2004: Updated to take RGB instead of grayscale (LEM)

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

Sets the knee color.

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 minimum color for.
Exceptions:
javawrapper.ModelException if the rgb values are invalid.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)
May 5, 2004: Updated to take RGB instead of grayscale (LEM)

void datavisualizer::XYCellRenderer::SetKneeColor ( Color  jColor,
int  iSeries 
) [inline]

Sets the knee color for a series.

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

void datavisualizer::XYCellRenderer::SetMaximumColor ( Color  jColor,
int  iSeries 
) [inline]

Sets the max color for a series.

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

void datavisualizer::XYCellRenderer::SetMinimumColor ( Color  jColor,
int  iSeries 
) [inline]

Sets the minimum color for a series.

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

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

Sets the X cell length.

Parameters:
fLength X cell length, in m.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

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

Sets the Y cell length.

Parameters:
fLength Y cell length, in m.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

float datavisualizer::XYCellRenderer::GetMinimumValue (  )  [inline]

Gets the minimum value below which the minimum color is always used.

Returns:
The minimum value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

float datavisualizer::XYCellRenderer::GetMaximumValue (  )  [inline]

Gets the maximum value above which the maximum color is always used.

Returns:
The maximum value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

float datavisualizer::XYCellRenderer::GetKneeValue (  )  [inline]

Gets the knee value at which the knee color is always used.

Returns:
The knee value.

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Color datavisualizer::XYCellRenderer::GetMinimumColor ( int  iSeries  )  [inline]

Gets the minimum color for a series.

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

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Color datavisualizer::XYCellRenderer::GetMaximumColor ( int  iSeries  )  [inline]

Gets the maximum color for a series.

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

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Color datavisualizer::XYCellRenderer::GetKneeColor ( int  iSeries  )  [inline]

Gets the knee color for a series.

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

Edit history:
------------------
April 28, 2004: Submitted in beta version (LEM)

Paint datavisualizer::XYCellRenderer::GetSeriesKneePaint ( int  iSeries  )  [inline]

Returns the knee 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.

Paint datavisualizer::XYCellRenderer::GetSeriesMinPaint ( int  iSeries  )  [inline]

Returns the knee 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.

void datavisualizer::XYCellRenderer::SetSeriesMinPaint ( int  iSeries,
Color  jColor 
) [inline, protected]

Sets the minimum color for a series.

Parameters:
iSeries Series index (zero-based).
jColor The color to set.

void datavisualizer::XYCellRenderer::SetSeriesKneePaint ( int  iSeries,
Color  jColor 
) [inline, protected]

Sets the knee color for a series.

Parameters:
iSeries Series index (zero-based).
jColor The color to set.


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