Class RuntimeListMenuItem

java.lang.Object
com.thecoderscorner.menu.domain.MenuItem
com.thecoderscorner.menu.domain.RuntimeListMenuItem

public class RuntimeListMenuItem extends MenuItem
This class represents a runtime list menu item, which is a type of menu item that can contain a list of values. It extends the MenuItem class and inherits its properties and methods.
  • Constructor Details

    • RuntimeListMenuItem

      public RuntimeListMenuItem()
    • RuntimeListMenuItem

      public RuntimeListMenuItem(String name, String varName, int id, int eepromAddress, String functionName, boolean readOnly, boolean localOnly, boolean visible, int initialRows, boolean staticInRam, RuntimeListMenuItem.ListCreationMode creationMode)
  • Method Details

    • getListCreationMode

      public RuntimeListMenuItem.ListCreationMode getListCreationMode()
    • getInitialRows

      public int getInitialRows()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • accept

      public void accept(MenuItemVisitor visitor)
      Used with MenuItemHelper's visit method, accepts a MenuItemVisitor and calls the appropriate visit method for a RuntimeListMenuItem.
      Specified by:
      accept in class MenuItem
      Parameters:
      visitor - The MenuItemVisitor to accept
    • getItemsFromTree

      public List<String> getItemsFromTree(MenuTree menuTree)
      Retrieves the list of items from a menu tree for a specific RuntimeListMenuItem. This is a helper to get back the list of items stored in the tree state.
      Parameters:
      menuTree - the menu tree from which to retrieve the items
      Returns:
      a list of items as strings