MenuLayout Class

Layout initially intended for mobile applications. Contains a header, body, and menu panel. The header includes a menu icon which is used to slide open/close a menu panel.

Constructors

MenuLayout( parent, config )
Used to instantiate this class
parentDOM element in which to render this component
configConfiguration settings (optional). See config options for more information.

Config Options

animationSteps
Time to slide open the menu panel, in milliseconds.
transitionEffect
Transition effect. A "linear" transition is applied by default. Additional options are available if an instance of a javaxt.dhtml.Effects class is provided in the "fx" config. See the javaxt.dhtml.Effects class for complete a list of options.
fx
An instance of a javaxt.dhtml.Effects class used to animate transitions.
menuWidth
Width of the menu panel, in pixels.
menuPosition
Used to set which side to use for the menu panel and corresponding icon. Options are "left" or "right".
title
Text or DOM object to appear in the header area.
style
Style for individual elements within this component. Note that you can provide CSS class names instead of individual style definitions.

Events

onShow( )
Called whenever the menu is made visible
onHide( )
Called whenever the menu is hidden
beforeShow( )
Called immediately before the menu is made visible
beforeHide( )
Called immediately before the menu is hidden
onResize( )
Function called whenever this component is resized

Public Methods

getMenuIcon( )
Returns the DOM element used to render the menu icon.
setTitle( obj )
Used to update the contents of the header area
objText or DOM object to appear in the header area
getTitle( )
Returns the title (e.g. string or DOM object). See setTitle()
isMenuVisible( )
Returns true if the menu is visible
showMenu( )
Used to slide open the menu, if it is hidden from view
hideMenu( )
Used to hide the menu, if it is visible
resize( )
Used to update the layout of this component
getMenu( )
Returns the menu panel
getBody( )
Returns the body panel