1 8 package com.nightlabs.editor2d.perspective; 9 10 import org.eclipse.gef.ui.views.palette.PaletteView; 11 import org.eclipse.ui.IFolderLayout; 12 import org.eclipse.ui.IPageLayout; 13 import org.eclipse.ui.IPerspectiveFactory; 14 15 import com.nightlabs.editor2d.views.LayerView; 16 17 public class EditorPerspective 18 implements IPerspectiveFactory 19 { 20 public static final String ID_PERSPECTIVE = EditorPerspective.class.getName(); 21 22 25 public void createInitialLayout(IPageLayout layout) 26 { 27 37 layout.setEditorAreaVisible(true); 38 String editorArea = layout.getEditorArea(); 39 layout.addView(IPageLayout.ID_EDITOR_AREA, IPageLayout.TOP, IPageLayout.RATIO_MAX, editorArea); 40 41 IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.15f, editorArea); 42 topLeft.addView(IPageLayout.ID_RES_NAV); 43 IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.5f, "topLeft"); 44 bottomLeft.addView(IPageLayout.ID_OUTLINE); 45 IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea); 47 bottom.addView(IPageLayout.ID_PROP_SHEET); 48 IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, 0.75f, editorArea); 49 topRight.addView(PaletteView.ID); 50 IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, 0.5f, "topRight"); 51 bottomRight.addView(LayerView.ID_VIEW); 52 bottomRight.addView("org.eclipse.gef.ui.stackview.CommandStackInspector"); 53 54 layout.addPerspectiveShortcut(ID_PERSPECTIVE); 55 } 56 } 57
| Popular Tags
|