Class BooleanMenuItem


  • public class BooleanMenuItem
    extends MenuItem<java.lang.Boolean>
    A menu item that can only hold boolean values (true or false). The naming can be changed such that the boolean can be represented with different text. Rather than using the constructor use the BooleanMenuItemBuilder to build one.
    • Constructor Detail

      • BooleanMenuItem

        public BooleanMenuItem()
      • BooleanMenuItem

        public BooleanMenuItem​(java.lang.String name,
                               int id,
                               int eepromAddress,
                               java.lang.String functionName,
                               BooleanMenuItem.BooleanNaming naming,
                               boolean readOnly)
    • Method Detail

      • getNaming

        public BooleanMenuItem.BooleanNaming getNaming()
        returns the naming for this boolean, that describes how to render the true/false choice.
        Returns:
        the possible naming schemes.
      • newMenuState

        public MenuState<java.lang.Boolean> newMenuState​(java.lang.Boolean value,
                                                         boolean changed,
                                                         boolean active)
        returns a new menu state object, suitable for storing the current value
        Specified by:
        newMenuState in class MenuItem<java.lang.Boolean>
        Parameters:
        value - the new value
        changed - if the item has changed
        active - if the item is active
        Returns:
        a menu state.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object