SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatAbstractMenu
public abstract class SwatAbstractMenu
extends SwatControl
| Field Summary | |
|---|---|
| boolean | Whether or not sub-menus of this menu will automatically display on mouse-over. |
| boolean | Whether or not a mouse click outside this menu will hide this menu. |
| Constructor Summary | |
|---|---|
SwatAbstractMenu(string id) Creates a new menu object. |
|
| Method Summary | |
|---|---|
| protected string | Gets the inline JavaScript used by this menu control. |
| protected string | Gets the name of the JavaScript class to instantiate for this menu. |
| void | setMenuItemValues(string value) Sets the value of all SwatMenuItem objects within this menu. |
| Methods inherited from Swat.SwatControl | |
|---|---|
| addMessage, getNote, printWidgetTree | |
| Methods inherited from Swat.SwatWidget | |
|---|---|
| addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer | |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public boolean $auto_sub_menu_display = true
Whether or not sub-menus of this menu will automatically display on mouse-over
Defaults to true. Set to false to require clicking on a menu item to display a sub-menu.
public boolean $click_to_hide = true
Whether or not a mouse click outside this menu will hide this menu
Defaults to true.
public SwatAbstractMenu(string id)
Creates a new menu object
id - a non-visible unique id for this widget.protected string getInlineJavaScript()
Gets the inline JavaScript used by this menu control
protected string getJavaScriptClass()
Gets the name of the JavaScript class to instantiate for this menu
Sub-classes of this class may want to return a sub-class of the default JavaScript menu class.
public void setMenuItemValues(string value)
Sets the value of all SwatMenuItem objects within this menu
This is usually easier than setting all the values manually if the values are dynamic.
Abstract base class for menus in Swat
Menu in Swat make use of the YUI menu widget and its progressive enhancement features. Swat menus are always positioned statically. See the
menu documentationfor what this means.