Class MenuItem<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int eepromAddress  
      protected java.lang.String functionName  
      protected int id  
      protected boolean localOnly  
      protected java.lang.String name  
      protected boolean readOnly  
    • Constructor Summary

      Constructors 
      Constructor Description
      MenuItem​(java.lang.String name, int id, int eepromAddress, java.lang.String functionName, boolean readOnly, boolean localOnly)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void accept​(MenuItemVisitor visitor)  
      int getEepromAddress()
      gets the eeprom storage address for this item.
      java.lang.String getFunctionName()
      Gets the function name for this item
      int getId()
      gets the ID for the menu item
      java.lang.String getName()
      gets the name of the menu item
      boolean hasChildren()
      has children indicates if this item can contain child items
      boolean isLocalOnly()
      Returns if this menu item is only for local viewing and not to be sent remotely
      boolean isReadOnly()
      gets the read only status of this menu item
      abstract MenuState<T> newMenuState​(T value, boolean changed, boolean active)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        protected final java.lang.String name
      • id

        protected final int id
      • eepromAddress

        protected final int eepromAddress
      • functionName

        protected final java.lang.String functionName
      • readOnly

        protected final boolean readOnly
      • localOnly

        protected final boolean localOnly
    • Constructor Detail

      • MenuItem

        public MenuItem​(java.lang.String name,
                        int id,
                        int eepromAddress,
                        java.lang.String functionName,
                        boolean readOnly,
                        boolean localOnly)
    • Method Detail

      • getName

        public java.lang.String getName()
        gets the name of the menu item
        Returns:
        menu item name
      • isReadOnly

        public boolean isReadOnly()
        gets the read only status of this menu item
        Returns:
        true if read only
      • getId

        public int getId()
        gets the ID for the menu item
        Returns:
        item ID
      • isLocalOnly

        public boolean isLocalOnly()
        Returns if this menu item is only for local viewing and not to be sent remotely
        Returns:
        true if for local only, otherwise false.
      • getEepromAddress

        public int getEepromAddress()
        gets the eeprom storage address for this item. -1 indicates no storage.
        Returns:
        eeprom address
      • getFunctionName

        public java.lang.String getFunctionName()
        Gets the function name for this item
        Returns:
        the function name
      • hasChildren

        public boolean hasChildren()
        has children indicates if this item can contain child items
        Returns:
        true, if the item can contain child items
      • newMenuState

        public abstract MenuState<T> newMenuState​(T value,
                                                  boolean changed,
                                                  boolean active)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object