Uses of Class
com.thecoderscorner.menu.domain.MenuItem
Packages that use MenuItem
Package
Description
-
Uses of MenuItem in com.thecoderscorner.menu.domain
Classes in com.thecoderscorner.menu.domain with type parameters of type MenuItemModifier and TypeClassDescriptionclassMenuItemBuilder<T extends MenuItemBuilder,M extends MenuItem> Subclasses of MenuItem in com.thecoderscorner.menu.domainModifier and TypeClassDescriptionclassActionMenuItem represents a menu item that is a one shot action, in that when triggered it just runs the callback on the embedded side.classRepresents an analog (numeric) menu item, it is always a zero based integer when retrieved from storage, but it can have an offset and divisor, so therefore is able to represent decimal values.classA menu item that can only hold boolean values (true or false).classThis is a custom menu item that can be created by the designer, but does not directly represent a different item in the API.classA menu item that corresponds to the large number type on the device.classAn implementation of menu item that can store text strings.classA menu item implementation that represents one of a known set of choices, the choices are stored as an integer value, but each choice has a string representation as well.classFloatMenuItem represents a menu item that uses a floating point value.classA menu item that represents a colour in the RGB domain with optional Alpha channel.classThis class represents a runtime list menu item, which is a type of menu item that can contain a list of values.classRepresents a more configurable and more extensible version of enum that should be used when the number of choices is larger, the choices are in eeprom, or you need more control at runtime of the choices.classSubMenuItem represents a menu item that has children. -
Uses of MenuItem in com.thecoderscorner.menu.domain.state
Methods in com.thecoderscorner.menu.domain.state that return MenuItemModifier and TypeMethodDescriptionAnyMenuState.getItem()MenuState.getItem()Gets the menu item associated with this state.Methods in com.thecoderscorner.menu.domain.state that return types with arguments of type MenuItemModifier and TypeMethodDescriptionMenuTree.getAllMenuItems()Gets every menu item held in this menu tree, will be uniqueMenuTree.getAllMenuItemsFrom(SubMenuItem item) Gets every menu item held in this menu tree from a given starting point, the starting point is a sub menu, from that submenu, this method will recurse through the rest of the menu structure and provide a complete list.MenuTree.getAllSubMenus()Returns all the submenus that are currently storedMenuTree.getMenuById(int id) Gets the menu item with the specified ID, finding the submenu if needed.MenuTree.getMenuItems(MenuItem item) Get a list of all menu items for a given submenuMethods in com.thecoderscorner.menu.domain.state with parameters of type MenuItemModifier and TypeMethodDescriptionvoidMenuTree.addMenuItem(SubMenuItem parent, MenuItem item) add a new menu item to a sub menu, for the top level menu use ROOT.voidMenuTree.addOrUpdateItem(int parentId, MenuItem item) This will either add or update an existing item, depending on the ID is already present.voidMenuTree.changeItem(MenuItem item, AnyMenuState menuState) Change the value that's associated with a menu item.intMenuTree.findIndexOf(SubMenuItem which, MenuItem item) MenuTree.findParent(MenuItem toFind) Finds the submenu that the provided object belongs to.MenuTree.getMenuItems(MenuItem item) Get a list of all menu items for a given submenu<T extends AnyMenuState>
TMenuTree.getMenuState(MenuItem item) Gets the menu state that's associated with a given menu item.voidMoves the item within the menu structure, the new location is either the submenu it should be moved to, or the item it should appear after.voidMenuTree.removeMenuItem(MenuItem toRemove) Remove the menu item using this menu item as a prototype (Uses the ID for comparison)voidMenuTree.removeMenuItem(SubMenuItem parent, MenuItem item) Remove the menu item for the provided menu item in the provided sub menu.voidMenuTree.replaceMenuById(MenuItem toReplace) Replace a menu item with the given ID.voidMenuTree.replaceMenuById(SubMenuItem subMenu, MenuItem toReplace) Replace the menu item that has a given parent with the one provided.Method parameters in com.thecoderscorner.menu.domain.state with type arguments of type MenuItemModifier and TypeMethodDescriptionvoidMenuTree.recurseTreeIteratingOnItems(SubMenuItem root, BiConsumer<MenuItem, SubMenuItem> consumer) Recurse the whole menu tree calling the consumer for each item in turn.Constructors in com.thecoderscorner.menu.domain.state with parameters of type MenuItemModifierConstructorDescriptionBigDecimalMenuState(MenuItem item, boolean changed, boolean active, BigDecimal value) Creates a state that can store a big decimalBooleanMenuState(MenuItem item, boolean changed, boolean active, boolean value) CurrentScrollPositionMenuState(MenuItem item, boolean changed, boolean active, CurrentScrollPosition value) FloatMenuState(MenuItem item, boolean changed, boolean active, Float value) IntegerMenuState(MenuItem item, boolean changed, boolean active, Integer value) MenuState(AnyMenuState.StateStorageType storageType, MenuItem item, boolean changed, boolean active, T value) normally these states are created from the menu item, instead of directlyPortableColorMenuState(MenuItem item, boolean changed, boolean active, PortableColor value) StringListMenuState(MenuItem item, boolean changed, boolean active, String... value) StringListMenuState(MenuItem item, boolean changed, boolean active, List<String> value) StringMenuState(MenuItem item, boolean changed, boolean active, String value) -
Uses of MenuItem in com.thecoderscorner.menu.domain.util
Methods in com.thecoderscorner.menu.domain.util that return MenuItemModifier and TypeMethodDescriptionstatic MenuItemMenuItemHelper.createFromExistingWithId(MenuItem selected, int newId) creates a copy of the menu item chosen, with the ID changed to newIdMethods in com.thecoderscorner.menu.domain.util with parameters of type MenuItemModifier and TypeMethodDescriptionvoidWhenever a visit method is not implemented, then anyItem is called instead.static Optional<AnyMenuState>MenuItemHelper.applyIncrementalValueChange(MenuItem item, int delta, MenuTree tree) Try and apply an incremental delta value update to a menu tree.static SubMenuItemReturns the menu item as a sub menu or nullstatic MenuItemBuilderMenuItemHelper.builderWithExisting(MenuItem item) static MenuItemMenuItemHelper.createFromExistingWithId(MenuItem selected, int newId) creates a copy of the menu item chosen, with the ID changed to newIdstatic intMenuItemHelper.eepromSizeForItem(MenuItem item) Gets the size of the eeprom storage for a given element typeMenuItemFormatter.formatForDisplay(MenuItem item, Object data) MenuItemFormatter.formatToWire(MenuItem item, String text) static Optional<BootItemMenuCommand<?,?>> MenuItemHelper.getBootMsgForItem(MenuItem item, SubMenuItem parent, MenuTree tree) Can be used during boot sequences to get a suitable boot item for a menu itemstatic ObjectMenuItemHelper.getDefaultFor(MenuItem item) Gets the default item value for a menu item, such that the value could be used in call to set state.MenuItemFormatter.getItemName(MenuItem item) static ObjectMenuItemHelper.getValueFor(MenuItem item, MenuTree tree) This gets the value from the tree state, if it is not available calls getDefaultValue Same as getValueFor(item, tree, defVal) but this just calls getDefaultFor(..) to get the default.static <T> TMenuItemHelper.getValueFor(MenuItem item, MenuTree tree, T def) Gets the value from the tree or the default providedstatic booleanMenuItemHelper.isRuntimeStructureNeeded(MenuItem item) Check if the item is based on a runtime itemstatic voidMenuItemHelper.setMenuState(MenuItem item, Object value, MenuTree tree) Set the state in the tree for an item with a new value, setting it changed if it genuinely has.static AnyMenuStateMenuItemHelper.stateForMenuItem(MenuItem item, Object v, boolean changed, boolean active) Create a menu state for a given item with a value update.static AnyMenuStateMenuItemHelper.stateForMenuItem(AnyMenuState existingState, MenuItem item, Object val) Get a new state object based on an existing state with a new value keeping all exising other valuesstatic AnyMenuStateMenuItemHelper.stateForMenuItem(AnyMenuState existingState, MenuItem item, Object val, boolean changed) Get the state for an existing state with a new value, changing the changed statestatic <T> Optional<T>MenuItemHelper.visitWithResult(MenuItem item, AbstractMenuItemVisitor<T> visitor) Visits a menu item calling the appropriate function for the type and collects the result that is set by calling your visitor's `setResult` method. -
Uses of MenuItem in com.thecoderscorner.menu.mgr
Methods in com.thecoderscorner.menu.mgr with parameters of type MenuItemModifier and TypeMethodDescriptionvoidMenuManagerServer.menuItemDidUpdate(Object sender, MenuItem item) Tell the manager that an update has already occurred, IE the menu tree state is already adjusted.voidMenuManagerListener.menuItemHasChanged(Object sender, MenuItem item) Called whenever there is a change in any menu item, it will indicate if the change is local or remote.voidMenuManagerServer.treeStructurallyChanged(MenuItem hint) Tell the manager that the tree has structurally changed and that any interested parties need notification.voidMenuTreeStructureChangeListener.treeStructureChanged(MenuItem parentHint) The tree has structurally changed.voidMenuManagerServer.updateMenuItem(Object sender, MenuItem item, Object newValue) Update the value for the given menu item.Constructors in com.thecoderscorner.menu.mgr with parameters of type MenuItemModifierConstructorDescriptionMenuInMenu(RemoteConnector remoteConnector, MenuManagerServer manager, MenuItem root, MenuInMenu.ReplicationMode mode, int offsetRange, int maxRange) Creates a MenuInMenu instance that tracks changes in a remote menu and replicates it locally in real time. -
Uses of MenuItem in com.thecoderscorner.menu.persist
Methods in com.thecoderscorner.menu.persist that return MenuItemMethods in com.thecoderscorner.menu.persist with parameters of type MenuItemModifier and TypeMethodDescriptionJsonMenuItemSerializer.itemsToCopyText(MenuItem startingPoint, MenuTree tree) voidConstructors in com.thecoderscorner.menu.persist with parameters of type MenuItem -
Uses of MenuItem in com.thecoderscorner.menu.remote
Methods in com.thecoderscorner.menu.remote with parameters of type MenuItemModifier and TypeMethodDescriptionvoidRemoteControllerListener.ackReceived(CorrelationId key, MenuItem item, AckStatus status) Indicates that an acknowledgment has been received from the embedded device.voidRemoteControllerListener.menuItemChanged(MenuItem item, boolean valueOnly) Called when a menu item has either been added or changed, the valueOnly indicates if the change is just in the latest value, or also in the MenuItem structure too.RemoteMenuController.sendAbsoluteUpdate(MenuItem item, Object newValue) Send an asbolute change for the given itemRemoteMenuController.sendDeltaUpdate(MenuItem item, int deltaChange) Send a delta change for the given menuitem -
Uses of MenuItem in com.thecoderscorner.menu.remote.commands
Classes in com.thecoderscorner.menu.remote.commands with type parameters of type MenuItemMethods in com.thecoderscorner.menu.remote.commands with parameters of type MenuItemModifier and TypeMethodDescriptionstatic MenuChangeCommandCommandFactory.newAbsoluteMenuChangeCommand(CorrelationId correlation, MenuItem item, Object value) Creates a new absolute change command given the menu item and the absolute change in value.static MenuChangeCommandCommandFactory.newDeltaChangeCommand(CorrelationId correlation, MenuItem item, int value) Creates a new delta change command given the menu item and the delta change in value.static MenuChangeCommandCommandFactory.newListResponseChangeCommand(CorrelationId correlation, MenuItem item, ListResponse value) Creates a new change command that represents a list item either being selected or invoked