Package | com.gestureworks.cml.elements |
Class | public class Drawer |
Inheritance | Drawer ![]() ![]() ![]() |
Subclasses | Dock |
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).
Property | Defined By | ||
---|---|---|---|
applyMask : Boolean
Flag indicating the application of a mask to the drawer to prevent
content from exceeding the drawer's boundaries
| Drawer | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
background : *
The DisplayObject representing the drawer's content area
| Drawer | ||
bkgColor : uint
The color of the drawer's content area
| Drawer | ||
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
dragAngle : Number
Determines the drag direction. | Drawer | ||
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
![]() | group : 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 | ||
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : 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 | ||
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : 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 | ||
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
![]() | position : *
Sets the position
| TouchContainer | |
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : 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 | ||
![]() | sound : String | TouchContainer | |
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
title : String
The text of the handle's label
| Drawer | ||
![]() | toBitmap : 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 | ||
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
Drawer()
Constructor
| Drawer | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
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 | ||
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | 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 | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
init():void [override]
Initialization function
| Drawer | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | 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 | ||
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
applyMask | property |
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
.
public function get applyMask():Boolean
public function set applyMask(value:Boolean):void
background | property |
background:*
The DisplayObject
representing the drawer's content area
public function get background():*
public function set background(value:any):void
bkgColor | property |
bkgColor:uint
The color of the drawer's content area
The default value is 0x424141
.
public function get bkgColor():uint
public function set bkgColor(value:uint):void
dragAngle | property |
dragAngle:Number
Determines the drag direction. Must be adjusted for rotation and nested rotations.
The default value is 0
.
public function get dragAngle():Number
public function set dragAngle(value:Number):void
handle | property |
handle:*
The top mounted TouchContainer
used to close/open the drawer when tapped. The handle must contain a DisplayObject
to target.
public function get handle():*
public function set handle(value:any):void
handleAlpha | property |
handleAlpha:Number
The alpha of the drawer's handle
The default value is 1.0
.
public function get handleAlpha():Number
public function set handleAlpha(value:Number):void
handleColor | property |
handleColor:uint
The color of the drawer's handle
The default value is 0x2E2D2D
.
public function get handleColor():uint
public function set handleColor(value:uint):void
handleGestureList | property |
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").
public function get handleGestureList():Object
public function set handleGestureList(value:Object):void
handleHeight | property |
handleHeight:Number
The height of the drawer's handle
The default value is 60
.
public function get handleHeight():Number
public function set handleHeight(value:Number):void
handleLineColor | property |
handleLineColor:uint
The color the handle's border
public function get handleLineColor():uint
public function set handleLineColor(value:uint):void
handleLineStroke | property |
handleLineStroke:Number
The width of the handle's border in pixels
public function get handleLineStroke():Number
public function set handleLineStroke(value:Number):void
handleOrientation | property |
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
.
public function get handleOrientation():String
public function set handleOrientation(value:String):void
handleWidth | property |
handleWidth:Number
The width of the drawer's handle
The default value is 500
.
public function get handleWidth():Number
public function set handleWidth(value:Number):void
height | property |
height:Number
[override] Sets the height of the drawer and drawer's UI components
The default value is 420
.
public function get height():Number
public function set height(value:Number):void
initializeOpen | property |
initializeOpen:Boolean
Flag indicating whether the initial state of the drawer is open or closed
The default value is false
.
public function get initializeOpen():Boolean
public function set initializeOpen(value:Boolean):void
isOpen | property |
isOpen:Boolean
[read-only] public function get isOpen():Boolean
label | property |
label:*
The Text
component that displays the drawer's title
public function get label():*
public function set label(value:any):void
labelColor | property |
labelColor:uint
The color of the handle's label
The default value is 0xFFFFFF
.
public function get labelColor():uint
public function set labelColor(value:uint):void
labelFont | property |
labelFont:String
The font of the handle's label
The default value is OpenSansRegular
.
public function get labelFont():String
public function set labelFont(value:String):void
labelFontSize | property |
labelFontSize:Number
The font size of the handle's label
The default value is 30
.
public function get labelFontSize():Number
public function set labelFontSize(value:Number):void
leftCornerRadius | property |
leftCornerRadius:Number
The radius of the upper left corner of the handle
The default value is 15
.
public function get leftCornerRadius():Number
public function set leftCornerRadius(value:Number):void
leftHandle | property |
leftHandle:*
The left mounted TouchContainer
used to close the drawer when tapped. The handle must contain a DisplayObject
to target.
public function get leftHandle():*
public function set leftHandle(value:any):void
rightCornerRadius | property |
rightCornerRadius:Number
The radius of the upper right corner of the handle
The default value is 15
.
public function get rightCornerRadius():Number
public function set rightCornerRadius(value:Number):void
rightHandle | property |
rightHandle:*
The right mounted TouchContainer
used to close the drawer when tapped. The handle must contain a DisplayObject
to target.
public function get rightHandle():*
public function set rightHandle(value:any):void
title | property |
title:String
The text of the handle's label
public function get title():String
public function set title(value:String):void
update | property |
update:Boolean
[write-only] Updates Drawer when set to true
public function set update(value:Boolean):void
useLeftHandle | property |
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.
public function get useLeftHandle():Boolean
public function set useLeftHandle(value:Boolean):void
useRightHandle | property |
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.
public function get useRightHandle():Boolean
public function set useRightHandle(value:Boolean):void
useSideHandles | property |
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.
public function get useSideHandles():Boolean
public function set useSideHandles(value:Boolean):void
verticalHandle | property |
verticalHandle:Boolean
[read-only] Flag indicating handle orientation is either left or right
public function get verticalHandle():Boolean
width | property |
width:Number
[override] Sets the width of the drawer and drawer's UI components
The default value is 500
.
public function get width():Number
public function set width(value:Number):void
Drawer | () | Constructor |
public function Drawer()
Constructor
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
|
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 |
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
|