org.uberfire.workbench.model.menu.MenuItem.getPosition()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(81)

本文整理了Java中org.uberfire.workbench.model.menu.MenuItem.getPosition()方法的一些代码示例,展示了MenuItem.getPosition()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MenuItem.getPosition()方法的具体详情如下:
包路径:org.uberfire.workbench.model.menu.MenuItem
类名称:MenuItem
方法名:getPosition

暂无

代码示例

代码示例来源:origin: kiegroup/appformer

protected AnchorListItem createListItem(final MenuItem menuItem,
                    final HasMenuItems hasMenuItems) {
  final AnchorListItem option = GWT.create(AnchorListItem.class);
  option.setText(menuItem.getCaption());
  setupEnableDisable(menuItem,
            option);
  hasMenuItems.addMenuItem(menuItem.getPosition(),
               option);
  return option;
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

protected AnchorListItem createListItem(final MenuItem menuItem,
                    final HasMenuItems hasMenuItems) {
  final AnchorListItem option = GWT.create(AnchorListItem.class);
  option.setText(menuItem.getCaption());
  setupEnableDisable(menuItem,
            option);
  hasMenuItems.addMenuItem(menuItem.getPosition(),
               option);
  return option;
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-bs2

/**
 * Add a Presenter Menu item to the view. This simply converts Presenter
 * Menu items to GWT MenuItems. Filtering of menu items for permissions is
 * conducted by the Presenter.
 */
@Override
public void addMenuItems( final Menus menus ) {
  for ( final MenuItem activeMenu : menus.getItems() ) {
    final Widget result = makeItem( activeMenu );
    if ( result != null ) {
      final Widget gwtItem = makeItem( activeMenu );
      if ( activeMenu.getPosition().equals( MenuPosition.LEFT ) ) {
        menuBarLeft.add( gwtItem );
      } else if ( activeMenu.getPosition().equals( MenuPosition.CENTER ) ) {
        menuBarCenter.add( gwtItem );
      } else if ( activeMenu.getPosition().equals( MenuPosition.RIGHT ) ) {
        menuBarRight.add( gwtItem );
      }
    }
  }
}

代码示例来源:origin: org.uberfire/uberfire-api

assertThat(menus.getItems().get(0)).isNotNull();
assertThat(menus.getItems().get(0)).isInstanceOf(MenuGroup.class);
assertThat(menus.getItems().get(0).getPosition()).isEqualTo(MenuPosition.RIGHT);
assertThat(menus.getItems().get(0).getCaption()).isEqualTo("File");
assertThat(((MenuGroup) menus.getItems().get(0)).getItems()).hasSize(2);

代码示例来源:origin: kiegroup/appformer

assertThat(menus.getItems().get(0)).isNotNull();
assertThat(menus.getItems().get(0)).isInstanceOf(MenuGroup.class);
assertThat(menus.getItems().get(0).getPosition()).isEqualTo(MenuPosition.RIGHT);
assertThat(menus.getItems().get(0).getCaption()).isEqualTo("File");
assertThat(((MenuGroup) menus.getItems().get(0)).getItems()).hasSize(2);

相关文章