flexlib :: library Documentation | All Packages | All Classes | Index | Frames No Frames |
ButtonScrollingCanvas

Package | flexlib.containers
Class | public class ButtonScrollingCanvas
Inheritance | ButtonScrollingCanvas mx.containers.Canvas

Public Properties

| Property | Defined By
--- | --- | ---
|  | buttonWidth : Number | ButtonScrollingCanvas
|  | DEFAULT_BUTTON_WIDTH : Number = 50 [static] | ButtonScrollingCanvas
|  | explicitButtonHeight : Number [write-only] | ButtonScrollingCanvas
|  | horizontalScrollPosition : Number [override] | ButtonScrollingCanvas
|  | maxHorizontalScrollPosition : Number [override] [read-only] | ButtonScrollingCanvas
|  | maxVerticalScrollPosition : Number [override] [read-only] | ButtonScrollingCanvas
|  | scrollJump : Number = 10 | ButtonScrollingCanvas
|  | scrollSpeed : Number = 10 | ButtonScrollingCanvas
|  | startScrollingEvent : String | ButtonScrollingCanvas
|  | stopScrollingEvent : String | ButtonScrollingCanvas
|  | verticalScrollPosition : Number [override] | ButtonScrollingCanvas

Public Methods

| Method | Defined By
--- | --- | ---
|  | ButtonScrollingCanvas() | ButtonScrollingCanvas
|  | addChild(child:DisplayObject):DisplayObject [override] If we have already created the innerCanvas element, then we add the child to that. | ButtonScrollingCanvas
|  | addChildAt(child:DisplayObject, index:int):DisplayObject [override] | ButtonScrollingCanvas
|  | getChildAt(index:int):DisplayObject [override] | ButtonScrollingCanvas
|  | getChildByName(name:String):DisplayObject [override] | ButtonScrollingCanvas
|  | getChildIndex(child:DisplayObject):int [override] | ButtonScrollingCanvas
|  | getChildren():Array [override] | ButtonScrollingCanvas
|  | initialize():void [override] | ButtonScrollingCanvas

Protected Methods

| Method | Defined By
--- | --- | ---
|  | createChildren():void [override] | ButtonScrollingCanvas
|  | enableOrDisableButtons():void We check to see if the buttons should be shown. | ButtonScrollingCanvas
|  | updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void [override] | ButtonScrollingCanvas

Styles

| Style | Description | Defined By
--- | --- | --- | ---
|  | buttonWidth | Type: Number CSS Inheritance: no | ButtonScrollingCanvas
|  | downButtonStyleName | Type: String CSS Inheritance: no | ButtonScrollingCanvas
|  | leftButtonStyleName | Type: String CSS Inheritance: no | ButtonScrollingCanvas
|  | rightButtonStyleName | Type: String CSS Inheritance: no | ButtonScrollingCanvas
|  | upButtonStyleName | Type: String CSS Inheritance: no | ButtonScrollingCanvas

Property Detail

buttonWidth | property

`buttonWidth:Number`

Implementation
`public function get buttonWidth():Number`
`public function set buttonWidth(value:Number):void`

DEFAULT_BUTTON_WIDTH | property |

`public static var DEFAULT_BUTTON_WIDTH:Number = 50`

explicitButtonHeight | property |

`explicitButtonHeight:Number` [write-only]

Implementation
`public function set explicitButtonHeight(value:Number):void`

horizontalScrollPosition | property |

`horizontalScrollPosition:Number`[override]

Implementation
`public function get horizontalScrollPosition():Number`
`public function set horizontalScrollPosition(value:Number):void`

maxHorizontalScrollPosition | property |

`maxHorizontalScrollPosition:Number` [read-only] [override]

Implementation
`public function get maxHorizontalScrollPosition():Number`

maxVerticalScrollPosition | property |

`maxVerticalScrollPosition:Number` [read-only] [override]

Implementation
`public function get maxVerticalScrollPosition():Number`

scrollJump | property |

`public var scrollJump:Number = 10`

scrollSpeed | property |

`public var scrollSpeed:Number = 10`

startScrollingEvent | property |

`startScrollingEvent:String`

Implementation
`public function get startScrollingEvent():String`
`public function set startScrollingEvent(value:String):void`

stopScrollingEvent | property |

`stopScrollingEvent:String`

Implementation
`public function get stopScrollingEvent():String`
`public function set stopScrollingEvent(value:String):void`

verticalScrollPosition | property |

`verticalScrollPosition:Number`[override]

Implementation
`public function get verticalScrollPosition():Number`
`public function set verticalScrollPosition(value:Number):void`
Constructor Detail

ButtonScrollingCanvas | () | Constructor

`public function ButtonScrollingCanvas()`

Method Detail

addChild | () | method

`override public function addChild(child:DisplayObject):DisplayObject`

If we have already created the innerCanvas element, then we add the child to that. If not, that means we haven't called createChildren yet. So what we do is add the child to this main Canvas, and once we call createChildren we'll remove all the children and switch them over to innerCanvas.

Parameters

| `child:DisplayObject`

Returns

| `DisplayObject`

addChildAt | () | method |

`override public function addChildAt(child:DisplayObject, index:int):DisplayObject`

Parameters

| `child:DisplayObject`
| `index:int`

Returns

| `DisplayObject`

createChildren | () | method |

`override protected function createChildren():void`

enableOrDisableButtons | () | method |

`protected function enableOrDisableButtons():void`

We check to see if the buttons should be shown. If we can't scroll in one direction then we don't show that particular button.

getChildAt | () | method |

`override public function getChildAt(index:int):DisplayObject`

Parameters

| `index:int`

Returns

| `DisplayObject`

getChildByName | () | method |

`override public function getChildByName(name:String):DisplayObject`

Parameters

| `name:String`

Returns

| `DisplayObject`

getChildIndex | () | method |

`override public function getChildIndex(child:DisplayObject):int`

Parameters

| `child:DisplayObject`

Returns

| `int`

getChildren | () | method |

`override public function getChildren():Array`

Returns

| `Array`

initialize | () | method |

`override public function initialize():void`

updateDisplayList | () | method |

`override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void`

Parameters

| `unscaledWidth:Number`
| `unscaledHeight:Number`

Dimanche Juin 19 2011, 03:12 PM +02:00