datavisualizer.XYCellRenderer Class Reference

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

Inherits org::jfree::chart::renderer::xy::AbstractXYItemRenderer, and org::jfree::chart::renderer::xy::XYItemRenderer.

List of all members.

Public Member Functions

 XYCellRenderer ()
 Whether to draw the shapes with a texture (true), or in solid color (false).
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 ()
 Whether to draw the grids with a texture or with a solid color.
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.

Static Package Attributes

static final long serialVersionUID = 1

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()
 Minimum color - red value from 0 to 255.
org.jfree.util.PaintList m_jMinPaintList = new org.jfree.util.PaintList()
 The minimum color paint list.

Classes

class  CellTooltipGenerator
 Provides a more informative tooltip string for cell values. More...


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)
February 4, 2008: Updated to conform to Java 6 compliance (LEM)

Constructor & Destructor Documentation

datavisualizer.XYCellRenderer.XYCellRenderer (  ) 

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

The color used is the same either way. 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 
)

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  ) 

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  ) 

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  ) 

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

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

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

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 
)

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 
)

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 
)

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  ) 

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  ) 

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

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

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). 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 (  ) 

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  ) 

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  ) 

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  ) 

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  ) 

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  ) 

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 
) [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 
) [protected]

Sets the knee color for a series.

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


Member Data Documentation

final long datavisualizer.XYCellRenderer.serialVersionUID = 1 [static, package]

Length of each cell in the X direction, in meters.

Length of each cell in the Y direction, in meters.

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

Applies to all series.

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

Applies to all series.

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

Applies to all series.

org.jfree.util.PaintList datavisualizer.XYCellRenderer.m_jKneePaintList = new org.jfree.util.PaintList() [private]

Minimum color - red value from 0 to 255.

Minimum color - green value from 0 to 255Minimum color - blue value from 0 to 255Maximum color - red value from 0 to 255Maximum color - green value from 0 to 255Maximum color - blue value from 0 to 255The knee color - red value from 0 to 255The knee color - blue value from 0 to 255The knee color - green value from 0 to 255 The knee paint list

org.jfree.util.PaintList datavisualizer.XYCellRenderer.m_jMinPaintList = new org.jfree.util.PaintList() [private]

The minimum color paint list.


The documentation for this class was generated from the following file:

Generated on Wed Oct 28 14:01:18 2009 for SORTIE Java Interface by  doxygen 1.5.6