|
|
(9 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
− | A table is data structure that can be represented in a {{ScoutLink|Concepts|TablePage|TablePage}} or a {{ScoutLink|Concepts|TableField|TableField}}.
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | * implements: {{ScoutJavadoc|ITable|I}}
| + | |
− | * extends: {{ScoutJavadoc|AbstractTable|C}}
| + | |
− | | + | |
− | == Description ==
| + | |
− | Table can contains a set of structured data: the structure of the entity is defined by the {{ScoutLink|Concepts|Column|columns}}. Each entity contained in the table is a {{ScoutLink|Concepts|TableRow| row}}. At the intersection of a column and a row is a {{ScoutLink|Concepts|Cell|Cell}}. A Cell describes how the value is represented (displayed text, colors, style, icon...).
| + | |
− | | + | |
− | === Example ===
| + | |
− | magine the you want to represent Persons that are structured as followed:
| + | |
− | * Name (String)
| + | |
− | * First name (String)
| + | |
− | * Age (Integer)
| + | |
− | * Date of birth (Date)
| + | |
− | | + | |
− | A such table needs to contains 4 columns :
| + | |
− | * NameColumn a {{ScoutLink|Concepts|StringColumn|String Column}}
| + | |
− | * FirstNameColumn a {{ScoutLink|Concepts|StringColumn|String Column}}
| + | |
− | * AgeColumn a {{ScoutLink|Concepts|IntegerColumn|Integer Column}}
| + | |
− | * BirthColumn a {{ScoutLink|Concepts|DateColumn|Date Column}}
| + | |
− | | + | |
− | {{note|TODO|Add a Diagram to represent this table}}
| + | |
− | | + | |
− | === Access to the data ===
| + | |
− | To access a value of a table, the common pattern is to go throw the column. For example if you want to access the age of a person, at a precise row index r, the code is:
| + | |
− | <source lang="java">
| + | |
− | private Integer getAgeOfPersonAtRow(int r){
| + | |
− | return getTable().getAgeColumn().getValue(r);
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | == TODO ==
| + | |
− | {{note|TODO| Organize these subsections in section + subsection. Add description }}
| + | |
− | | + | |
− | === Load the data ===
| + | |
− | in the page or in the field
| + | |
− | | + | |
− | add row
| + | |
− | | + | |
− | | + | |
− | === Display/Hide the data ===
| + | |
− | Table provides support to sort, to filter how the content is represented.
| + | |
− | | + | |
− | | + | |
− | === Selection ===
| + | |
− | Table also manages selection.
| + | |
− | | + | |
− | properties
| + | |
− | | + | |
− | === Menu ===
| + | |
− | Table can also contains Menus, to provide a possibility to trigger some actions (Menus are displayed in the context menu of the table).
| + | |
− | | + | |
− | === Checkable ===
| + | |
− | | + | |
− | | + | |
− | === Summary Cell, Primary Columns ===
| + | |
− | | + | |
− | | + | |
− | == See Also ==
| + | |
− | * {{ScoutLink|Concepts|TablePage|TablePage}}
| + | |
− | * {{ScoutLink|Concepts|TableField|TableField}}
| + | |
− | | + | |
− | * {{ScoutLink|Concepts|Column|Column}}
| + | |
− | * {{ScoutLink|Concepts|TableRow|Table row}}
| + | |
− | * {{ScoutLink|Concepts|Cell|Cell}}
| + | |