Package menu

Class MacaoMenuItem

          The HTML Structure of a Menu Item

Constructor   Methods

The class MacaoMenuItem is used to create menu items for menus. See MacaoMenu.addMenuItem().

The HTML Structure of a Menu Item

The following structure shows the HTML elements, which are used to display a menu item. In the structure MyMenuMenuItemXXX stands for one of MyMenuMenuItem, MyMenuMenuItemActive or MyMenuMenuItemMouseOver, where MyMenu is the name of the menu object.

<div class="MyMenu" title="Title of the menu">
<table class="MyMenu">
<tr class="MyMenu">
<td class="MyMenu">
	<div class="MyMenuItemXXX" title="Title of the item">
		<img class="MyMenuItemXXX" src="Image source">
		<span class="MyMenuItemXXX">Text of the item</span>
	</div>
</td>
</tr>
</table>
</div>

The next structure shows the HTML elements for a menu item, which contains a placeholder %input% or %password%. The text is split into two parts. Each part is enclosed in a span element. Between this parts is a text or password input field.

<div class="MyMenu" title="Title of the menu">
<table class="MyMenu">
<tr class="MyMenu">
<td class="MyMenu">
	<div class="MyMenuMenuItemXXX" title="Title of the item">
		<img class="MyMenuItemXXX" src="Image source">
		<span class="MyMenuItemXXX">Begin of text</span>
		<input type="text|password">
		<span class="MyMenuItemXXX">End of text</span>
	</div>
</td>
</tr>
</table>
</div>
Constructor Summary
MacaoMenuItem(String name, String title, String imageDefaultSource, String imageMouseOverSource, String imageActiveSource, String eventType, Array eventParams, optional String recipientName)
     Use this constructor, to create a new menu item for a menu.

Method Summary
void execute()
     Call this method to execute the menu item like the user had clicked it.
Element getDiv()
     Call this method to get the DOM element, which encloses elements of the menu item.
Array getEventParams()
     Call this method to get the parameters, which are defined for the menu items event.
String getEventType()
     Call this method to get the menu items event.
String getInputValue()
     Call this method to get the value of the input field.
MacaoMenu getMenu()
     Call this method to get the menu object, to which the menu item belongs.
String getName()
     Call this method to get the name of the menu item.
String getRecipientName()
     Call this method to set the name of the object, to which the menu items event is sent.
String getTitle()
     Call this method, to get the title of the menu item.
boolean getVisibility()
     Call this method to get the visibility of the menu item.
boolean isActivation()
     Call this method to find out, if this menu item is a toggle menu item.
boolean isActive()
     Call this method to find out, if this radio or toggle menu item is activated or deactivated.
boolean isRadio()
     Call this method to find out, if this menu item is a radio menu item.
void setAbsolutePosition(integer left, integer top)
     Call this method to move the menu item to an absolute position on the page.
void setActivation(boolean isActivation, boolean isRadio)
     Call this method to set the menu item as toggle menu item or radio menu item.
void setActive(boolean active)
     Call this method to set the toggle or radio menu item as active or inactive.
void setEventParams(Array eventParams)
     Call this method to define the parameters for the menu items event.
void setEventType(String eventType)
     Call this method to set the event type of the menu item.
void setImageSource(String imageSource, boolean isDefaultImage, boolean isMouseOverImage, boolean isActiveImage)
     Call this method to change an image, which is used to display the menu item.
void setInputValue(String value)
     Call this method to set the value of the input field.
void setRecipientName(String recipientName)
     Call this method to define the recipient of the menu items event.
void setText(String html)
     Call this method to set or clear the HTML, which is used to display the text beside the image in a span element.
void setTitle(String title)
     Call this method to change the tool tip of the menu item.
void setVisibility(boolean visibility)
     Call this method to show or hide the menu item.

Constructor Details
MacaoMenuItem(String name, String title, String imageDefaultSource, String imageMouseOverSource, String imageActiveSource, String eventType, Array eventParams, optional String recipientName)

Method Details
void execute()

Element getDiv()

Array getEventParams()

String getEventType()

String getInputValue()

MacaoMenu getMenu()

String getName()

String getRecipientName()

String getTitle()

boolean getVisibility()

boolean isActivation()

boolean isActive()

boolean isRadio()

void setAbsolutePosition(integer left, integer top)

void setActivation(boolean isActivation, boolean isRadio)

void setActive(boolean active)

void setEventParams(Array eventParams)

void setEventType(String eventType)

void setImageSource(String imageSource, boolean isDefaultImage, boolean isMouseOverImage, boolean isActiveImage)

void setInputValue(String value)

void setRecipientName(String recipientName)

void setText(String html)

void setTitle(String title)

void setVisibility(boolean visibility)