C
- The class representing the cells of the gridpublic abstract class ImageGridRenderer<C>
extends java.lang.Object
Abstract renderer which transforms a grid into an image. If the grid has three or more dimensions, a cutting plane must be specified. The renderer creates an image from a grid with one or two dimensions by simply iterating over the values. Concrete implementations of this class only need to provide a method to determine the color for a given cell value in the grid.
This class currently only supports CellGrids.
Constructor and Description |
---|
ImageGridRenderer() |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
createImage(CellGrid<C> grid)
Render a grid into an image.
|
java.awt.image.BufferedImage |
createImage(CellGrid<C> grid,
int[] plane)
Render a grid into an image using a cutting plane.
|
protected abstract java.awt.Color |
getColor(C cell)
Get the color for a particular cell of data.
|
public java.awt.image.BufferedImage createImage(CellGrid<C> grid)
grid
- the grid to convert to an imagepublic java.awt.image.BufferedImage createImage(CellGrid<C> grid, int[] plane)
grid
- the grid to convert to an imageplane
- the cutting planeprotected abstract java.awt.Color getColor(C cell)
cell
- the cell value to be colored