SDM CTable Widget

CTable widget is subclass of java swing table. It display the values of multiple device property in a table (Fig. 1).

A CTable
Fig. 1

In this release the table is not editable and is only used for monitoring the device property with the numerical type of data. This widget does not check for duplicates, so it can have same the row (device name) or column (property name).

The array of device names and property names can be passed to CTable constructors to create the table widget or set using the setDeviceName(s) and setPropertyName(s) methods. They can also be manipulated dynamically. Right click the name on the row header or column header, a popup window will show up (Fig. 2) to allow user to delete, insert and replace the device name or property on the fly.

Fig. 2
Select "Insert" or "Replace" from the popup menu, following insert or replace dialog (Fig. 3 and Fig. 4) will show up for user to enter the new device or property name. The new device or property can be inserted before or after the selected name by select one of the radio button on the left. In the replace dialog the exist device or property name will be shown in the combo box, user can replace this name. To delete the device or property, just select "Delete" from the popup menu.

Fig. 3Fig. 4

Since release 0.3 the cell in CTable is editable and it can be used to monitor and control the multiple devices and properties. When the cell is selected the monitor (live update) will stop so the user can enetr the new value. The cell editor will validate the input and only the entry can be parsed as double is accepted.