Interface
caplin.component.menu

Menu

The class is still in Beta and is subject to API changes.
The Menu interface is implemented by the following concrete classes:

Constructor Summary

Attributes Name and Description
caplin.component.menu.Menu()

Method Summary

Attributes Name and Description
void addChangeListener(caplin.component.menu.MenuChangeListener oListener)

Register to receive menu change events.

void addMenuItem(caplin.component.menu.Menu oMenuItem)

Add a new menu item to the list of child menu items.

Array getChildren()

A list of either the menu items within a sub-menu, or a grouped set of menu items.

String getDescription()

The description of either a single menu item or a sub-menu item.

Function getHandler()

The handler function that will be invoked when the menu item is clicked.

boolean isEnabled()

Returns true if this menu is currently enabled, and false otherwise.

void removeChangeListener(caplin.component.menu.MenuChangeListener oListener)

Remove a previously registered listener.

void removeMenuItem(caplin.component.menu.Menu oMenuItem)

Remove an existing menu item from the list of child menu items.

void setIsEnabled(boolean bIsEnabled)

Set whether the menu is enabled or not.

Constructor Detail

caplin.component.menu.Menu()

Method Detail

void addChangeListener(caplin.component.menu.MenuChangeListener oListener)

Register to receive menu change events.

Parameters
caplin.component.menu.MenuChangeListener oListener The listener to be registered.

void addMenuItem(caplin.component.menu.Menu oMenuItem)

Add a new menu item to the list of child menu items.

Parameters
caplin.component.menu.Menu oMenuItem The menu item to be added.
See
#getChildren

Array getChildren()

A list of either the menu items within a sub-menu, or a grouped set of menu items.

String getDescription()

The description of either a single menu item or a sub-menu item.

Function getHandler()

The handler function that will be invoked when the menu item is clicked.

boolean isEnabled()

Returns true if this menu is currently enabled, and false otherwise.

void removeChangeListener(caplin.component.menu.MenuChangeListener oListener)

Remove a previously registered listener.

Parameters
caplin.component.menu.MenuChangeListener oListener A previously registered listener.

void removeMenuItem(caplin.component.menu.Menu oMenuItem)

Remove an existing menu item from the list of child menu items.

Parameters
caplin.component.menu.Menu oMenuItem The menu item to be removed.
See
#getChildren

void setIsEnabled(boolean bIsEnabled)

Set whether the menu is enabled or not.

Parameters
boolean bIsEnabled Whether to enable or disable the menu item