Packagecom.gestureworks.cml.components
Classpublic class CollectionViewer
InheritanceCollectionViewer Inheritance Component Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite

The CollectionViewer component manages the display of components and elements.

It can load more objects than will display at any one time. The objects not displayed are put into queue and the CollectionViwer cycles through the queue whenever a user closes an object or moves it offscreen.

     

            
     

See also

Component


Public Properties
 PropertyDefined By
 Inheritedactivity : Boolean
Current state of interaction
Component
  amountToShow : int = -1
CollectionViewer
  animateIn : Boolean = false
CollectionViewer
 InheritedautoAlign : String
Set the autoAlign for the auto text layout feature if desired.
Component
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
 InheritedautoTextLayout : Boolean
Specifies whether text fields will be automatically adjusted to the component's width
Component
 Inheritedback : *
Sets the back element.
Component
 Inheritedbackground : *
Sets the back background element.
Component
 Inheritedbacks : Array
Component
  bottomContainer : *
Sets bottom container for double sided database version.
CollectionViewer
 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
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
 InheritedfadeoutDuration : Number
Set the fadeout time for an object that's timed out.
Component
 InheritedfontArray : Array
Component
 InheritedfontIncrement : Number
font increment
Component
 Inheritedframe : *
Sets the frame element.
Component
 Inheritedfront : *
Sets the front element.
Component
 Inheritedfronts : Array
Component
  gateway : String
Sets database gateway url
CollectionViewer
 InheritedglowColor : uint = 0xFFFFFF
Component
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] sets the height of the container
TouchContainer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
 InheritedhideFrontOnFlip : *
Specifies whether the front is hidden when the the back is shown
Component
 Inheritedid : String
Returns the object's id.
TouchContainer
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
 Inheritedmenu : *
Sets the menu element.
Component
 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
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
 InheritedtextFields : Array
Component
 Inheritedtimeout : Number
Set the timeout value for when the elements were automatically close.
Component
 InheritedtoBitmap : Boolean
TouchContainer
  topContainer : *
Sets top container for double sided database version.
CollectionViewer
 Inheritedvisible : Boolean
[override] [write-only] Manages the timer and dispatches a state event
Component
 Inheritedwidth : Number
[override] sets the width of the container
TouchContainer
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainer
  queue : List
CollectionViewer
  shown : List
CollectionViewer
 Inheritedside : String
[read-only] Specifies the currently displayed side
Component
Public Methods
 MethodDefined By
  
Constructor
CollectionViewer
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
 Inherited
clone():*
[override] Returns clone of self
Component
  
dispose():void
[override] Destructor
CollectionViewer
 Inherited
fadeIn(dur:Number = 250):void
Component
 Inherited
fadeOut(dur:Number = 250):void
Component
 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
 Inherited
glowIn(dur:Number = 1):void
Component
 Inherited
glowOut(dur:Number = 1):void
Component
 Inherited
glowPulse():void
Component
  
init():void
[override] Initialisation method
CollectionViewer
 Inherited
invertMatrix(displayObject:DisplayObject, newParent:DisplayObjectContainer):void
Component
 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
 Inherited
noActivity(e:GWGestureEvent):void
Component
 Inherited
onDown(event:* = null):void
handles touch event
Component
 Inherited
onUp(event:* = null):void
handles event
Component
 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
reset():void
Component
 Inherited
Component
 Inherited
Component
 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
  
tagObject(top:Boolean, obj:*):void
Classifies the object as either a top-container object or a bottom-container object.
CollectionViewer
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
  
untagObject(obj:*):void
Disassociates the provided object from the top or bottom containers.
CollectionViewer
 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
Protected Methods
 MethodDefined By
  
addComponent(c:DisplayObject):void
Adds component.
CollectionViewer
  
Adds next component from queue.
CollectionViewer
  
Checks to see if the correct number of componets are currently shown.
CollectionViewer
  
onEnterFrame(e:Event):void
Enter frame event handler
CollectionViewer
  
onGestureComplete(event:GWGestureEvent = null):void
CollectionViewer
  
[override]
CollectionViewer
 Inherited
onTimer(e:TimerEvent):void
Component
  
removeComponent(c:DisplayObject):void
Removes component.
CollectionViewer
  
updateLayout(event:* = null):void
[override]
CollectionViewer
Property Detail
amountToShowproperty
public var amountToShow:int = -1

animateInproperty 
public var animateIn:Boolean = false

bottomContainerproperty 
bottomContainer:*

Sets bottom container for double sided database version.


Implementation
    public function get bottomContainer():*
    public function set bottomContainer(value:any):void
gatewayproperty 
gateway:String

Sets database gateway url


Implementation
    public function get gateway():String
    public function set gateway(value:String):void
queueproperty 
protected var queue:List

shownproperty 
protected var shown:List

topContainerproperty 
topContainer:*

Sets top container for double sided database version.


Implementation
    public function get topContainer():*
    public function set topContainer(value:any):void
Constructor Detail
CollectionViewer()Constructor
public function CollectionViewer()

Constructor

Method Detail
addComponent()method
protected function addComponent(c:DisplayObject):void

Adds component.

Parameters

c:DisplayObject

addNextComponent()method 
protected function addNextComponent():void

Adds next component from queue.

checkComponents()method 
protected function checkComponents():void

Checks to see if the correct number of componets are currently shown.

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

Destructor

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

Initialisation method

onEnterFrame()method 
protected function onEnterFrame(e:Event):void

Enter frame event handler

Parameters

e:Event

onGestureComplete()method 
protected function onGestureComplete(event:GWGestureEvent = null):void

Parameters

event:GWGestureEvent (default = null)

onStateEvent()method 
override protected function onStateEvent(event:StateEvent):void

Parameters

event:StateEvent

removeComponent()method 
protected function removeComponent(c:DisplayObject):void

Removes component.

Parameters

c:DisplayObject

tagObject()method 
public function tagObject(top:Boolean, obj:*):void

Classifies the object as either a top-container object or a bottom-container object.

Parameters

top:Boolean — container tag
 
obj:* — the object to tag

untagObject()method 
public function untagObject(obj:*):void

Disassociates the provided object from the top or bottom containers.

Parameters

obj:*

updateLayout()method 
override protected function updateLayout(event:* = null):void

Parameters

event:* (default = null)