SORTIE Java Interface
1
|
This class fills in map cell rectangles on a plot. More...
Classes | |
class | CellTooltipGenerator |
Provides a more informative tooltip string for cell values. More... | |
Public Member Functions | |
XYCellRenderer () | |
Whether to draw the shapes with a texture (true), or in solid color (false). More... | |
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. More... | |
void | setMaximumValue (float fValue) |
Sets the value of a cell above which all cells will be painted the maximum color. More... | |
void | setMinimumValue (float fValue) |
Sets the value of a cell below which all cells will be painted the minimum color. More... | |
void | setKneeValue (float fValue) |
Sets the knee value which corresponds to the knee color. More... | |
void | setMaximumColor (int iRed, int iGreen, int iBlue, int iSeries) throws sortie.data.simpletypes.ModelException |
Sets the maximum color. More... | |
void | setMinimumColor (int iRed, int iGreen, int iBlue, int iSeries) throws sortie.data.simpletypes.ModelException |
Sets the minimum color. More... | |
void | setKneeColor (int iRed, int iGreen, int iBlue, int iSeries) throws sortie.data.simpletypes.ModelException |
Sets the knee color. More... | |
void | setKneeColor (Color jColor, int iSeries) |
Sets the knee color for a series. More... | |
void | setMaximumColor (Color jColor, int iSeries) |
Sets the max color for a series. More... | |
void | setMinimumColor (Color jColor, int iSeries) |
Sets the minimum color for a series. More... | |
void | setXCellLength (float fLength) |
Sets the X cell length. More... | |
void | setYCellLength (float fLength) |
Sets the Y cell length. More... | |
float | getMinimumValue () |
Gets the minimum value below which the minimum color is always used. More... | |
float | getMaximumValue () |
Gets the maximum value above which the maximum color is always used. More... | |
float | getKneeValue () |
Gets the knee value at which the knee color is always used. More... | |
Color | getMinimumColor (int iSeries) |
Gets the minimum color for a series. More... | |
Color | getMaximumColor (int iSeries) |
Gets the maximum color for a series. More... | |
Color | getKneeColor (int iSeries) |
Gets the knee color for a series. More... | |
Paint | getSeriesKneePaint (int iSeries) |
Returns the knee color for a series. More... | |
Paint | getSeriesMinPaint (int iSeries) |
Returns the knee color for a series. More... | |
Protected Member Functions | |
void | setSeriesMinPaint (int iSeries, Color jColor) |
Sets the minimum color for a series. More... | |
void | setSeriesKneePaint (int iSeries, Color jColor) |
Sets the knee color for a series. More... | |
Private Attributes | |
float | m_fXCellSize = 8 |
Length of each cell in the X direction, in meters. More... | |
float | m_fYCellSize = 8 |
Length of each cell in the Y direction, in meters. More... | |
float | m_fMinimumValue = 0 |
The value of a cell below which all cells are minimum color - defaults to 0. More... | |
float | m_fMaximumValue = 100 |
The value of a cell above which all cells are maximum color - defaults to 100. More... | |
float | m_fKneeValue = 50 |
The value of a cell at the knee color - defaults to 50. More... | |
org.jfree.util.PaintList | m_jKneePaintList = new org.jfree.util.PaintList() |
Minimum color - red value from 0 to 255. More... | |
org.jfree.util.PaintList | m_jMinPaintList = new org.jfree.util.PaintList() |
The minimum color paint list. More... | |
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 2012 Company: Cary Institute of Ecosystem Studies
Edit history:
---------------—
December 8, 2011: Wiped the slate clean for version 7 (LEM)
sortie.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.
void sortie.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.
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. |
Color sortie.datavisualizer.XYCellRenderer.getKneeColor | ( | int | iSeries | ) |
Gets the knee color for a series.
iSeries | The series to get the color for. |
float sortie.datavisualizer.XYCellRenderer.getKneeValue | ( | ) |
Gets the knee value at which the knee color is always used.
Color sortie.datavisualizer.XYCellRenderer.getMaximumColor | ( | int | iSeries | ) |
Gets the maximum color for a series.
iSeries | The series to get the color for. |
float sortie.datavisualizer.XYCellRenderer.getMaximumValue | ( | ) |
Gets the maximum value above which the maximum color is always used.
Color sortie.datavisualizer.XYCellRenderer.getMinimumColor | ( | int | iSeries | ) |
Gets the minimum color for a series.
iSeries | The series to get the color for. |
float sortie.datavisualizer.XYCellRenderer.getMinimumValue | ( | ) |
Gets the minimum value below which the minimum color is always used.
Paint sortie.datavisualizer.XYCellRenderer.getSeriesKneePaint | ( | int | iSeries | ) |
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 sortie.datavisualizer.XYCellRenderer.getSeriesMinPaint | ( | int | iSeries | ) |
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 sortie.datavisualizer.XYCellRenderer.setKneeColor | ( | int | iRed, |
int | iGreen, | ||
int | iBlue, | ||
int | iSeries | ||
) | throws sortie.data.simpletypes.ModelException |
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. |
sortie.data.simpletypes.ModelException | if the rgb values are invalid. |
void sortie.datavisualizer.XYCellRenderer.setKneeColor | ( | Color | jColor, |
int | iSeries | ||
) |
Sets the knee color for a series.
jColor | Color to set. |
iSeries | Series for which to set the color. |
void sortie.datavisualizer.XYCellRenderer.setKneeValue | ( | float | fValue | ) |
Sets the knee value which corresponds to the knee color.
fValue | Knee value. |
void sortie.datavisualizer.XYCellRenderer.setMaximumColor | ( | int | iRed, |
int | iGreen, | ||
int | iBlue, | ||
int | iSeries | ||
) | throws sortie.data.simpletypes.ModelException |
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. |
sortie.data.simpletypes.ModelException | if the rgb values are invalid. |
void sortie.datavisualizer.XYCellRenderer.setMaximumColor | ( | Color | jColor, |
int | iSeries | ||
) |
Sets the max color for a series.
jColor | Color to set. |
iSeries | Series for which to set the color. |
void sortie.datavisualizer.XYCellRenderer.setMaximumValue | ( | float | fValue | ) |
Sets the value of a cell above which all cells will be painted the maximum color.
fValue | Maximum value. |
void sortie.datavisualizer.XYCellRenderer.setMinimumColor | ( | int | iRed, |
int | iGreen, | ||
int | iBlue, | ||
int | iSeries | ||
) | throws sortie.data.simpletypes.ModelException |
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. |
sortie.data.simpletypes.ModelException | if the rgb values are invalid. |
void sortie.datavisualizer.XYCellRenderer.setMinimumColor | ( | Color | jColor, |
int | iSeries | ||
) |
Sets the minimum color for a series.
jColor | Color to set. |
iSeries | Series for which to set the color. |
void sortie.datavisualizer.XYCellRenderer.setMinimumValue | ( | float | fValue | ) |
Sets the value of a cell below which all cells will be painted the minimum color.
fValue | Minimum value. |
|
protected |
Sets the knee color for a series.
iSeries | Series index (zero-based). |
jColor | The color to set. |
|
protected |
Sets the minimum color for a series.
iSeries | Series index (zero-based). |
jColor | The color to set. |
void sortie.datavisualizer.XYCellRenderer.setXCellLength | ( | float | fLength | ) |
Sets the X cell length.
fLength | X cell length, in m. |
void sortie.datavisualizer.XYCellRenderer.setYCellLength | ( | float | fLength | ) |
Sets the Y cell length.
fLength | Y cell length, in m. |
|
private |
The value of a cell at the knee color - defaults to 50.
Applies to all series.
|
private |
The value of a cell above which all cells are maximum color - defaults to 100.
Applies to all series.
|
private |
The value of a cell below which all cells are minimum color - defaults to 0.
Applies to all series.
|
private |
Length of each cell in the X direction, in meters.
|
private |
Length of each cell in the Y direction, in meters.
|
private |
Minimum color - red value from 0 to 255.
Minimum color - green value from 0 to 255 Minimum color - blue value from 0 to 255 Maximum color - red value from 0 to 255 Maximum color - green value from 0 to 255 Maximum color - blue value from 0 to 255 The knee color - red value from 0 to 255 The knee color - blue value from 0 to 255 The knee color - green value from 0 to 255 The knee paint list
|
private |
The minimum color paint list.