@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; }
@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; }
@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; }
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); }