Element: CellLattice.
Icon:
Text: A visualization of a set of bytes.
Description: A CellLattice is a drawing element that visualizes a scalar field defined in a rectangular area of the plane and which an have only integer values, from 0 to 255. For this purpose, the element divides the rectangle using a grid and associates to each of its cells one of several possible colors, depending on the value of the field in the cell and on the selected color scheme. The value 0 corresponds to a transparent color, thus displaying the background color of the parent drawing panel.
Table of properties |
||
Name | Description | Values accepted |
Configuration | ||
Data | The array of values for the field in each cell. | A two-dimensional array [m][n] of type int, where m and n indicate the number of cells in the X and Y axes, respectively. |
Minimum X | The minimum value in the X axis of the rectangular area of the plane displayed. | Any constant or variable of type double or int. |
Maximum X | The maximum value in the X axis of the rectangular area of the plane displayed. | Any constant or variable of type double or int. |
Minimum Y | The minimum value in the Y axis of the rectangular area of the plane displayed. | Any constant or variable of type double or int. |
Maximum Y | The maximum value in the Y axis of the rectangular area of the plane displayed. | Any constant or variable of type double or int. |
Graphical Aspect | ||
Num Colors | The number of different colors to use for the visualization. Should match the largest integer value of the field data array. | Any constant or variable of type int. |
Color Mode | The scheme used to assign a color to each of the values of the field. | One of the following constants, corresponding to a different preset color scheme.
It is also possible to provide a one-dimensional array of type Object with the palette of colors to use. Each element of this array must be an object of the class java.awt.Color. Num Colors will automatically take the value of the length of this array. The maximum length allowed is of 256 colors. |
Show Grid | Whether to draw the grid itself. | A boolean variable or one of the constants true or false. |
Grid Color | The color used to draw the grid. | An Object variable of the class java.awt.Color
or one of the predefined colors: black,
blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink,
red, white, yellow.
A color can also be specified providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate. The default value is decided by the system. |
Visible | The visibility of the element. | A boolean variable or one of the constants true or false. |