Search in sources :

Example 1 with UILargeNumberMenuItem

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

the class UILargeNumberItemTest method generateLargeNumDialog.

private UILargeNumberMenuItem generateLargeNumDialog() throws Exception {
    var largeNumItem = EditableLargeNumberMenuItemBuilder.aLargeNumberItemBuilder().withName("Large Num").withId(222).withEepromAddr(22).withDecimalPlaces(5).withTotalDigits(10).withNegativeAllowed(true).menuItem();
    menuTree.addMenuItem(MenuTree.ROOT, largeNumItem);
    VariableNameGenerator vng = new VariableNameGenerator(menuTree, false);
    var uiBoolItem = editorUI.createPanelForMenuItem(largeNumItem, menuTree, vng, mockedConsumer);
    if (uiBoolItem.isEmpty())
        throw new IllegalArgumentException("No menu item found");
    createMainPanel(uiBoolItem);
    return (UILargeNumberMenuItem) uiBoolItem.get();
}
Also used : UILargeNumberMenuItem(com.thecoderscorner.menu.editorui.uimodel.UILargeNumberMenuItem) VariableNameGenerator(com.thecoderscorner.menu.editorui.generator.core.VariableNameGenerator)

Aggregations

VariableNameGenerator (com.thecoderscorner.menu.editorui.generator.core.VariableNameGenerator)1 UILargeNumberMenuItem (com.thecoderscorner.menu.editorui.uimodel.UILargeNumberMenuItem)1