Table

Note: due to a J2SE bug the VM will crash for an extremely large list, table, or tree including thousands of items. Again, it's a Java2 bug, not Thinlet, nor other Java VMs. Adding an extra next 100 button, or a search condition is an extra work for you, but showing thousands of rows, or requesting unlimited database rows over the network is wrong.

A table presents data in a two-dimensional table format, allows to select rows, has header, and internally handles scrolling. The following example table includes two columns ('A', and 'B'), and two rows, the first row is selected, but allows to select multiple rows.

<table selection="multiple">
  <header>
    <column text="A" width="24" /><column text="B" />
  </header>
  <row selected="true">
    <cell text="a1" /><cell text="b1" enabled="false" />
  </row>
  <row>
    <cell text="a2" /><cell text="b2" />
  </row>
</table>

Properties
NameTypeDefaultDescription
selectionchoicesinglePossible values are: single, interval, and multiple. The default single value allows to select one row at a time, the interval value to select one contiguous range of rows, and the multiple value to select one or more contiguous ranges of rows.
line, and selection parameters are similar to list
name, enabled, visible, tooltip, property, width, height, colspan, rowspan, weightx, weighty, halign, and valign parameters are similar to component
Listeners
NameDescription
actionCalls the method whenever the selection changes.
performCalls the method whenever a double-click event occurs.

Header

Table header includes the columns. They define the column texts and widths.

Column

Table header includes the columns. They define the column texts and widths. If the total sum of column widths exceeds table bounds set by a parent container, horizontal scrollbar is drawn.

Properties
NameTypeDefaultDescription
widthinteger80The width of the column. The last (rightmost) column always extends to fill in the remaining width of the table, as determined by the parent container.
sortchoicenoneIf present, and set to either "ascent" or "descent", an arrow is drawn near right end of the column, as a visual indication of sorting order. NOTE: for now this is just a visual decoration, application still needs to do the sorting.
name, text, icon, and alignment parameters are described at label

Row

Table contains rows (and columns for the header), and row contains cells. The 'row' key identifies the list of rows. An entire row (not cell) is selectable in a table.

Properties
NameTypeDefaultDescription
selectedbooleanfalseTrue if currently selected the entire row.

Cell

Cell displays a short text and icon, its height is equals with the row's height, and its width is defined in the header column.

Properties
NameTypeDefaultDescription
name, enabled, text, icon, alignment, tooltip, and property parameters are similar to combobox choice
Keyboard-actions
OperationAction
Up arrowSelects previous row
Down arrowSelects next row
HomeSelects first row
EndSelects last row
Page UpSelects row one view up
Page DownSelects row one view down
+ShiftExtends selection
+CtrlSet lead row
SpaceSelects lead row
Ctrl-A, Ctrl-SlashSelects all
Ctrl-BackslashDeselects all
Tab, Shift-TabNavigate forward, backward