01: /*******************************************************************************
02: * Copyright (c) 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.examples.rcp.browser;
11:
12: import org.eclipse.ui.IPageLayout;
13: import org.eclipse.ui.IPerspectiveFactory;
14: import org.eclipse.ui.IViewLayout;
15:
16: /**
17: * The perspective factory for the RCP Browser Example's perspective.
18: *
19: * @since 3.0
20: */
21: public class BrowserPerspectiveFactory implements IPerspectiveFactory {
22:
23: /**
24: * Constructs a new <code>BrowserPerspectiveFactory</code>.
25: */
26: public BrowserPerspectiveFactory() {
27: // do nothing
28: }
29:
30: /**
31: * Creates the initial layout of the Browser perspective.
32: */
33: public void createInitialLayout(IPageLayout layout) {
34: layout.addView(IBrowserConstants.BROWSER_VIEW_ID,
35: IPageLayout.RIGHT, .25f, IPageLayout.ID_EDITOR_AREA);
36: layout.addPlaceholder(IBrowserConstants.HISTORY_VIEW_ID,
37: IPageLayout.LEFT, .3f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
38: IViewLayout historyLayout = layout
39: .getViewLayout(IBrowserConstants.HISTORY_VIEW_ID);
40: historyLayout.setCloseable(true);
41: layout.setEditorAreaVisible(false);
42: }
43: }
|