Changes

Jump to: navigation, search

Teams Winter 2011/team1/RCP/Create RPC Application

168 bytes added, 12:15, 4 March 2011
no edit summary
=== 1. Create project and data model ===
=== 2. Show data Data in the application Application ===
2.1 Columns data in a JFace table can be hold in <code>ModelProvider</code> and it is defined via instances of <code>TableViewerColumn</code> object:<br/>
<code>viewer.setInput(ModelProvider.INSTANCE.getStudents());</code><br/>
[[Image: Create1.png | 400px]]<br/>
=== 3. Add edit cell feature Edit Cell Data Option ===
3.1 To make the column editable you need to define an object of type <code>EditingSupport/<code> on your TableColumnViewer.
3.2 Create new class for each column that extends <code>EditingSupport</code> class:
</pre><br/>
3.3 Assign <code>EditorSupport</code> objects to your <code>TableColumnViewers </code>in your <code>StudentView</code> class.<br/>
Add the following line at the end of the <code>LabelProvider</code> is set:<br/> <code>col.setEditingSupport(new IdEditingSupport(viewer));</code><br/>3.4 Run your application. You should now be able to modify the content of the table:<br/>[[Image: Create2.png | 400px]]<br/> === 4. Add Sorting Option ===4.1
1
edit

Navigation menu