In this tutorial we will build a Eclipse RCP application which will display a domain model in a JFace table. The domain modelrepresents the data of persons (first name, last name, gender and if he/she is married). Each person is displayed in one row in the table.
Different editors and label provider will be used for different data types. The article demonstrate how to sort based on different table columns and how to use filters to display only selected content of the viewer. We will then learn how to use StyledCellLabelProvider to influence the display of data in the table. The usage of commands and how to hide and sort table columns is demonstrated.
The application will also be able to change the first name and last name like a text editor, the gender by a drop down list and the married status by a checkbox. You can edit the objects on two ways: an inline editor in the table and within a editor.
Via the menu it will be possible to add new persons to the table and to remove persons from the table. You will also be able to show/hide columns.
The final application will look like this.
0 comments:
Post a Comment