• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WorkbenchMenu类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getMenu

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenu() {
    return MenuFactory
            .newTopLevelMenu("Save")
            .respondsWith(() -> Window.alert("Saved!"))
            .endMenu()
            .newTopLevelMenu("Delete")
            .respondsWith(() -> Window.alert("Deleted!"))
            .endMenu()
            .newTopLevelMenu("Edit")
            .menus()
            .menu("Cut")
            .respondsWith(() -> Window.alert("Cut!"))
            .endMenu()
            .menu("Paste")
            .respondsWith(() -> Window.alert("Paste!"))
            .endMenu()
            .endMenus()
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:22,代码来源:TodoListScreen.java


示例2: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    if (perspectiveIdentifierToGoBackTo != null) {
        return MenuFactory
                .newTopLevelMenu(translationService.format(Constants.AdminPagePerspective_GoBackToThePreviousPage))
                .respondsWith(new Command() {
                    @Override
                    public void execute() {
                        placeManager.goTo(perspectiveIdentifierToGoBackTo);
                    }
                })
                .endMenu()
                .build();
    }

    return null;
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:AdminPagePerspective.java


示例3: buildMenu

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus buildMenu() {
    return MenuFactory
            .newTopLevelCustomMenu(new MenuFactory.CustomMenuBuilder() {
                @Override
                public void push(MenuFactory.CustomMenuBuilder element) {
                }

                @Override
                public MenuItem build() {
                    return new BaseMenuCustom<IsWidget>() {
                        @Override
                        public void accept(MenuVisitor visitor) {
                            visitor.visit(this);
                        }

                        @Override
                        public IsWidget build() {
                            return getNewButton();
                        }
                    };
                }
            }).endMenu().build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:25,代码来源:PluginExplorerScreen.java


示例4: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory
            .newTopLevelMenu("Screens")
            .menus()
            .menu("Repository Configuration")
            .respondsWith(
                    new Command() {
                        @Override
                        public void execute() {
                            placeManager.goTo("Repository Configuration");
                        }
                    })
            .endMenu()
            .endMenus()
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:19,代码来源:BaseAssetPerspective.java


示例5: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory.newTopLevelMenu( AppConstants.INSTANCE.Upload() )
            .respondsWith( new Command() {
                @Override
                public void execute() {
                    UploadFormPresenter uploadFormPresenter = iocManager.lookupBean( UploadFormPresenter.class ).getInstance();
                    uploadFormPresenter.showView();
                }
            } )
            .endMenu()
            .newTopLevelMenu( AppConstants.INSTANCE.Refresh() )
            .respondsWith( new Command() {
                @Override
                public void execute() {
                    refreshEvents.fire( new M2RepoRefreshEvent() );
                }
            } )
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:22,代码来源:M2RepoPerspective.java


示例6: buildMenuBar

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus buildMenuBar() {
    return MenuFactory
            .newTopLevelMenu(AppConstants.INSTANCE.MenuExplore())
            .withItems(getExploreMenuItems())
            .endMenu()
            .newTopLevelMenu(AppConstants.INSTANCE.MenuOrganizationalUnits())
            .withItems(getOrganizationalUnitsMenuItem())
            .endMenu()
            .newTopLevelMenu(AppConstants.INSTANCE.MenuRepositories())
            .withItems(getRepositoriesMenuItems())
            .endMenu()
            .newTopLevelMenu("Editor Properties")
            .withItems(getEditorsMenuItem())
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:18,代码来源:AdministrationPerspective.java


示例7: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory.newTopLevelMenu(translationService.getTranslation(AppConstants.M2RepoPerspective_Upload))
            .respondsWith(() -> {
                UploadFormPresenter uploadFormPresenter = uploadFormPresenterProvider.get();
                uploadFormPresenter.showView();
            })
            .endMenu()
            .newTopLevelMenu(translationService.getTranslation(AppConstants.M2RepoPerspective_Refresh))
            .respondsWith(() -> refreshEvents.fire(new M2RepoRefreshEvent()))
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:14,代码来源:M2RepoPerspective.java


示例8: buildMenuBar

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus buildMenuBar() {
    return MenuFactory
            .newTopLevelMenu(translationService.getTranslation(AppConstants.AdministrationPerspective_MenuExplore))
            .withItems(getExploreMenuItems())
            .endMenu()
            .newTopLevelMenu(translationService.getTranslation(AppConstants.AdministrationPerspective_MenuOrganizationalUnits))
            .withItems(getOrganizationalUnitsMenuItem())
            .endMenu()
            .newTopLevelMenu(translationService.getTranslation(AppConstants.AdministrationPerspective_MenuRepositories))
            .withItems(getRepositoriesMenuItems())
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:15,代码来源:AdministrationPerspective.java


示例9: getMenu

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenu() {
    return MenuFactory
            .newTopLevelMenu("Validate")
            .respondsWith(() -> Window.alert("valid!"))
            .endMenu()
            .newTopLevelMenu("Build")
            .menus()
            .menu("Build & Deploy")
            .respondsWith(() -> Window.alert("Build!"))
            .endMenu()
            .endMenus()
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:16,代码来源:ReadmeScreen.java


示例10: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory.newTopLevelMenu(constants.Upload())
            .respondsWith(new Command() {
                @Override
                public void execute() {
                    uploadFormPresenter.showView();
                }
            })
            .endMenu()
            .newTopLevelCustomMenu(new RefreshMenuBuilder(this))
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:M2RepoEditorPresenter.java


示例11: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory
            .newTopLevelMenu( constants.MenuOrganizationalUnits() )
            .withPermission( OrganizationalUnit.RESOURCE_TYPE, OrganizationalUnitAction.READ )
            .menus()
            .menu( constants.MenuManageOrganizationalUnits() )
            .respondsWith( () -> placeManager.goTo( "org.kie.workbench.common.screens.organizationalunit.manager.OrganizationalUnitManager" ) )
            .endMenu()
            .endMenus()
            .endMenu()
            .newTopLevelMenu( constants.repositories() )
            .menus()
            .menu( constants.listRepositories() )
            .withPermission( Repository.RESOURCE_TYPE, RepositoryAction.READ )
            .respondsWith( () -> placeManager.goTo( "RepositoriesEditor" ) )
            .endMenu()
            .menu( constants.cloneRepository() )
            .withPermission( Repository.RESOURCE_TYPE, RepositoryAction.CREATE )
            .respondsWith( cloneRepoCommand )
            .endMenu()
            .menu( constants.newRepository() )
            .withPermission( Repository.RESOURCE_TYPE, RepositoryAction.CREATE )
            .respondsWith( newRepoCommand )
            .endMenu()
            .endMenus()
            .endMenu().build();
}
 
开发者ID:kiegroup,项目名称:kie-wb-distributions,代码行数:29,代码来源:AdministrationPerspective.java


示例12: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    if ( !ApplicationPreferences.isProductized() && ApplicationPreferences.getBooleanPref( ExamplesService.EXAMPLES_SYSTEM_PROPERTY ) ) {
        return buildMenuBarWithExamples();

    } else {
        return buildMenuBarWithoutExamples();
    }
}
 
开发者ID:kiegroup,项目名称:kie-wb-distributions,代码行数:10,代码来源:DroolsAuthoringPerspective.java


示例13: buildMenuBar

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus buildMenuBar() {
    if ( ApplicationPreferences.getBooleanPref( ExamplesService.EXAMPLES_SYSTEM_PROPERTY ) ) {
        return buildMenuBarWithExamples();

    } else {
        return buildMenuBarWithoutExamples();
    }
}
 
开发者ID:kiegroup,项目名称:drools-wb,代码行数:10,代码来源:AuthoringPerspective.java


示例14: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    if (menus == null) {
        menus = makeMenuBar();
    }
    return menus;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:8,代码来源:ProjectScreenPresenter.java


示例15: buildMenu

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus buildMenu() {
    return MenuFactory
            .newTopLevelCustomMenu( new MenuFactory.CustomMenuBuilder() {
                @Override
                public void push( MenuFactory.CustomMenuBuilder element ) {
                }

                @Override
                public MenuItem build() {
                    return new BaseMenuCustom<Button>() {

                        @Override
                        public Button build() {
                            return new Button() {
                                {
                                    setIcon( IconType.HOME );
                                    setTitle( Constants.INSTANCE.Home() );
                                    setSize( ButtonSize.SMALL );
                                    addClickHandler( new ClickHandler() {
                                        @Override
                                        public void onClick( ClickEvent event ) {
                                            refreshCacheAndGeneratesSelectEvent( loggedUser.getIdentifier() );
                                        }
                                    } );
                                }
                            };
                        }
                    };
                }
            } ).endMenu().build();
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:33,代码来源:UserHomePageSidePresenter.java


示例16: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    if (menus == null) {
        makeMenuBar();
    }
    return menus;
}
 
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:8,代码来源:FormEditorPresenter.java


示例17: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return menus;
}
 
开发者ID:kiegroup,项目名称:optaplanner-wb,代码行数:5,代码来源:SolverEditorPresenter.java


示例18: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory
            .newTopLevelMenu("Open")
            .withItems(ShowcaseEntryPoint.getScreens())
            .endMenu()
            .newTopLevelMenu("Command").respondsWith(new Command() {
                @Override
                public void execute() {
                    Window.alert("Command!");
                }
            })
            .endMenu()
            .newTopLevelMenu("Create New")
            .menus()
            .menu("Command 1")
            .respondsWith(new Command() {
                @Override
                public void execute() {
                    Window.alert("Command 1!");
                }
            })
            .endMenu()
            .menu("Command 2")
            .respondsWith(new Command() {
                @Override
                public void execute() {
                    Window.alert("Command 2!");
                }
            })
            .endMenu()
            .endMenus()
            .endMenu()
            .newTopLevelMenu("Find")
            .respondsWith(new Command() {
                @Override
                public void execute() {
                    Window.alert("Find!");
                }
            })
            .position(MenuPosition.RIGHT)
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:45,代码来源:SimplePerspective.java


示例19: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
    return MenuFactory
            .newTopLevelMenu("Dynamic Menu").respondsWith(new Command() {
                @Override
                public void execute() {
                    Window.alert("Hello from a dynamic menu!");
                }
            })
            .endMenu()
            .newTopLevelMenu("Open Dynamic Editor").respondsWith(new Command() {
                @Override
                public void execute() {
                    placeManager.goTo("DynamicEditor");
                }
            })
            .endMenu()
            .newTopLevelMenu("Open Dynamic Screen")
            .respondsWith(new Command() {
                @Override
                public void execute() {
                    placeManager.goTo("DynamicScreen");
                }
            })
            .endMenu()
            .newTopLevelMenu("Create New")
            .menus()
            // Test that an editor from a dynamic plugin can be opened for a dynamic resource type
            .menu("File matching dynamically loaded resource type")
            .respondsWith(new Command() {
                @Override
                public void execute() {
                    placeManager.goTo(PathFactory.newPath("test.csa",
                                                          "default://project/"));
                }
            })
            .endMenu()
            .endMenus()
            .endMenu()
            .build();
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:42,代码来源:DynamicPerspective.java


示例20: getMenus

import org.uberfire.client.annotations.WorkbenchMenu; //导入依赖的package包/类
@WorkbenchMenu
public String getMenus() {
    return "";
}
 
开发者ID:kiegroup,项目名称:appformer,代码行数:5,代码来源:WorkbenchScreenTest30.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RET类代码示例发布时间:2022-05-23
下一篇:
Java InterDatanodeProtocolPB类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap