Package com.bit101.components
Class public class ScrollBar
Inheritance ScrollBar InheritanceComponent Inheritance flash.display.Sprite
Subclasses HScrollBar, VScrollBar



Public Properties
  Property Defined By
  Inherited enabled : Boolean
Sets/gets whether this component is enabled or not.
Component
  Inherited height : Number
[override] Sets/gets the height of the component.
Component
    lineSize : int
Sets / gets the amount the value will change when up or down buttons are pressed.
ScrollBar
    maximum : Number
Sets / gets the maximum value of this scroll bar.
ScrollBar
    minimum : Number
Sets / gets the minimum value of this scroll bar.
ScrollBar
    pageSize : int
Sets / gets the amount the value will change when the back is clicked.
ScrollBar
  Inherited tag : int
Sets/gets in integer that can identify the component.
Component
    value : Number
Sets / gets the current value of this scroll bar.
ScrollBar
  Inherited width : Number
[override] Sets/gets the width of the component.
Component
  Inherited x : Number
[override] [write-only] Overrides the setter for x to always place the component on a whole pixel.
Component
  Inherited y : Number
[override] [write-only] Overrides the setter for y to always place the component on a whole pixel.
Component
Protected Properties
  Property Defined By
    _delayTimer : Timer
ScrollBar
    _direction : String
ScrollBar
    _downButton : PushButton
ScrollBar
  Inherited _enabled : Boolean = true
Component
  Inherited _height : Number = 0
Component
    _lineSize : int = 1
ScrollBar
    _orientation : String
ScrollBar
    _repeatTimer : Timer
ScrollBar
  Inherited Ronda : Class
Component
    _scrollSlider : ScrollSlider
ScrollBar
    _shouldRepeat : Boolean = false
ScrollBar
  Inherited _tag : int = -1
Component
    _upButton : PushButton
ScrollBar
  Inherited _width : Number = 0
Component
Public Methods
  Method Defined By
   
ScrollBar(orientation:String, parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, defaultHandler:Function = null)
Constructor
ScrollBar
   
draw():void
[override] Draws the visual ui of the component.
ScrollBar
  Inherited
initStage(stage:Stage):void
[static] Utility method to set up usual stage align and scaling.
Component
  Inherited
move(xpos:Number, ypos:Number):void
Moves the component to the specified position.
Component
  Inherited
setSize(w:Number, h:Number):void
Sets the size of the component.
Component
   
setSliderParams(min:Number, max:Number, value:Number):void
Convenience method to set the three main parameters in one shot.
ScrollBar
   
setThumbPercent(value:Number):void
Sets the percentage of the size of the thumb button.
ScrollBar
Protected Methods
  Method Defined By
   
addChildren():void
[override] Creates and adds the child display objects of this component.
ScrollBar
  Inherited
getShadow(dist:Number, knockout:Boolean = false):DropShadowFilter
DropShadowFilter factory method, used in many of the components.
Component
   
goDown():void
ScrollBar
   
goUp():void
ScrollBar
   
init():void
[override] Initializes the component.
ScrollBar
  Inherited
invalidate():void
Marks the component to be redrawn on the next frame.
Component
   
onChange(event:Event):void
ScrollBar
   
onDelayComplete(event:TimerEvent):void
ScrollBar
   
onDownClick(event:MouseEvent):void
ScrollBar
  Inherited
onInvalidate(event:Event):void
Called one frame after invalidate is called.
Component
   
onMouseUp(event:MouseEvent):void
ScrollBar
   
onRepeat(event:TimerEvent):void
ScrollBar
   
onUpClick(event:MouseEvent):void
ScrollBar
Public Constants
  Constant Defined By
  Inherited DRAW : String = draw
[static]
Component
Protected Constants
  Constant Defined By
    DELAY_TIME : int = 500
ScrollBar
    DOWN : String = down
ScrollBar
    REPEAT_TIME : int = 100
ScrollBar
    UP : String = up
ScrollBar
Property Detail
_delayTimer property
protected var _delayTimer:Timer

_direction property  
protected var _direction:String

_downButton property  
protected var _downButton:PushButton

_lineSize property  
protected var _lineSize:int = 1

_orientation property  
protected var _orientation:String

_repeatTimer property  
protected var _repeatTimer:Timer

_scrollSlider property  
protected var _scrollSlider:ScrollSlider

_shouldRepeat property  
protected var _shouldRepeat:Boolean = false

_upButton property  
protected var _upButton:PushButton

lineSize property  
lineSize:int

Sets / gets the amount the value will change when up or down buttons are pressed.


Implementation
    public function get lineSize():int
    public function set lineSize(value:int):void
maximum property  
maximum:Number

Sets / gets the maximum value of this scroll bar.


Implementation
    public function get maximum():Number
    public function set maximum(value:Number):void
minimum property  
minimum:Number

Sets / gets the minimum value of this scroll bar.


Implementation
    public function get minimum():Number
    public function set minimum(value:Number):void
pageSize property  
pageSize:int

Sets / gets the amount the value will change when the back is clicked.


Implementation
    public function get pageSize():int
    public function set pageSize(value:int):void
value property  
value:Number

Sets / gets the current value of this scroll bar.


Implementation
    public function get value():Number
    public function set value(value:Number):void
Constructor Detail
ScrollBar () Constructor
public function ScrollBar(orientation:String, parent:DisplayObjectContainer = null, xpos:Number = 0, ypos:Number = 0, defaultHandler:Function = null)

Constructor

Parameters
orientation:String — Whether this is a vertical or horizontal slider.
 
parent:DisplayObjectContainer (default = null) — The parent DisplayObjectContainer on which to add this Slider.
 
xpos:Number (default = 0) — The x position to place this component.
 
ypos:Number (default = 0) — The y position to place this component.
 
defaultHandler:Function (default = null) — The event handling function to handle the default event for this component (change in this case).
Method Detail
addChildren () method
override protected function addChildren():void

Creates and adds the child display objects of this component.

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

Draws the visual ui of the component.

goDown () method  
protected function goDown():void

goUp () method  
protected function goUp():void

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

Initializes the component.

onChange () method  
protected function onChange(event:Event):void

Parameters

event:Event
onDelayComplete () method  
protected function onDelayComplete(event:TimerEvent):void

Parameters

event:TimerEvent
onDownClick () method  
protected function onDownClick(event:MouseEvent):void

Parameters

event:MouseEvent
onMouseUp () method  
protected function onMouseUp(event:MouseEvent):void

Parameters

event:MouseEvent
onRepeat () method  
protected function onRepeat(event:TimerEvent):void

Parameters

event:TimerEvent
onUpClick () method  
protected function onUpClick(event:MouseEvent):void

Parameters

event:MouseEvent
setSliderParams () method  
public function setSliderParams(min:Number, max:Number, value:Number):void

Convenience method to set the three main parameters in one shot.

Parameters

min:Number — The minimum value of the slider.
 
max:Number — The maximum value of the slider.
 
value:Number — The value of the slider.
setThumbPercent () method  
public function setThumbPercent(value:Number):void

Sets the percentage of the size of the thumb button.

Parameters

value:Number
Constant Detail
DELAY_TIME Constant
protected const DELAY_TIME:int = 500

DOWN Constant  
protected const DOWN:String = down

REPEAT_TIME Constant  
protected const REPEAT_TIME:int = 100

UP Constant  
protected const UP:String = up