Search in sources :

Example 1 with UIBooleanMenuItem

use of com.thecoderscorner.menu.editorui.uimodel.UIBooleanMenuItem in project tcMenu by davetcc.

the class UIBooleanMenuItemTest method generateBooleanDialog.

private UIBooleanMenuItem generateBooleanDialog() throws Exception {
    MenuItem analogItem = menuTree.getMenuById(4).orElseThrow();
    VariableNameGenerator vng = new VariableNameGenerator(menuTree, false);
    var uiBoolItem = editorUI.createPanelForMenuItem(analogItem, menuTree, vng, mockedConsumer);
    if (uiBoolItem.isEmpty())
        throw new IllegalArgumentException("No menu item found");
    createMainPanel(uiBoolItem);
    return (UIBooleanMenuItem) uiBoolItem.get();
}
Also used : MenuItem(com.thecoderscorner.menu.domain.MenuItem) ScrollChoiceMenuItem(com.thecoderscorner.menu.domain.ScrollChoiceMenuItem) UIBooleanMenuItem(com.thecoderscorner.menu.editorui.uimodel.UIBooleanMenuItem) UIMenuItem(com.thecoderscorner.menu.editorui.uimodel.UIMenuItem) BooleanMenuItem(com.thecoderscorner.menu.domain.BooleanMenuItem) VariableNameGenerator(com.thecoderscorner.menu.editorui.generator.core.VariableNameGenerator) UIBooleanMenuItem(com.thecoderscorner.menu.editorui.uimodel.UIBooleanMenuItem)

Aggregations

BooleanMenuItem (com.thecoderscorner.menu.domain.BooleanMenuItem)1 MenuItem (com.thecoderscorner.menu.domain.MenuItem)1 ScrollChoiceMenuItem (com.thecoderscorner.menu.domain.ScrollChoiceMenuItem)1 VariableNameGenerator (com.thecoderscorner.menu.editorui.generator.core.VariableNameGenerator)1 UIBooleanMenuItem (com.thecoderscorner.menu.editorui.uimodel.UIBooleanMenuItem)1 UIMenuItem (com.thecoderscorner.menu.editorui.uimodel.UIMenuItem)1