MenuButton DTD and XML definitions

The MenuButton extends the SpButton bean. It has the following entry in the DTD file:
Table 1. MenuButton definition
Line entry in the DTD file Description
<!ELEMENT MenuButton (MenuItem+,Separator*)+> A MenuButton can have one or more MenuItems and zero or many Separators
<!ATTLIST MenuButton
    iconName CDATA #REQUIRED
    toolTipText CDATA #REQUIRED
    name CDATA #IMPLIED
    width CDATA "32"
    height CDATA "22"
    x CDATA #IMPLIED
    y CDATA #IMPLIED
    circularNavigation (true|false) "true"
    hotKey CDATA #IMPLIED
    onInitialize CDATA #IMPLIED>
Attribute list
Table 2. MenuButton attributes
Attribute Description
iconName Name of the file containing an icon to be set into the button (mandatory)
toolTipText Text that is shown when the mouse cursor is moved over the button (mandatory)
name Name used by the Desktop to identify this component
width Width of the button
height Height of the button
x Horizontal coordinate for the location of the button
y Vertical coordinate for the location of the button
circularNavigation Whether pressing the "down arrow" key once the bottom item button has been reached will return focus to the top item button, and pressing the "up arrow" key from the top-most item button will return focus to the bottom item button
hotKey Combination of keys used as a hot key for the MenuButton. Pressing this combination of keys when the MenuButton is visible on the Desktop is equivalent to clicking the MenuButton.
onInitialize Java(TM) code to be executed when the component is initialized
The following is an example of an XML definition for a MenuButton:
<MenuButton iconName="/assets.gif" toolTipText="Assets" width="32" height="22" 
    x="7" y="32" circularNavigation="true" >
  <MenuItem ... /> 
  <MenuItem ... /> 
  <Separator/>
  <MenuItem ... /> 
  <MenuItem ... /> 
</MenuButton>