Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 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);
 }