示例#1
0
  @Override
  public MenuBuilderImpl submenu(final String caption) {
    final CurrentContext currentContext = new CurrentContext();
    currentContext.caption = checkNotEmpty("caption", caption);
    currentContext.menuType = MenuType.GROUP;
    context.push(currentContext);

    return this;
  }
示例#2
0
  @Override
  public MenuBuilderImpl newContributedMenu(final String caption) {
    final CurrentContext currentContext = new CurrentContext();
    currentContext.caption = checkNotEmpty("caption", caption);
    currentContext.menuType = MenuType.CONTRIBUTED;
    context.push(currentContext);

    return this;
  }
示例#3
0
  @Override
  public MenuBuilderImpl newTopLevelMenu(final String caption) {
    final CurrentContext currentContext = new CurrentContext();
    currentContext.caption = checkNotEmpty("caption", caption);
    currentContext.menuType = MenuType.TOP_LEVEL;
    context.push(currentContext);

    return this;
  }
示例#4
0
 public MenuBuilderImpl(final MenuType menuType, final String caption) {
   final CurrentContext currentContext = new CurrentContext();
   currentContext.caption = checkNotEmpty("caption", caption);
   currentContext.menuType = checkNotNull("menuType", menuType);
   context.push(currentContext);
 }