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();
}
Aggregations