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. |
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
datavisualizer::XYCellRenderer::XYCellRenderer | ( | ) | [inline] |
Constructor.
Sets defaults.
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.
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. |
void datavisualizer::XYCellRenderer::SetMaximumValue | ( | float | fValue | ) | [inline] |
Sets the value of a cell above which all cells will be painted the maximum color.
fValue | Maximum value. |
void datavisualizer::XYCellRenderer::SetMinimumValue | ( | float | fValue | ) | [inline] |
Sets the value of a cell below which all cells will be painted the minimum color.
fValue | Minimum value. |
void datavisualizer::XYCellRenderer::SetKneeValue | ( | float | fValue | ) | [inline] |
Sets the knee value which corresponds to the knee color.
fValue | Knee value. |
void datavisualizer::XYCellRenderer::SetMaximumColor | ( | int | iRed, | |
int | iGreen, | |||
int | iBlue, | |||
int | iSeries | |||
) | throws javawrapper.ModelException [inline] |
Sets the maximum color.
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. |
javawrapper.ModelException | if the rgb values are invalid. |
void datavisualizer::XYCellRenderer::SetMinimumColor | ( | int | iRed, | |
int | iGreen, | |||
int | iBlue, | |||
int | iSeries | |||
) | throws javawrapper.ModelException [inline] |
Sets the minimum color.
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. |
javawrapper.ModelException | if the rgb values are invalid. |
void datavisualizer::XYCellRenderer::SetKneeColor | ( | int | iRed, | |
int | iGreen, | |||
int | iBlue, | |||
int | iSeries | |||
) | throws javawrapper. ModelException [inline] |
Sets the knee color.
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. |
javawrapper.ModelException | if the rgb values are invalid. |
void datavisualizer::XYCellRenderer::SetKneeColor | ( | Color | jColor, | |
int | iSeries | |||
) | [inline] |
Sets the knee color for a series.
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.
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.
jColor | Color to set. | |
iSeries | Series for which to set the color. |
void datavisualizer::XYCellRenderer::SetXCellLength | ( | float | fLength | ) | [inline] |
Sets the X cell length.
fLength | X cell length, in m. |
void datavisualizer::XYCellRenderer::SetYCellLength | ( | float | fLength | ) | [inline] |
Sets the Y cell length.
fLength | Y cell length, in m. |
float datavisualizer::XYCellRenderer::GetMinimumValue | ( | ) | [inline] |
Gets the minimum value below which the minimum color is always used.
float datavisualizer::XYCellRenderer::GetMaximumValue | ( | ) | [inline] |
Gets the maximum value above which the maximum color is always used.
float datavisualizer::XYCellRenderer::GetKneeValue | ( | ) | [inline] |
Gets the knee value at which the knee color is always used.
Color datavisualizer::XYCellRenderer::GetMinimumColor | ( | int | iSeries | ) | [inline] |
Gets the minimum color for a series.
iSeries | The series to get the color for. |
Color datavisualizer::XYCellRenderer::GetMaximumColor | ( | int | iSeries | ) | [inline] |
Gets the maximum color for a series.
iSeries | The series to get the color for. |
Color datavisualizer::XYCellRenderer::GetKneeColor | ( | int | iSeries | ) | [inline] |
Gets the knee color for a series.
iSeries | The series to get the color for. |
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.
iSeries | the series index (zero-based). |
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.
iSeries | the series index (zero-based). |
void datavisualizer::XYCellRenderer::SetSeriesMinPaint | ( | int | iSeries, | |
Color | jColor | |||
) | [inline, protected] |
Sets the minimum color for a series.
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.
iSeries | Series index (zero-based). | |
jColor | The color to set. |