java.lang.Object
com.thecoderscorner.menu.domain.MenuItem
- Direct Known Subclasses:
ActionMenuItem,AnalogMenuItem,BooleanMenuItem,CustomBuilderMenuItem,EditableLargeNumberMenuItem,EditableTextMenuItem,EnumMenuItem,FloatMenuItem,Rgb32MenuItem,RuntimeListMenuItem,ScrollChoiceMenuItem,SubMenuItem
The base class for all menu items, has the most basic operations available on it that are needed by pretty much
all menu items.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaccept(MenuItemVisitor visitor) intgets the eeprom storage address for this item.Gets the function name for this itemintgetId()gets the ID for the menu itemgetName()gets the name of the menu itemGets the variable name that should be used during generationbooleanhas children indicates if this item can contain child itemsbooleanReturns if this menu item is only for local viewing and not to be sent remotelybooleangets the read only status of this menu itembooleanMainly used by the designer, this specifies if the info block for a menu item resides in RAM or FLASHbooleanFlag indicates if the item should be visible on the UItoString()
-
Field Details
-
name
-
variableName
-
id
protected final int id -
eepromAddress
protected final int eepromAddress -
functionName
-
readOnly
protected final boolean readOnly -
localOnly
protected final boolean localOnly -
visible
protected final boolean visible -
staticDataInRAM
protected final boolean staticDataInRAM
-
-
Constructor Details
-
MenuItem
-
-
Method Details
-
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
Gets the function name for this item- Returns:
- the function name
-
getVariableName
Gets the variable name that should be used during generation- Returns:
- the variable name to use during generation
-
isVisible
public boolean isVisible()Flag indicates if the item should be visible on the UI- Returns:
- true if visible, otherwise false.
-
hasChildren
public boolean hasChildren()has children indicates if this item can contain child items- Returns:
- true, if the item can contain child items
-
isStaticDataInRAM
public boolean isStaticDataInRAM()Mainly used by the designer, this specifies if the info block for a menu item resides in RAM or FLASH- Returns:
- true if constant
-
toString
-