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 (Graphics2D jGraphics2, Rectangle2D jDataArea, PlotRenderingInfo oInfo, XYPlot oPlot, ValueAxis oDomainAxis, ValueAxis oRangeAxis, XYDataset oDataset, int iSeries, int iItem, CrosshairInfo oCrosshairInfo, int iPass)
 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.
void SetUseTexture (boolean bUse)
 Whether to draw the grids with a texture or with a solid color.
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.

Private Attributes

float m_fXCellSize = 8
 Length of each cell in the X direction, in meters.
float m_fYCellSize = 8
 Length of each cell in the Y direction, in meters.
float m_fMinimumValue = 0
 The value of a cell below which all cells are minimum color - defaults to 0.
float m_fMaximumValue = 100
 The value of a cell above which all cells are maximum color - defaults to 100.
float m_fKneeValue = 50
 The value of a cell at the knee color - defaults to 50.
org.jfree.util.PaintList m_jKneePaintList = new org.jfree.util.PaintList()
 The knee paint list.
org.jfree.util.PaintList m_jMinPaintList = new org.jfree.util.PaintList()
 The minimum color paint list.
boolean m_bTexture = false
 Whether to draw the shapes with a texture (true), or in solid color (false).


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 Graphics2D  jGraphics2,
Rectangle2D  jDataArea,
PlotRenderingInfo  oInfo,
XYPlot  oPlot,
ValueAxis  oDomainAxis,
ValueAxis  oRangeAxis,
XYDataset  oDataset,
int  iSeries,
int  iItem,
CrosshairInfo  oCrosshairInfo,
int  iPass
[inline]
 

Draws a single grid cell.

If there is no Z value, nothing is drawn.

Parameters:
jGraphics2 Graphics object
jDataArea The plot rectangle
oInfo Plot rendering info object
oPlot Plot area
oDomainAxis X axis
oRangeAxis Y axis
oDataset Dataset to graph
iSeries Item series
iItem Item
oCrosshairInfo Crosshair info
iPass Pass (don't know what this was)

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

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)

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::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)

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)

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)

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)

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::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::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::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 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::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::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::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::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::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::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.

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::SetUseTexture boolean  bUse  )  [inline]
 

Whether to draw the grids with a texture or with a solid color.

The texture can be drawn over a solid color.

Parameters:
bUse Whether to use a texture (true) or a solid color (false).

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)


Member Data Documentation

boolean datavisualizer::XYCellRenderer::m_bTexture = false [private]
 

Whether to draw the shapes with a texture (true), or in solid color (false).

The color used is the same either way.

float datavisualizer::XYCellRenderer::m_fKneeValue = 50 [private]
 

The value of a cell at the knee color - defaults to 50.

Applies to all series.

float datavisualizer::XYCellRenderer::m_fMaximumValue = 100 [private]
 

The value of a cell above which all cells are maximum color - defaults to 100.

Applies to all series.

float datavisualizer::XYCellRenderer::m_fMinimumValue = 0 [private]
 

The value of a cell below which all cells are minimum color - defaults to 0.

Applies to all series.


The documentation for this class was generated from the following file:
Generated on Mon Mar 27 15:15:28 2006 for SORTIE Java Interface by  doxygen 1.4.6-NO