2 * Copyright 2015 Samsung Electronics All Rights Reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package oic.simulator.clientcontroller.perspective;
19 import oic.simulator.clientcontroller.view.AttributeView;
20 import oic.simulator.clientcontroller.view.LogView;
21 import oic.simulator.clientcontroller.view.MetaPropertiesView;
22 import oic.simulator.clientcontroller.view.MultiResourceOrchestrationView;
23 import oic.simulator.clientcontroller.view.ResourceManagerView;
25 import org.eclipse.ui.IPageLayout;
26 import org.eclipse.ui.IPerspectiveFactory;
29 * This class creates a new eclipse perspective for client controller and
30 * positions the different views inside.
32 public class PerspectiveFactory implements IPerspectiveFactory {
34 public static final String PERSPECTIVE_ID = "oic.simulator.clientcontroller.perspective";
35 private IPageLayout factory;
38 public void createInitialLayout(IPageLayout factory) {
39 this.factory = factory;
40 factory.setEditorAreaVisible(false);
42 factory.setFixed(false);
45 private void addViews() {
46 factory.addView(ResourceManagerView.VIEW_ID, IPageLayout.LEFT, 0.3f,
47 factory.getEditorArea());
48 factory.addView(MetaPropertiesView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
49 ResourceManagerView.VIEW_ID);
50 factory.addView(AttributeView.VIEW_ID, IPageLayout.LEFT, 0.7f,
51 factory.getEditorArea());
52 factory.addView(LogView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
53 AttributeView.VIEW_ID);
54 factory.addView(MultiResourceOrchestrationView.VIEW_ID,
55 IPageLayout.RIGHT, 0.6f, AttributeView.VIEW_ID);