silverorange Code


Swat.SwatAbstractMenu
/Swat/SwatAbstractMenu.php at line 23

Class SwatAbstractMenu

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatAbstractMenu

public abstract class SwatAbstractMenu
extends SwatControl

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 documentation for what this means.

Copyright:
2007 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
See Also:
SwatMenu
SwatGroupedMenu

Field Summary
boolean

$auto_sub_menu_display

Whether or not sub-menus of this menu will automatically display on mouse-over.

boolean

$click_to_hide

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

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.

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

Field Detail

/Swat/SwatAbstractMenu.php at line 45

auto_sub_menu_display

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.


/Swat/SwatAbstractMenu.php at line 34

click_to_hide

public boolean $click_to_hide = true

Whether or not a mouse click outside this menu will hide this menu

Defaults to true.


Constructor Detail

/Swat/SwatAbstractMenu.php at line 57

SwatAbstractMenu

public SwatAbstractMenu(string id)

Creates a new menu object

Parameters:
id - a non-visible unique id for this widget.
See Also:
SwatWidget::__construct()

Method Detail

/Swat/SwatAbstractMenu.php at line 112

getInlineJavaScript

protected string getInlineJavaScript()

Gets the inline JavaScript used by this menu control

Returns:
the inline JavaScript used by this menu control.

/Swat/SwatAbstractMenu.php at line 99

getJavaScriptClass

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.

Returns:
the name of the JavaScript class to instantiate for this menu. Defaults to 'YAHOO.widget.Menu'.

/Swat/SwatAbstractMenu.php at line 80

setMenuItemValues

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.


silverorange Code