📄 browserperspectivefactory.java
字号:
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.rcp.browser;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.IPlaceholderFolderLayout;
import org.eclipse.ui.IViewLayout;
/**
* The perspective factory for the RCP Browser Example's perspective.
*
* @since 3.0
*/
public class BrowserPerspectiveFactory implements IPerspectiveFactory {
/**
* Constructs a new <code>BrowserPerspectiveFactory</code>.
*/
public BrowserPerspectiveFactory() {
// do nothing
}
/**
* Creates the initial layout of the Browser perspective.
*/
public void createInitialLayout(IPageLayout layout) {
String viewArea=layout.getEditorArea();
layout.setEditorAreaVisible(false);
// layout.addView(IBrowserConstants.BROWSER_VIEW_ID, IPageLayout.RIGHT, .25f, viewArea);
IFolderLayout browserView=layout.createFolder("right",IPageLayout.RIGHT,0.25f,viewArea);
browserView.addView(IBrowserConstants.BROWSER_VIEW_ID);
// layout.addPlaceholder(IBrowserConstants.HISTORY_VIEW_ID, IPageLayout.LEFT, .3f, viewArea); //$NON-NLS-1$
IPlaceholderFolderLayout historyView=layout.createPlaceholderFolder("left",IPageLayout.LEFT,0.3f,viewArea);
historyView.addPlaceholder(IBrowserConstants.RECEIVE_VIEW_ID);
IViewLayout historyLayout = layout.getViewLayout(IBrowserConstants.RECEIVE_VIEW_ID);
historyLayout.setCloseable(true);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -