Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/frontend/Perspective.java

Go to the documentation of this file.
00001 
00022 package m2m.frontend;
00023 
00024 import org.eclipse.ui.IFolderLayout;
00025 import org.eclipse.ui.IPageLayout;
00026 import org.eclipse.ui.IPerspectiveFactory;
00027 
00028 import m2m.backend.buildingblocks.BuildingBlocksManager;
00029 
00030 import m2m.backend.project.M2MProject;
00031 import m2m.frontend.dynamicview.MyGraphicalEditor;
00032 import m2m.frontend.dynamicview.MyGraphicalProperty;
00033 import m2m.frontend.view.M2MConsole;
00034 import m2m.frontend.view.NavigationView;
00035 
00036 
00037 public class Perspective implements IPerspectiveFactory {
00038 
00039         public void createInitialLayout(IPageLayout layout) {
00040                 String editorArea = layout.getEditorArea();
00041                 layout.setEditorAreaVisible(false);
00042 
00043                 layout.addStandaloneView(NavigationView.ID,  false, IPageLayout.LEFT, 0.25f, editorArea);
00044                 layout.getViewLayout(NavigationView.ID).setCloseable(false);
00045                 layout.getViewLayout(NavigationView.ID).setMoveable(false);
00046                 
00047                 IFolderLayout folderLayout = layout.createFolder(M2MConsole.ID, IPageLayout.BOTTOM, 0.8f, editorArea);
00048                 folderLayout.addView(M2MConsole.ID);
00049                 
00050                 /* Create and locate the dynamic view */
00051                 layout.addPlaceholder(MyGraphicalEditor.ID, IPageLayout.BOTTOM, 0.4f, editorArea);
00052                 layout.getViewLayout(MyGraphicalEditor.ID).setMoveable(false);
00053 
00054                 /* Create and locate the dynamic property view */
00055                 layout.addPlaceholder(MyGraphicalProperty.ID, IPageLayout.LEFT, 0.3f, MyGraphicalEditor.ID);
00056                 layout.getViewLayout(MyGraphicalProperty.ID).setMoveable(false);
00057                 
00058                 /* Initialization of the manager */
00059 //              String path = f.getAbsolutePath() + "/lib/blocks";
00060                 String path = M2MProject.getLibPath()+"/blocks";
00061                 BuildingBlocksManager.getInstance().setDirName(path);
00062                 BuildingBlocksManager.getInstance().setPackageName("m2m.backend.buildingblocks.blocks");
00063                 BuildingBlocksManager.getInstance().loadAll();
00064         }
00065 }
 All Classes Namespaces Files Functions Variables Enumerations