Class MenuItem<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int eepromAddress  
      protected java.lang.String functionName  
      protected int id  
      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)  
    • 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
    • Constructor Detail

      • MenuItem

        public MenuItem​(java.lang.String name,
                        int id,
                        int eepromAddress,
                        java.lang.String functionName,
                        boolean readOnly)
    • 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
      • 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