Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scout/Concepts/Column"

m (Type of column: + smart Column)
(Properties)
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ScoutPage|cat=Concepts}}
+
{{ScoutPage|cat=Component Model}}
  
 
Columns describe the structure of a {{ScoutLink|Concepts|Table|Table}}
 
Columns describe the structure of a {{ScoutLink|Concepts|Table|Table}}
Line 21: Line 21:
 
* {{ScoutLink|Concepts|BooleanColumn|Boolean Column}}
 
* {{ScoutLink|Concepts|BooleanColumn|Boolean Column}}
 
* {{ScoutLink|Concepts|SmartColumn|Smart Column <T>}}
 
* {{ScoutLink|Concepts|SmartColumn|Smart Column <T>}}
 +
 +
 +
=== Accessing the values ===
 +
Columns are typed. They allow getting the value they contain for a specific row. The <code>getValue(row)</code> is also typed:
 +
 +
<source lang="java">
 +
  getTable().getNameColumn().getValue(row); //returns a String if NameColumn is a StringColumn.
 +
</source>
 +
 +
This way is better than the un-typed getValue() proposed by the table row:
 +
<source lang="java">
 +
  row.getCell(getTable().getNameColumn()).getValue(); //returns Object
 +
</source>
 +
 +
There are other convenience methods:
 +
* <code>getSelectedValue()</code> returning the value for column of the selected row
 +
* <code>getSelectedValues()</code> same function but useful if the table allows multiple rows selection.
 +
* <code>getValues(rows)</code> the function takes as input an array of rows and return their values.
  
 
== Properties ==
 
== Properties ==
Line 32: Line 50:
  
 
{{ScoutProp|Summary}}
 
{{ScoutProp|Summary}}
TODO
+
Defines that the column will contribute its text to the {{ScoutLink|Concepts|Table#Summary_Cell|summary cell}}.
  
 
{{ScoutProp|Primary}}
 
{{ScoutProp|Primary}}
Line 43: Line 61:
 
* ...
 
* ...
 
{{note|TODO|Link to the article How to sort Tables}}
 
{{note|TODO|Link to the article How to sort Tables}}
 
  
 
== Events ==
 
== Events ==

Revision as of 08:03, 8 February 2013

The Scout documentation has been moved to https://eclipsescout.github.io/.

Columns describe the structure of a The Scout documentation has been moved to https://eclipsescout.github.io/.

Description

Note.png
TODO
Add a description

A column is the entity of a table describing the structure of the data displayed in the table. Depending on the The Scout documentation has been moved to https://eclipsescout.github.io/. contained in the column, one of the child implementation specialized for the given type should be considered.

ColumnSet

Type of column


Accessing the values

Columns are typed. They allow getting the value they contain for a specific row. The getValue(row) is also typed:

  getTable().getNameColumn().getValue(row); //returns a String if NameColumn is a StringColumn.

This way is better than the un-typed getValue() proposed by the table row:

  row.getCell(getTable().getNameColumn()).getValue(); //returns Object

There are other convenience methods:

  • getSelectedValue() returning the value for column of the selected row
  • getSelectedValues() same function but useful if the table allows multiple rows selection.
  • getValues(rows) the function takes as input an array of rows and return their values.

Properties

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

The Scout documentation has been moved to https://eclipsescout.github.io/. Only displayable columns can be displayed in the table. Not displayable columns are suitable for values that you need to have for each row (typically an unique id that you need to pass to a form that is opened when you edit the entity represented in the row).

The Scout documentation has been moved to https://eclipsescout.github.io/. A column can be visible or not. The default behavior of a table lets the user configure the columns he want to display in a table.

The Scout documentation has been moved to https://eclipsescout.github.io/. Defines that the column will contribute its text to the The Scout documentation has been moved to https://eclipsescout.github.io/..

The Scout documentation has been moved to https://eclipsescout.github.io/. TODO


Sorting properties

  • ... TODO
  • ...
  • ...
Note.png
TODO
Link to the article How to sort Tables


Events

Defined with The Scout documentation has been moved to https://eclipsescout.github.io/. methods.

Note.png
TODO
Add a description of important events. The idea is not to recreate the JavaDoc of the execXxxxxx() methods but to provide explanations, best practice, example... Group the events by domain.


See Also

Back to the top