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

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

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

[英]Causes the given MenuVisitor to visit this menu item and its children.
[中]使给定菜单访问者访问此菜单项及其子菜单项。

代码示例

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

@Override
public void accept(MenuVisitor visitor) {
  if (visitor.visitEnter(this)) {
    for (final MenuItem item : menuItems.values()) {
      item.accept(visitor);
    }
    visitor.visitLeave(this);
  }
}

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

protected Widget makeItem(final MenuItem item,
             boolean isRoot) {
  Widget[] menuWidget = new Widget[]{null};
  item.accept(new AuthFilterMenuVisitor(authzManager,
                     identity,
                     new BaseMenuVisitor() {
                       @Override
                       public boolean visitEnter(MenuGroup menuGroup) {
                         menuWidget[0] = makeMenuGroup(menuGroup,
                                        isRoot);
                         return false;
                       }
                       @Override
                       public void visit(MenuItemCommand menuItemCommand) {
                         menuWidget[0] = makeMenuItemCommand(menuItemCommand,
                                           isRoot);
                       }
                       @Override
                       public void visit(MenuCustom<?> menuCustom) {
                         menuWidget[0] = makeMenuCustom(menuCustom);
                       }
                     }));
  return menuWidget[0];
}

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

protected Widget makeItem(final MenuItem item,
             boolean isRoot) {
  Widget[] menuWidget = new Widget[]{null};
  item.accept(new AuthFilterMenuVisitor(authzManager,
                     identity,
                     new BaseMenuVisitor() {
                       @Override
                       public boolean visitEnter(MenuGroup menuGroup) {
                         menuWidget[0] = makeMenuGroup(menuGroup,
                                        isRoot);
                         return false;
                       }
                       @Override
                       public void visit(MenuItemCommand menuItemCommand) {
                         menuWidget[0] = makeMenuItemCommand(menuItemCommand,
                                           isRoot);
                       }
                       @Override
                       public void visit(MenuCustom<?> menuCustom) {
                         menuWidget[0] = makeMenuCustom(menuCustom);
                       }
                     }));
  return menuWidget[0];
}

代码示例来源:origin: org.uberfire/uberfire-commons-editor-client

@Override
public void accept(MenuVisitor visitor) {
  if (visitor.visitEnter(this)) {
    for (final MenuItem item : menuItems.values()) {
      item.accept(visitor);
    }
    visitor.visitLeave(this);
  }
}

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

@Override
public void accept(MenuVisitor visitor) {
  if (visitor.visitEnter(this)) {
    for (MenuItem item : menuItems) {
      item.accept(visitor);
    }
    visitor.visitLeave(this);
  }
}

代码示例来源:origin: org.uberfire/uberfire-asset-mgmt-client

@Override
public void accept(MenuVisitor visitor) {
  if (visitor.visitEnter(this)) {
    for (final MenuItem item : items) {
      item.accept(visitor);
    }
    visitor.visitLeave(this);
  }
}

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

@Override
public void accept(MenuVisitor visitor) {
  if (visitor.visitEnter(this)) {
    for (MenuItem child : ensureIterable(getItems())) {
      child.accept(visitor);
    }
    visitor.visitLeave(this);
  }
}

相关文章