DataHubTable Cell Specification — specifies the position and contents of a table cell.
A cell specification is a delimited string specifying the position and contents of a non-empty cell. Part of the specification is a content type. The arguments in the cell specification depend on the content type. The arguments must be specified in the order listed in the tables below. If you wish to specify an optional argument, you must also specify all arguments preceding it. If you wish to use the default value for an optional argument, specify null for that argument.
A label specifies a text string that does not change.
Argument | Type | Default | Description |
---|---|---|---|
row | color | required | The cell row, starting at 1. |
column | color | required | The cell column, starting at 1 |
type | number | required | 0 for a label cell. |
label | string | required | The text to display in the cell. |
xalignment | string | left | left, center or right horizontal alignment of the text in the cell. |
yalignment | string | center | top, center or bottom vertical alignment of the text in the cell. |
fgcolor | color | table default | The color used to render the text. If not specified, uses the table's fgcolor parameter. |
bgcolor | color | table default | The color used to render the cell background. If not specified, uses the table's bgcolor parameter. |
<PARAM NAME="cell1" VALUE="2;3;0;Test;left;center;#ffff00;#0000ff">
Will render the word Test in cell (2, 3) with left/center justification in yellow text on a blue background.
This cell will display the value of a DataHub point. If the point value is a number you can specify the decimal format with which it is displayed.
Argument | Type | Default | Description |
---|---|---|---|
row | color | required | The cell row, starting at 1. |
column | color | required | The cell column, starting at 1. |
type | number | required | 1 for DataHub point value. |
pointname | string | required | The unqualified point name (no domain: part) to display. |
xalignment | string | left | left, center or right horizontal alignment of the text in the cell. |
yalignment | string | center | top, center or bottom vertical alignment of the text in the cell. |
fgcolor | color | table default | The color used to render the text. If not specified, uses the table's fgcolor parameter. |
bgcolor | color | table default | The color used to render the cell background. If not specified, uses the table's bgcolor parameter. |
format | string | table default | The decimal format to use when the value of the point is a number. |
<PARAM NAME="cell1" VALUE="2;3;1;Sine;left;center;#ffff00;#0000ff;0.0##">
Will render the value of the point Sine in cell (2, 3) with left/center justification in yellow text on a blue background, with 1 to 3 decimal places of accuracy
An indirectly formatted point reads its cell specification from a DataHub point. The value of the point must be a string containing a valid value specification for a cell.
Argument | Type | Default | Description |
---|---|---|---|
row | color | required | The cell row, starting at 1. |
column | color | required | The cell column, starting at 1. |
type | number | required | 2 for indirectly formatted point. |
specpoint | string | required | The name of a DataHub point from which to read the cell specification for this cell. |
valuepoint | string | null | If the cell specification in specpoint contains the word null for its point name, use valuepoint instead as the point from which to take the cell value. |
<PARAM NAME="cell1" VALUE="2;3;2;myspec;Sine">
will render the value of the point Sine in cell (2, 3) according to a cell's value specification contained in the DataHub point myspec. The point should contain just the content of a value parameter, like this:
2;3;1;Sine;left;center;#ffff00;#0000ff;0.0##
A class member takes its cell specification from a named cell class. All members of a cell class are formatted identically. Changes to the cell class will cause all cells in the class to be changed.
Argument | Type | Default | Description |
---|---|---|---|
row | color | required | The cell row, starting at 1. |
column | color | required | The cell column, starting at 1. |
type | number | required | 3 for member of a class. |
label | string | required | If the cell class is type 0 (a label) then this is a static text string. If the cell class is type 1 (a point) then this is the name of the DataHub point. |
classname | string | required | The name of the class to which this cell belongs. |
<PARAM NAME="cell1" VALUE="2;3;3;Sine;float_class">
Will render the value of the point Sine in cell (2, 3) according to the class specification of the class float_class.
An image cell renders an image into the cell, clipping the image at the borders of the cell. The image is obtained from a URL.
Argument | Type | Default | Description |
---|---|---|---|
row | color | required | The cell row, starting at 1. |
column | color | required | The cell column, starting at 1 |
type | number | required | 4 for image. |
imageurl | string | required | The URL from which to obtain the image. This may be either an absolute URL of the form http://domain/path/image, or a relative URL of the form /path/image or path/image. |
alpha | number | 1.0 | An alpha blend value from 0.0 to 1.0 where 0.0 is transparent and 1.0 is opaque. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.