Perspective.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.traceviewer.ui;
00002 
00003 import org.eclipse.ui.IFolderLayout;
00004 import org.eclipse.ui.IPageLayout;
00005 import org.eclipse.ui.IPerspectiveFactory;
00006 
00007 import edu.rice.cs.hpc.traceviewer.depth.HPCDepthView;
00008 import edu.rice.cs.hpc.traceviewer.main.HPCTraceView;
00009 import edu.rice.cs.hpc.traceviewer.misc.HPCCallStackView;
00010 import edu.rice.cs.hpc.traceviewer.summary.HPCSummaryView;
00011 
00012 public class Perspective implements IPerspectiveFactory
00013 {
00014     private final static float SPACE_TIME_VIEW_WIDTH_FRACTION = 0.85f;
00015     private final static float SPACE_TIME_VIEW_HEIGHT_FRACTION = 0.80f;
00016     private final static float CALLSTACK_VIEW_WIDTH_FRACTION = 0.15f;
00017 
00018     public void createInitialLayout(IPageLayout layout)
00019     {
00020         String editorArea = layout.getEditorArea();
00021         layout.setEditorAreaVisible(false);
00022         layout.setFixed(false);
00023         IFolderLayout topLeft = 
00024             layout.createFolder("topLeft", IPageLayout.LEFT, SPACE_TIME_VIEW_WIDTH_FRACTION, editorArea);
00025         topLeft.addView(HPCTraceView.ID);
00026         IFolderLayout bottomLeft = 
00027             layout.createFolder("bottomLeft", IPageLayout.BOTTOM, SPACE_TIME_VIEW_HEIGHT_FRACTION, "topLeft");
00028         bottomLeft.addView(HPCDepthView.ID);
00029         bottomLeft.addView(HPCSummaryView.ID);
00030         
00031         IFolderLayout right = 
00032             layout.createFolder("right", IPageLayout.BOTTOM,  CALLSTACK_VIEW_WIDTH_FRACTION, editorArea);
00033         right.addView(HPCCallStackView.ID);
00034         
00035         layout.getViewLayout(HPCTraceView.ID).setCloseable(false);
00036         layout.getViewLayout(HPCDepthView.ID).setCloseable(false);
00037         layout.getViewLayout(HPCCallStackView.ID).setCloseable(false);
00038         layout.getViewLayout(HPCSummaryView.ID).setCloseable(false);
00039     }
00040 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1