Class
caplin.menu.model

Item

The class is still an Alpha release. It should only be used for experimental development as substantial changes may occur.

Constructor Summary

Attributes Name and Description
caplin.menu.model.Item(String label, Function callback, type)

Method Summary

Attributes Name and Description
void disable()

Disables the item.

void enable()

Enables the item.

void executeAction()

Executes the action associated with this item if a callback for it has been provided and the item is enabled.

String getType()

Returns the type in string format.

Boolean isEnabled()

Returns true if the item is enabled, false if it is not.

Constructor Detail

caplin.menu.model.Item(String label, Function callback, type)

Parameters
String label The item label.
Function callback The function to be called back when the action on this item is triggered.
type

Method Detail

void disable()

Disables the item.

void enable()

Enables the item.

void executeAction()

Executes the action associated with this item if a callback for it has been provided and the item is enabled.

String getType()

Returns the type in string format.

Returns
{String}

Boolean isEnabled()

Returns true if the item is enabled, false if it is not.

Returns
{Boolean}