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 org.eclipse.ui.IPageLayout;
20 import org.eclipse.ui.IPerspectiveFactory;
22 import oic.simulator.clientcontroller.view.AttributeView;
23 import oic.simulator.clientcontroller.view.LogView;
24 import oic.simulator.clientcontroller.view.MetaPropertiesView;
25 import oic.simulator.clientcontroller.view.ResourceManagerView;
28 * This class creates a new eclipse perspective for client controller and
29 * positions the different views inside.
31 public class PerspectiveFactory implements IPerspectiveFactory {
33 public static final String PERSPECTIVE_ID = "oic.simulator.clientcontroller.perspective";
34 private IPageLayout factory;
37 public void createInitialLayout(IPageLayout factory) {
38 this.factory = factory;
39 factory.setEditorAreaVisible(false);
41 factory.setFixed(false);
44 private void addViews() {
45 factory.addView(ResourceManagerView.VIEW_ID, IPageLayout.LEFT, 0.28f,
46 factory.getEditorArea());
47 factory.addView(AttributeView.VIEW_ID, IPageLayout.LEFT, 0.7f,
48 factory.getEditorArea());
49 factory.addView(LogView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
50 AttributeView.VIEW_ID);
51 factory.addView(MetaPropertiesView.VIEW_ID, IPageLayout.RIGHT, 0.6f,
52 AttributeView.VIEW_ID);