- java.lang.Object
-
- com.thecoderscorner.menu.domain.MenuItem<java.lang.Boolean>
-
- com.thecoderscorner.menu.domain.SubMenuItem
-
public class SubMenuItem extends MenuItem<java.lang.Boolean>
SubMenuItem represents a menu item that has children. To get the child items call the MenuTree methods that interact with items.
-
-
Field Summary
-
Fields inherited from class com.thecoderscorner.menu.domain.MenuItem
eepromAddress, functionName, id, localOnly, name, readOnly, visible
-
-
Constructor Summary
Constructors Constructor Description SubMenuItem()SubMenuItem(java.lang.String name, int id, int eepromAddr, boolean localOnly, boolean visible, boolean secured)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(MenuItemVisitor visitor)booleanequals(java.lang.Object o)booleanhasChildren()has children indicates if this item can contain child itemsinthashCode()booleanisSecured()MenuState<java.lang.Boolean>newMenuState(java.lang.Boolean value, boolean changed, boolean active)-
Methods inherited from class com.thecoderscorner.menu.domain.MenuItem
getEepromAddress, getFunctionName, getId, getName, isLocalOnly, isReadOnly, isVisible, toString
-
-
-
-
Method Detail
-
hasChildren
public boolean hasChildren()
Description copied from class:MenuItemhas children indicates if this item can contain child items- Overrides:
hasChildrenin classMenuItem<java.lang.Boolean>- Returns:
- true submenu's always have children.
-
isSecured
public boolean isSecured()
-
newMenuState
public MenuState<java.lang.Boolean> newMenuState(java.lang.Boolean value, boolean changed, boolean active)
- Specified by:
newMenuStatein classMenuItem<java.lang.Boolean>
-
accept
public void accept(MenuItemVisitor visitor)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-