Base layout of eclipse plugin for service provider.
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ServiceProviderPlugin / src / oic / simulator / serviceprovider / perspective / PerspectiveFactory.java
1 package oic.simulator.serviceprovider.perspective;
2
3 import oic.simulator.serviceprovider.view.AttributeView;
4 import oic.simulator.serviceprovider.view.LogView;
5 import oic.simulator.serviceprovider.view.MultiResourceOrchestrationView;
6 import oic.simulator.serviceprovider.view.ResourceManagerView;
7
8 import org.eclipse.ui.IPageLayout;
9 import org.eclipse.ui.IPerspectiveFactory;
10
11 public class PerspectiveFactory implements IPerspectiveFactory {
12
13     public static final String PERSPECTIVE_ID = "oic.simulator.serviceprovider.perspective";
14     private IPageLayout        factory;
15
16     @Override
17     public void createInitialLayout(IPageLayout factory) {
18         this.factory = factory;
19         factory.setEditorAreaVisible(false);
20         addViews();
21         factory.setFixed(false);
22     }
23
24     private void addViews() {
25         factory.addView(ResourceManagerView.VIEW_ID, IPageLayout.LEFT, 0.3f,
26                 factory.getEditorArea());
27         factory.addView(IPageLayout.ID_PROP_SHEET, IPageLayout.BOTTOM, 0.6f,
28                 ResourceManagerView.VIEW_ID);
29         factory.addView(AttributeView.VIEW_ID, IPageLayout.LEFT, 0.5f,
30                 factory.getEditorArea());
31         factory.addView(LogView.VIEW_ID, IPageLayout.BOTTOM, 0.6f,
32                 AttributeView.VIEW_ID);
33         factory.addView(MultiResourceOrchestrationView.VIEW_ID,
34                 IPageLayout.RIGHT, 0.5f, AttributeView.VIEW_ID);
35     }
36 }