Packagecom.gestureworks.cml.element
Classpublic class Menu
InheritanceMenu Inheritance Container Inheritance ContainerFactory Inheritance ElementFactory Inheritance flash.display.Sprite
Subclasses OrbMenu

The Menu element constructs a custom menu using nested Buttons(s). It features auto-hiding and auto-positioning.

See also

Button
OrbMenu
DropDownMenu


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
[override] [write-only] sets the alpha for display objects
ElementFactory
  autoHide : Boolean
Specifies whether the menu automatically hides when not in use
Menu
  autoHideTime : Number
Specifies the auto-hide time
Menu
 Inheritedblur : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedbottom : Number
sets the bottom value
ElementFactory
  buttonArray : Array
Menu
 InheritedchildList : ChildList
[read-only] store the child list
ContainerFactory
 Inheritedclass_ : String
Object's css class;
ElementFactory
 InheritedclassName : String
sets the class name of displayobject
ElementFactory
 InheritedcmlIndex : int
sets the cml index
ElementFactory
 InheriteddebugStyle : *
sets the debug style
ElementFactory
 InheriteddimensionsTo : String
sets the dimensions of the container
ContainerFactory
 InheriteddisplayEvents : String
Use for dispatch completes.
ElementFactory
 InheriteddropShadow : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedheight : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedheightPercent : String
sets the height percent of display object
ElementFactory
 InheritedhorizontalCenter : Number
sets the horizontal center of display object
ElementFactory
 Inheritedid : String
sets the id of child
ElementFactory
 Inheritedindex : int
sets the index of display object
ElementFactory
 InheritedinfoSource : String
sets info source
ContainerFactory
 Inheritedlayout : *
Sets the layout of the container
Container
 InheritedlayoutComplete : Function
Sets the function to call when the layout is complete
Container
 InheritedlayoutList : Dictionary
Defines the layoutlist
Container
 InheritedlayoutUpdate : Function
Sets the function to call when the layout updates
Container
 Inheritedleft : Number
sets left value
ElementFactory
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
Container
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
Container
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
Container
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
Container
  position : String
[override] Specifies the position alogorithm of the menu.
Menu
 InheritedpropertyStates : Array
Deprecated: Please Use state
ElementFactory
 Inheritedright : Number
sets the right value
ElementFactory
 Inheritedscale : Number
Sets both the x and y scale values
ElementFactory
 InheritedscaleX : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedscaleY : Number
[override] Sets width of the display object in pixels
ElementFactory
  slider : Slider
Menu
 Inheritedstate : Array
property states array
ElementFactory
 Inheritedtop : Number
sets top value
ElementFactory
 InheritedverticalCenter : Number
sets the vertical center of display object
ElementFactory
 Inheritedwidth : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedwidthPercent : String
sets the percent of width of display object
ElementFactory
Public Methods
 MethodDefined By
  
Constructor
Menu
 Inherited
This method searches the childlist and add the children
ContainerFactory
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list TODO: This mechanism should be abstracted to better syncrhonize child and display lists
Container
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
Container
 Inherited
childToList(id:String, child:*):void
this method append to the childlist
ContainerFactory
  
clone():*
[override] Returns clone of self
Menu
  
[override] CML Initialisation call back
Menu
  
dispose():void
[override] Dispose method
Menu
 Inherited
getIndex(index:int):*
returns childlist index
Container
 Inherited
getKey(key:String):*
returns the childlist key
Container
 Inherited
hideIndex(index:int):void
hides the childlist index
Container
 Inherited
hideKey(key:String):void
hides the childlist key
Container
  
init():void
[override] Initialisation method
Menu
 Inherited
parseCML(cml:XMLList):XMLList
[override] Parse cml for local layouts.
Container
 Inherited
postparseCML(cml:XMLList):void
post parses the cml file
ElementFactory
  
reset():void
Menu
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
Container
 Inherited
This method sets the dimensions of childlist
ContainerFactory
 Inherited
showIndex(index:int):void
shows the childlist index
Container
 Inherited
showKey(key:String):void
shows the childlist key
Container
  
startTimer():void
if autohide on, adds the listener
Menu
  
updateLayout(containerWidth:Number, containerHeight:Number):void
sets the layout depending on the position
Menu
 Inherited
updateProperties(state:Number = 0):void
this method updates the properties
ElementFactory
Property Detail
autoHideproperty
autoHide:Boolean

Specifies whether the menu automatically hides when not in use


Implementation
    public function get autoHide():Boolean
    public function set autoHide(value:Boolean):void
autoHideTimeproperty 
autoHideTime:Number

Specifies the auto-hide time


Implementation
    public function get autoHideTime():Number
    public function set autoHideTime(value:Number):void
buttonArrayproperty 
public var buttonArray:Array

positionproperty 
position:String[override]

Specifies the position alogorithm of the menu. This includes the position of the buttons with in the menu. The button must be a child of the menu.

The default value is bottom.


Implementation
    public function get position():String
    public function set position(value:String):void
sliderproperty 
public var slider:Slider

Constructor Detail
Menu()Constructor
public function Menu()

Constructor

Method Detail
clone()method
override public function clone():*

Returns clone of self

Returns
*
displayComplete()method 
override public function displayComplete():void

CML Initialisation call back

dispose()method 
override public function dispose():void

Dispose method

init()method 
override public function init():void

Initialisation method

reset()method 
public function reset():void

startTimer()method 
public function startTimer():void

if autohide on, adds the listener

updateLayout()method 
public function updateLayout(containerWidth:Number, containerHeight:Number):void

sets the layout depending on the position

Parameters

containerWidth:Number
 
containerHeight:Number