SORTIE Java Interface  1
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
sortie.datavisualizer.XYCellRenderer Class Reference

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

Inheritance diagram for sortie.datavisualizer.XYCellRenderer:

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

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 2012 Company: Cary Institute of Ecosystem Studies

Author
Lora E. Murphy
Version
1.0


Edit history:
---------------—
December 8, 2011: Wiped the slate clean for version 7 (LEM)

Constructor & Destructor Documentation

◆ XYCellRenderer()

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.

Member Function Documentation

◆ drawItem()

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.

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.

◆ getKneeColor()

Color sortie.datavisualizer.XYCellRenderer.getKneeColor ( int  iSeries)

Gets the knee color for a series.

Parameters
iSeriesThe series to get the color for.
Returns
The knee color.

◆ getKneeValue()

float sortie.datavisualizer.XYCellRenderer.getKneeValue ( )

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

Returns
The knee value.

◆ getMaximumColor()

Color sortie.datavisualizer.XYCellRenderer.getMaximumColor ( int  iSeries)

Gets the maximum color for a series.

Parameters
iSeriesThe series to get the color for.
Returns
The maximum color.

◆ getMaximumValue()

float sortie.datavisualizer.XYCellRenderer.getMaximumValue ( )

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

Returns
The maximum value.

◆ getMinimumColor()

Color sortie.datavisualizer.XYCellRenderer.getMinimumColor ( int  iSeries)

Gets the minimum color for a series.

Parameters
iSeriesThe series to get the color for.
Returns
The minimum color.

◆ getMinimumValue()

float sortie.datavisualizer.XYCellRenderer.getMinimumValue ( )

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

Returns
The minimum value.

◆ getSeriesKneePaint()

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.

Parameters
iSeriesthe series index (zero-based).
Returns
The paint.

◆ getSeriesMinPaint()

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.

Parameters
iSeriesthe series index (zero-based).
Returns
The paint.

◆ setKneeColor() [1/2]

void sortie.datavisualizer.XYCellRenderer.setKneeColor ( int  iRed,
int  iGreen,
int  iBlue,
int  iSeries 
) throws sortie.data.simpletypes.ModelException

Sets the knee color.

Parameters
iRedThe RGB red value, between 0 and 255.
iGreenThe RGB green value, between 0 and 255.
iBlueThe RGB blue value, between 0 and 255.
iSeriesThe series to set the minimum color for.
Exceptions
sortie.data.simpletypes.ModelExceptionif the rgb values are invalid.

◆ setKneeColor() [2/2]

void sortie.datavisualizer.XYCellRenderer.setKneeColor ( Color  jColor,
int  iSeries 
)

Sets the knee color for a series.

Parameters
jColorColor to set.
iSeriesSeries for which to set the color.

◆ setKneeValue()

void sortie.datavisualizer.XYCellRenderer.setKneeValue ( float  fValue)

Sets the knee value which corresponds to the knee color.

Parameters
fValueKnee value.

◆ setMaximumColor() [1/2]

void sortie.datavisualizer.XYCellRenderer.setMaximumColor ( int  iRed,
int  iGreen,
int  iBlue,
int  iSeries 
) throws sortie.data.simpletypes.ModelException

Sets the maximum color.

Parameters
iRedThe RGB red value, between 0 and 255.
iGreenThe RGB green value, between 0 and 255.
iBlueThe RGB blue value, between 0 and 255.
iSeriesThe series to set the maximum color for.
Exceptions
sortie.data.simpletypes.ModelExceptionif the rgb values are invalid.

◆ setMaximumColor() [2/2]

void sortie.datavisualizer.XYCellRenderer.setMaximumColor ( Color  jColor,
int  iSeries 
)

Sets the max color for a series.

Parameters
jColorColor to set.
iSeriesSeries for which to set the color.

◆ setMaximumValue()

void sortie.datavisualizer.XYCellRenderer.setMaximumValue ( float  fValue)

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

Parameters
fValueMaximum value.

◆ setMinimumColor() [1/2]

void sortie.datavisualizer.XYCellRenderer.setMinimumColor ( int  iRed,
int  iGreen,
int  iBlue,
int  iSeries 
) throws sortie.data.simpletypes.ModelException

Sets the minimum color.

Parameters
iRedThe RGB red value, between 0 and 255.
iGreenThe RGB green value, between 0 and 255.
iBlueThe RGB blue value, between 0 and 255.
iSeriesThe series to set the minimum color for.
Exceptions
sortie.data.simpletypes.ModelExceptionif the rgb values are invalid.

◆ setMinimumColor() [2/2]

void sortie.datavisualizer.XYCellRenderer.setMinimumColor ( Color  jColor,
int  iSeries 
)

Sets the minimum color for a series.

Parameters
jColorColor to set.
iSeriesSeries for which to set the color.

◆ setMinimumValue()

void sortie.datavisualizer.XYCellRenderer.setMinimumValue ( float  fValue)

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

Parameters
fValueMinimum value.

◆ setSeriesKneePaint()

void sortie.datavisualizer.XYCellRenderer.setSeriesKneePaint ( int  iSeries,
Color  jColor 
)
protected

Sets the knee color for a series.

Parameters
iSeriesSeries index (zero-based).
jColorThe color to set.

◆ setSeriesMinPaint()

void sortie.datavisualizer.XYCellRenderer.setSeriesMinPaint ( int  iSeries,
Color  jColor 
)
protected

Sets the minimum color for a series.

Parameters
iSeriesSeries index (zero-based).
jColorThe color to set.

◆ setXCellLength()

void sortie.datavisualizer.XYCellRenderer.setXCellLength ( float  fLength)

Sets the X cell length.

Parameters
fLengthX cell length, in m.

◆ setYCellLength()

void sortie.datavisualizer.XYCellRenderer.setYCellLength ( float  fLength)

Sets the Y cell length.

Parameters
fLengthY cell length, in m.

Member Data Documentation

◆ m_fKneeValue

float sortie.datavisualizer.XYCellRenderer.m_fKneeValue = 50
private

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

Applies to all series.

◆ m_fMaximumValue

float sortie.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.

◆ m_fMinimumValue

float sortie.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.

◆ m_fXCellSize

float sortie.datavisualizer.XYCellRenderer.m_fXCellSize = 8
private

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

◆ m_fYCellSize

float sortie.datavisualizer.XYCellRenderer.m_fYCellSize = 8
private

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

◆ m_jKneePaintList

org.jfree.util.PaintList sortie.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 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

◆ m_jMinPaintList

org.jfree.util.PaintList sortie.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: