Packagecom.gestureworks.cml.elements
Classpublic class ScrollPane
InheritanceScrollPane Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite

The ScrollPane creates a masked viewing area of a display object and dynamically updates two scrollbars as that content is optionally dragged or scaled inside the viewing area. The ScrollPane optionally allows content inside the area to be dragged (and/or scaled), and allows the option to explore the content by dragging or touching the scroll bars.



Public Properties
 PropertyDefined By
  autohide : Boolean
Sets whether to auto-hides scroll bars.
ScrollPane
  autohideSpeed : Number
Sets the auto-hide tween speed.
ScrollPane
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
 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
  content : *
[read-only] Returns content of pane.
ScrollPane
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
  enableScroll : Boolean
[write-only] Drag event registration
ScrollPane
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] sets the height of the container
TouchContainer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
  _horizontal : Boolean = false
ScrollPane
  _horizontalMovement : Number
ScrollPane
  _horizontalScroll : ScrollBar
ScrollPane
  _horizStyleSet : Boolean = false
ScrollPane
 Inheritedid : String
Returns the object's id.
TouchContainer
  invertDrag : Boolean
Sets whether to invert drag.
ScrollPane
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
  _mask : Graphic
ScrollPane
 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
  paneStroke : Number
Sets the thickness of a border stroke around the pane.
ScrollPane
  paneStrokeColor : uint
Sets the color of the pane stroke.
ScrollPane
  paneStrokeMargin : Number
Set a margin if the border should be slightly separate from the content.
ScrollPane
 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
  scrollMargin : Number
Set the margin between the scroll bars and the content.
ScrollPane
  scrollThickness : Number
The only styling that can be set for the scroll bars in the scrollPane is their thickness.
ScrollPane
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
 InheritedtoBitmap : Boolean
TouchContainer
  _vertical : Boolean = false
ScrollPane
  _verticalMovement : Number
ScrollPane
  _verticalScroll : ScrollBar
ScrollPane
  _vertStyleSet : Boolean = false
ScrollPane
 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
Public Methods
 MethodDefined By
  
Constructor
ScrollPane
 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
  
clone():*
[override] Clone method
ScrollPane
  
Creates scroll pane events
ScrollPane
  
dispose():void
[override] Destructor
ScrollPane
 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] Initialisation method
ScrollPane
 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
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
  
Removes scroll pane events
ScrollPane
  
reset():void
Resets scroll positions.
ScrollPane
 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
  
updateContent(value:DisplayObject):void
Updates / replaces content with given value.
ScrollPane
  
updateLayout(inWidth:Number, inHeight:Number):void
Updates scroll pane layout
ScrollPane
 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
  
onScale(e:GWGestureEvent):void
ScrollPane
Property Detail
_horizontalproperty
public var _horizontal:Boolean = false

_horizontalMovementproperty 
public var _horizontalMovement:Number

_horizontalScrollproperty 
public var _horizontalScroll:ScrollBar

_horizStyleSetproperty 
public var _horizStyleSet:Boolean = false

_maskproperty 
public var _mask:Graphic

_verticalproperty 
public var _vertical:Boolean = false

_verticalMovementproperty 
public var _verticalMovement:Number

_verticalScrollproperty 
public var _verticalScroll:ScrollBar

_vertStyleSetproperty 
public var _vertStyleSet:Boolean = false

autohideproperty 
autohide:Boolean

Sets whether to auto-hides scroll bars.

The default value is false.


Implementation
    public function get autohide():Boolean
    public function set autohide(value:Boolean):void
autohideSpeedproperty 
autohideSpeed:Number

Sets the auto-hide tween speed.

The default value is .5.


Implementation
    public function get autohideSpeed():Number
    public function set autohideSpeed(value:Number):void
contentproperty 
content:*  [read-only]

Returns content of pane.


Implementation
    public function get content():*
enableScrollproperty 
enableScroll:Boolean  [write-only]

Drag event registration


Implementation
    public function set enableScroll(value:Boolean):void
invertDragproperty 
invertDrag:Boolean

Sets whether to invert drag.

The default value is false.


Implementation
    public function get invertDrag():Boolean
    public function set invertDrag(value:Boolean):void
paneStrokeproperty 
paneStroke:Number

Sets the thickness of a border stroke around the pane.

The default value is 1.


Implementation
    public function get paneStroke():Number
    public function set paneStroke(value:Number):void
paneStrokeColorproperty 
paneStrokeColor:uint

Sets the color of the pane stroke.

The default value is 0x777777.


Implementation
    public function get paneStrokeColor():uint
    public function set paneStrokeColor(value:uint):void
paneStrokeMarginproperty 
paneStrokeMargin:Number

Set a margin if the border should be slightly separate from the content.

The default value is 0.


Implementation
    public function get paneStrokeMargin():Number
    public function set paneStrokeMargin(value:Number):void
scrollMarginproperty 
scrollMargin:Number

Set the margin between the scroll bars and the content.

The default value is 5.


Implementation
    public function get scrollMargin():Number
    public function set scrollMargin(value:Number):void
scrollThicknessproperty 
scrollThickness:Number

The only styling that can be set for the scroll bars in the scrollPane is their thickness. For all other custom styling, a ScrollBar item should be added in CML, or through the childToList function in AS3, and the ScrollPane class will automatically pull styles from that.

The default value is 30.


Implementation
    public function get scrollThickness():Number
    public function set scrollThickness(value:Number):void
Constructor Detail
ScrollPane()Constructor
public function ScrollPane()

Constructor

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

Clone method

Returns
*
createEvents()method 
public function createEvents():void

Creates scroll pane events

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

Destructor

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

Initialisation method

onScale()method 
protected function onScale(e:GWGestureEvent):void

Parameters

e:GWGestureEvent

removeEvents()method 
public function removeEvents():void

Removes scroll pane events

reset()method 
public function reset():void

Resets scroll positions.

updateContent()method 
public function updateContent(value:DisplayObject):void

Updates / replaces content with given value. If you are only changing the dimensions of the content, such as a string change on a text field, the method updateLayout will be faster.

Parameters

value:DisplayObject

updateLayout()method 
public function updateLayout(inWidth:Number, inHeight:Number):void

Updates scroll pane layout

Parameters

inWidth:Number (default = NaN)
 
inHeight:Number (default = NaN)