当前位置: 首页>>代码示例>>Java>>正文


Java SystemMenuMinimize类代码示例

本文整理汇总了Java中org.eclipse.ui.internal.presentations.SystemMenuMinimize的典型用法代码示例。如果您正苦于以下问题:Java SystemMenuMinimize类的具体用法?Java SystemMenuMinimize怎么用?Java SystemMenuMinimize使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SystemMenuMinimize类属于org.eclipse.ui.internal.presentations包,在下文中一共展示了SystemMenuMinimize类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: StandardEditorSystemMenu

import org.eclipse.ui.internal.presentations.SystemMenuMinimize; //导入依赖的package包/类
/**
 * Create the standard view menu
 * 
 * @param site the site to associate the view with
 */
public StandardEditorSystemMenu(IStackPresentationSite site) {
    restore = new SystemMenuRestore(site);
    move = new SystemMenuMove(site, getMoveMenuText(), false);
    minimize = new SystemMenuMinimize(site);
    maximize = new SystemMenuMaximize(site);
    close = new SystemMenuClose(site);
    closeOthers = new SystemMenuCloseOthers(site);
    closeAll = new SystemMenuCloseAll(site);
    
    { // Initialize system menu
        menuManager.add(new GroupMarker("misc")); //$NON-NLS-1$
        menuManager.add(new GroupMarker("restore")); //$NON-NLS-1$
        menuManager.add(new UpdatingActionContributionItem(restore));

        menuManager.add(move);
        menuManager.add(new GroupMarker("size")); //$NON-NLS-1$
        menuManager.add(new GroupMarker("state")); //$NON-NLS-1$
        menuManager.add(new UpdatingActionContributionItem(minimize));

        menuManager.add(new UpdatingActionContributionItem(maximize));
        menuManager.add(new Separator("close")); //$NON-NLS-1$
        menuManager.add(close);
        menuManager.add(closeOthers);
        menuManager.add(closeAll);

        site.addSystemActions(menuManager);
    } // End of system menu initialization

}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:35,代码来源:StandardEditorSystemMenu.java

示例2: StandardViewMenu

import org.eclipse.ui.internal.presentations.SystemMenuMinimize; //导入依赖的package包/类
public StandardViewMenu(VSStackPresentation presentation, boolean addSystemActions) {
    menuManager = new MenuManager();
    IStackPresentationSite site = presentation.getSite();
    restore = new SystemMenuRestore(site);
    restore.setId("restore");
    UIUtils.initAction(restore);

    move = new SystemMenuMove(site, WorkbenchMessages.ViewPane_moveView, false);

    minimize = new SystemMenuMinimize(site);
    minimize.setId("minimize");
    UIUtils.initAction(minimize);

    maximize = new SystemMenuMaximize(site);
    maximize.setId("maximize");
    UIUtils.initAction(maximize);

    close = new SystemMenuClose(presentation);
    UIUtils.initAction(close);

    SystemMenuToggleTabs toggleTabs = new SystemMenuToggleTabs(presentation, isViewMenu());
    UIUtils.initAction(toggleTabs);

    SystemMenuToggleToolbar toggleToolbar = null;
    if(isViewMenu()){
        toggleToolbar = new SystemMenuToggleToolbar(presentation);
        UIUtils.initAction(toggleToolbar);

        showView = new SystemMenuShowView(presentation);
    }

    { // Initialize system menu
        menuManager.add(new Separator("misc"));
        menuManager.add(new Separator("restore"));
        menuManager.add(new UpdatingActionContributionItem(restore));

        menuManager.add(move);
        menuManager.add(new GroupMarker("size"));
        menuManager.add(new GroupMarker("state"));
        menuManager.add(new UpdatingActionContributionItem(minimize));

        menuManager.add(new UpdatingActionContributionItem(maximize));
        menuManager.add(new Separator("toggle"));
        menuManager.add(toggleTabs);
        if(isViewMenu()){
            menuManager.add(toggleToolbar);
        }
        if(isViewMenu()){
            menuManager.add(showView);
        }
        menuManager.add(new Separator("list"));
        menuManager.add(new Separator("close"));
        menuManager.appendToGroup("close", close);
        if(addSystemActions) {
            site.addSystemActions(menuManager);
        }
    } // End of system menu initialization

    if(isViewMenu()){
        sortEditorList = new SystemMenuSortTabs(presentation);
        UIUtils.initAction(sortEditorList);
        menuManager.appendToGroup("list", sortEditorList);
    }
}
 
开发者ID:iloveeclipse,项目名称:skin4eclipse,代码行数:65,代码来源:StandardViewMenu.java


注:本文中的org.eclipse.ui.internal.presentations.SystemMenuMinimize类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。