Packagecom.gestureworks.cml.elements
Classpublic class Drawer
InheritanceDrawer Inheritance Container Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite
Subclasses Dock

The Drawer is a container that animates down to conceal its contents (closed state) and animates up to reveal its contents (open state). The open and closed states are toggled by tapping the top of the drawer (handle).



Public Properties
 PropertyDefined By
  applyMask : Boolean
Flag indicating the application of a mask to the drawer to prevent content from exceeding the drawer's boundaries
Drawer
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
  background : *
The DisplayObject representing the drawer's content area
Drawer
  bkgColor : uint
The color of the drawer's content area
Drawer
 InheritedchildList : ChildList
Returns the object's childList.
TouchContainer
 InheritedclassName : String
sets the class name of displayobject
TouchContainer
 InheritedcloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedcmlIndex : int
Returns the index created by the CML parser.
TouchContainer
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
  dragAngle : Number
Determines the drag direction.
Drawer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
 Inheritedgroup : String
TouchContainer
  handle : *
The top mounted TouchContainer used to close/open the drawer when tapped.
Drawer
  handleAlpha : Number
The alpha of the drawer's handle
Drawer
  handleColor : uint
The color of the drawer's handle
Drawer
  handleGestureList : Object
Modifies the handle's gesture list to disable default (tap, flick, drag) gestures.
Drawer
  handleHeight : Number
The height of the drawer's handle
Drawer
  handleLineColor : uint
The color the handle's border
Drawer
  handleLineStroke : Number
The width of the handle's border in pixels
Drawer
  handleOrientation : String
The side of the container (top, bottom, right, left) to position the handle.
Drawer
  handleWidth : Number
The width of the drawer's handle
Drawer
  height : Number
[override] Sets the height of the drawer and drawer's UI components
Drawer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
 Inheritedid : String
Returns the object's id.
TouchContainer
  initializeOpen : Boolean
Flag indicating whether the initial state of the drawer is open or closed
Drawer
  isOpen : Boolean
[read-only]
Drawer
  label : *
The Text component that displays the drawer's title
Drawer
  labelColor : uint
The color of the handle's label
Drawer
  labelFont : String
The font of the handle's label
Drawer
  labelFontSize : Number
The font size of the handle's label
Drawer
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
  leftCornerRadius : Number
The radius of the upper left corner of the handle
Drawer
  leftHandle : *
The left mounted TouchContainer used to close the drawer when tapped.
Drawer
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainer
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
TouchContainer
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
TouchContainer
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
TouchContainer
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
TouchContainer
 Inheritedposition : *
Sets the position
TouchContainer
 InheritedrelativeX : Boolean
When set true this containers children's x position will be laid out relatively to each other.
TouchContainer
 InheritedrelativeY : Boolean
When set true this containers children's y position will be laid out relatively to each other.
TouchContainer
  rightCornerRadius : Number
The radius of the upper right corner of the handle
Drawer
  rightHandle : *
The right mounted TouchContainer used to close the drawer when tapped.
Drawer
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
  title : String
The text of the handle's label
Drawer
 InheritedtoBitmap : Boolean
TouchContainer
  update : Boolean
[write-only] Updates Drawer when set to true
Drawer
  useLeftHandle : Boolean
A flag indicating the hiding of the top mounted handle when the drawer is in the open state and transferring the close operation to the left handle.
Drawer
  useRightHandle : Boolean
A flag indicating the hiding of the top mounted handle when the drawer is in the open state and transferring the close operation to the right handle.
Drawer
  useSideHandles : Boolean
A flag indicating the hiding of the top mounted handle when the drawer is in the open state and transferring the close operation to the side handles.
Drawer
  verticalHandle : Boolean
[read-only] Flag indicating handle orientation is either left or right
Drawer
  width : Number
[override] Sets the width of the drawer and drawer's UI components
Drawer
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainer
Public Methods
 MethodDefined By
  
Constructor
Drawer
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
  
addChild(child:DisplayObject):DisplayObject
[override] Reroutes non-UI child additions to the drawer's content holder
Drawer
  
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Reroutes non-UI child additions to the drawer's content holder
Drawer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
 Inherited
clone():*
Clone method
TouchContainer
  
close(e:GWGestureEvent = null):void
Plays the down tween, registers the open listener, and removes the close listener
Drawer
  
dispose():void
[override] Destructor
Drawer
 Inherited
getElementById(id:String):*
Searches CML childList by id.
TouchContainer
 Inherited
getElementsByClassName(className:String):Array
Searches the CML childList by className.
TouchContainer
 Inherited
getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class.
TouchContainer
  
init():void
[override] Initialization function
Drawer
 Inherited
loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number.
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
Creates gestureList object from XML
TouchContainer
  
open(e:GWGestureEvent = null):void
Plays the up tween, registers the close listener, and removes the open listener
Drawer
 Inherited
parseCML(cml:XMLList):XMLList
Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
TouchContainer
 Inherited
querySelector(selector:String):*
Searches the CML childList by selector.
TouchContainer
 Inherited
querySelectorAll(selector:*):Array
Search the CML childList by selector.
TouchContainer
 Inherited
removeChild(child:DisplayObject):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildAt(index:int):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
[override] Removes children from display list and, if not already removed, the child list
TouchContainer
 Inherited
saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number.
TouchContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainer
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
 Inherited
Updates child padding within this container
TouchContainer
 Inherited
Updates child percent dimensions within this container
TouchContainer
 Inherited
updateProperties(state:* = 0):void
Updates properties from state.
TouchContainer
 Inherited
Updates child relative positions within this container
TouchContainer
Property Detail
applyMaskproperty
applyMask:Boolean

Flag indicating the application of a mask to the drawer to prevent content from exceeding the drawer's boundaries

The default value is true.


Implementation
    public function get applyMask():Boolean
    public function set applyMask(value:Boolean):void
backgroundproperty 
background:*

The DisplayObject representing the drawer's content area


Implementation
    public function get background():*
    public function set background(value:any):void
bkgColorproperty 
bkgColor:uint

The color of the drawer's content area

The default value is 0x424141.


Implementation
    public function get bkgColor():uint
    public function set bkgColor(value:uint):void
dragAngleproperty 
dragAngle:Number

Determines the drag direction. Must be adjusted for rotation and nested rotations.

The default value is 0.


Implementation
    public function get dragAngle():Number
    public function set dragAngle(value:Number):void
handleproperty 
handle:*

The top mounted TouchContainer used to close/open the drawer when tapped. The handle must contain a DisplayObject to target.


Implementation
    public function get handle():*
    public function set handle(value:any):void
handleAlphaproperty 
handleAlpha:Number

The alpha of the drawer's handle

The default value is 1.0.


Implementation
    public function get handleAlpha():Number
    public function set handleAlpha(value:Number):void
handleColorproperty 
handleColor:uint

The color of the drawer's handle

The default value is 0x2E2D2D.


Implementation
    public function get handleColor():uint
    public function set handleColor(value:uint):void
handleGestureListproperty 
handleGestureList:Object

Modifies the handle's gesture list to disable default (tap, flick, drag) gestures. Through AS3, pass the list as an Object (e.g. {n-tap:true, n-drag:true}) and through CML, pass the list as comma delimited string (e.g. "n-tap:true, n-drag:true").


Implementation
    public function get handleGestureList():Object
    public function set handleGestureList(value:Object):void
handleHeightproperty 
handleHeight:Number

The height of the drawer's handle

The default value is 60.


Implementation
    public function get handleHeight():Number
    public function set handleHeight(value:Number):void
handleLineColorproperty 
handleLineColor:uint

The color the handle's border


Implementation
    public function get handleLineColor():uint
    public function set handleLineColor(value:uint):void
handleLineStrokeproperty 
handleLineStroke:Number

The width of the handle's border in pixels


Implementation
    public function get handleLineStroke():Number
    public function set handleLineStroke(value:Number):void
handleOrientationproperty 
handleOrientation:String

The side of the container (top, bottom, right, left) to position the handle. This setting also determines the direction the Drawer opens and closes.

The default value is top.


Implementation
    public function get handleOrientation():String
    public function set handleOrientation(value:String):void
handleWidthproperty 
handleWidth:Number

The width of the drawer's handle

The default value is 500.


Implementation
    public function get handleWidth():Number
    public function set handleWidth(value:Number):void
heightproperty 
height:Number[override]

Sets the height of the drawer and drawer's UI components

The default value is 420.


Implementation
    public function get height():Number
    public function set height(value:Number):void
initializeOpenproperty 
initializeOpen:Boolean

Flag indicating whether the initial state of the drawer is open or closed

The default value is false.


Implementation
    public function get initializeOpen():Boolean
    public function set initializeOpen(value:Boolean):void
isOpenproperty 
isOpen:Boolean  [read-only]


Implementation
    public function get isOpen():Boolean
labelproperty 
label:*

The Text component that displays the drawer's title


Implementation
    public function get label():*
    public function set label(value:any):void
labelColorproperty 
labelColor:uint

The color of the handle's label

The default value is 0xFFFFFF.


Implementation
    public function get labelColor():uint
    public function set labelColor(value:uint):void
labelFontproperty 
labelFont:String

The font of the handle's label

The default value is OpenSansRegular.


Implementation
    public function get labelFont():String
    public function set labelFont(value:String):void
labelFontSizeproperty 
labelFontSize:Number

The font size of the handle's label

The default value is 30.


Implementation
    public function get labelFontSize():Number
    public function set labelFontSize(value:Number):void
leftCornerRadiusproperty 
leftCornerRadius:Number

The radius of the upper left corner of the handle

The default value is 15.


Implementation
    public function get leftCornerRadius():Number
    public function set leftCornerRadius(value:Number):void
leftHandleproperty 
leftHandle:*

The left mounted TouchContainer used to close the drawer when tapped. The handle must contain a DisplayObject to target.


Implementation
    public function get leftHandle():*
    public function set leftHandle(value:any):void
rightCornerRadiusproperty 
rightCornerRadius:Number

The radius of the upper right corner of the handle

The default value is 15.


Implementation
    public function get rightCornerRadius():Number
    public function set rightCornerRadius(value:Number):void
rightHandleproperty 
rightHandle:*

The right mounted TouchContainer used to close the drawer when tapped. The handle must contain a DisplayObject to target.


Implementation
    public function get rightHandle():*
    public function set rightHandle(value:any):void
titleproperty 
title:String

The text of the handle's label


Implementation
    public function get title():String
    public function set title(value:String):void
updateproperty 
update:Boolean  [write-only]

Updates Drawer when set to true


Implementation
    public function set update(value:Boolean):void
useLeftHandleproperty 
useLeftHandle:Boolean

A flag indicating the hiding of the top mounted handle when the drawer is in the open state and transferring the close operation to the left handle.


Implementation
    public function get useLeftHandle():Boolean
    public function set useLeftHandle(value:Boolean):void
useRightHandleproperty 
useRightHandle:Boolean

A flag indicating the hiding of the top mounted handle when the drawer is in the open state and transferring the close operation to the right handle.


Implementation
    public function get useRightHandle():Boolean
    public function set useRightHandle(value:Boolean):void
useSideHandlesproperty 
useSideHandles:Boolean

A flag indicating the hiding of the top mounted handle when the drawer is in the open state and transferring the close operation to the side handles.


Implementation
    public function get useSideHandles():Boolean
    public function set useSideHandles(value:Boolean):void
verticalHandleproperty 
verticalHandle:Boolean  [read-only]

Flag indicating handle orientation is either left or right


Implementation
    public function get verticalHandle():Boolean
widthproperty 
width:Number[override]

Sets the width of the drawer and drawer's UI components

The default value is 500.


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
Drawer()Constructor
public function Drawer()

Constructor

Method Detail
addChild()method
override public function addChild(child:DisplayObject):DisplayObject

Reroutes non-UI child additions to the drawer's content holder

Parameters

child:DisplayObject — the child to add to the content holder

Returns
DisplayObject — the child added to the content holder
addChildAt()method 
override public function addChildAt(child:DisplayObject, index:int):DisplayObject

Reroutes non-UI child additions to the drawer's content holder

Parameters

child:DisplayObject — the child to add to the content holder
 
index:int

Returns
DisplayObject — the child added to the content holder
close()method 
public function close(e:GWGestureEvent = null):void

Plays the down tween, registers the open listener, and removes the close listener

Parameters

e:GWGestureEvent (default = null) — the tap event

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

Destructor

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

Initialization function

open()method 
public function open(e:GWGestureEvent = null):void

Plays the up tween, registers the close listener, and removes the open listener

Parameters

e:GWGestureEvent (default = null) — the tap event