Changes

Jump to: navigation, search

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

606 bytes added, 17:47, 4 March 2011
no edit summary
=== 3. Define and Use Editors ===
 
3.1 Editor area
 
The first step to add editor area to the application is to make the editor area visible.
 
<source lang=java>
 
public class Perspective implements IPerspectiveFactory {
 
public void createInitialLayout(IPageLayout layout) {
layout.setEditorAreaVisible(true);
layout.addView(StudentsView.ID, IPageLayout.LEFT, 1.0f, layout.getEditorArea());
//make the view fixed
layout.setFixed(true);
//make the view non-closeable
layout.getViewLayout(StudentsView.ID).setCloseable(false);
}
}
</source>
3.1 Create editor
<pre> String[] titles = { "Id", "First name", "Last name", "Program" };</pre>
3.2 Set command for opening the editor
1
edit

Navigation menu