Open main menu

CDOT Wiki β

Teams Winter 2011/team1/RCP/Define and use editors

Revision as of 17:35, 4 March 2011 by Minooz (talk | contribs) (Created page with '=== 1. Show Data in Application === 1.1 Columns data in a JFace table can be hold in <code>ModelProvider</code> and it is defined via instances of <code>TableViewerColumn</code>o…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. Show Data in Application

1.1 Columns data in a JFace table can be hold in ModelProvider and it is defined via instances of TableViewerColumnobject:

viewer.setInput(ModelProvider.INSTANCE.getStudents());

and

TableViewerColumn col = createTableViewerColumn(titles[0], bounds[0], 0);

1.2 Add the following lines to StudentsView.java class:
Private variable:
private TableViewer viewer;
Change the createColumns()method:

   String[] titles = { "Id", "First name", "Last name", "Program" };



3. Define and Use Editors

3.1 Create Editor


3.2 Set command for opening the editor