Example #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;
  }
Example #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;
  }
Example #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;
  }
Example #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);
 }