tcMenuJavaAPI
Public Member Functions | Protected Attributes | List of all members
com.thecoderscorner.menu.domain.MenuItem Class Referenceabstract
Inheritance diagram for com.thecoderscorner.menu.domain.MenuItem:
com.thecoderscorner.menu.domain.ActionMenuItem com.thecoderscorner.menu.domain.AnalogMenuItem com.thecoderscorner.menu.domain.BooleanMenuItem com.thecoderscorner.menu.domain.CustomBuilderMenuItem com.thecoderscorner.menu.domain.EditableLargeNumberMenuItem com.thecoderscorner.menu.domain.EditableTextMenuItem com.thecoderscorner.menu.domain.EnumMenuItem com.thecoderscorner.menu.domain.FloatMenuItem com.thecoderscorner.menu.domain.Rgb32MenuItem com.thecoderscorner.menu.domain.RuntimeListMenuItem com.thecoderscorner.menu.domain.ScrollChoiceMenuItem com.thecoderscorner.menu.domain.SubMenuItem

Public Member Functions

 MenuItem (String name, String variableName, int id, int eepromAddress, String functionName, boolean readOnly, boolean localOnly, boolean visible, boolean staticDataInRAM)
 
String getName ()
 
boolean isReadOnly ()
 
int getId ()
 
boolean isLocalOnly ()
 
int getEepromAddress ()
 
String getFunctionName ()
 
String getVariableName ()
 
boolean isVisible ()
 
boolean hasChildren ()
 
abstract void accept (MenuItemVisitor visitor)
 
boolean isStaticDataInRAM ()
 
String toString ()
 

Protected Attributes

final String name
 
final String variableName
 
final int id
 
final int eepromAddress
 
final String functionName
 
final boolean readOnly
 
final boolean localOnly
 
final boolean visible
 
final boolean staticDataInRAM
 

Detailed Description

The base class for all menu items, has the most basic operations available on it that are needed by pretty much all menu items.

Member Function Documentation

◆ getEepromAddress()

int com.thecoderscorner.menu.domain.MenuItem.getEepromAddress ( )

gets the eeprom storage address for this item. -1 indicates no storage.

Returns
eeprom address

◆ getFunctionName()

String com.thecoderscorner.menu.domain.MenuItem.getFunctionName ( )

Gets the function name for this item

Returns
the function name

◆ getId()

int com.thecoderscorner.menu.domain.MenuItem.getId ( )

gets the ID for the menu item

Returns
item ID

◆ getName()

String com.thecoderscorner.menu.domain.MenuItem.getName ( )

gets the name of the menu item

Returns
menu item name

◆ getVariableName()

String com.thecoderscorner.menu.domain.MenuItem.getVariableName ( )

Gets the variable name that should be used during generation

Returns
the variable name to use during generation

◆ hasChildren()

boolean com.thecoderscorner.menu.domain.MenuItem.hasChildren ( )

has children indicates if this item can contain child items

Returns
true, if the item can contain child items

Reimplemented in com.thecoderscorner.menu.domain.SubMenuItem, and com.thecoderscorner.menu.domain.ActionMenuItem.

◆ isLocalOnly()

boolean com.thecoderscorner.menu.domain.MenuItem.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.

◆ isReadOnly()

boolean com.thecoderscorner.menu.domain.MenuItem.isReadOnly ( )

gets the read only status of this menu item

Returns
true if read only

◆ isStaticDataInRAM()

boolean com.thecoderscorner.menu.domain.MenuItem.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

◆ isVisible()

boolean com.thecoderscorner.menu.domain.MenuItem.isVisible ( )

Flag indicates if the item should be visible on the UI

Returns
true if visible, otherwise false.

The documentation for this class was generated from the following file: