Packageorg.openPyro.controls
Classpublic class ScrollBar
InheritanceScrollBar Inheritance UIContainer Inheritance UIControl Inheritance MeasurableControl Inheritance flash.display.Sprite



Public Properties
 PropertyDefined by
 InheritedbackgroundPainter : IPainter
UIControls can have a backgroundPainter object attached that is triggered everytime updateDisplayList is called.
UIControl
 InheritedclipContent : Boolean
UIContainer
 InheritedcontentHeight : Number
UIContainer
 InheritedcontentWidth : Number
UIContainer
 InheritedcreationCompleteFired : Boolean
MeasurableControl
  decrementButton : Button
ScrollBar
  decrementButtonSkin : ISkin
[write-only]
ScrollBar
  direction : String
[read-only]
ScrollBar
 InheriteddisplayListInvalidated : Boolean = true
Flag to mark a dirty displaylist.
MeasurableControl
 InheriteddragData : Object
UIControl
 InheriteddragEnabled : Boolean
UIControl
 InheriteddropEnabled : Boolean
UIControl
 InheritedexplicitlyAllocatedHeight : Number
This property are modified by IContainerMeasurementHelpers.
UIContainer
 InheritedexplicitlyAllocatedWidth : Number
This property are modified by IContainerMeasurementHelpers.
UIContainer
 InheritedexplicitWidth : Number
The height set in terms of actual pixels.
MeasurableControl
 InheritedforceInvalidateDisplayList : Boolean = false
MeasurableControl
 Inheritedheight : Number
Set/get the height of the control.
MeasurableControl
 InheritedhorizontalScrollBar : ScrollBar
Returns The instance of the created horizontal or null if it was never created or is not visible.
UIContainer
 InheritedhorizontalScrollIncrement : Number
UIContainer
 InheritedhorizontalScrollPolicy : Boolean
UIContainer
 InheritedhorizontalScrollPosition : Number
UIContainer
 InheritedincludeInLayout : Boolean
Specifies whether this control participates in the layout system in OpenPyro.
MeasurableControl
  incrementalScrollDelta : Number = 25
The height/width the scrollbar must scroll when one of the scroll buttons is clicked on.
ScrollBar
  incrementButton : Button
ScrollBar
  incrementButtonSkin : ISkin
[write-only]
ScrollBar
 Inheritedinitialized : Boolean = false
Property indicates whether a control has been initialized or not.
MeasurableControl
 Inheritedlayout : ILayout
Containers can be assigned different layouts which control the positioning of the different controls.
UIContainer
 InheritedlayoutChildren : Array
Returns an Array of displayObjects whose positions are controlled by the ILayout object.
UIContainer
  maximum : Number
ScrollBar
 InheritedmaximumHeight : Number
MeasurableControl
 InheritedmaximumWidth : Number
MeasurableControl
 InheritedmeasuredHeight : Number
Overrides the set measuredHeight property from MeasurableControl to invalidate children (UIControl acknowledges that it can have children whose dimensions are based on its own)
UIControl
 InheritedmeasuredWidth : Number
Overrides the set measuredWidth property from MeasurableControl to invalidate children (UIControl acknowledges that it can have children whose dimensions are based on its own)
UIControl
  minimum : Number
ScrollBar
 InheritedmouseActionsDisabled : Boolean
MeasurableControl
 InheritedmouseOverDisabled : Boolean = false
[static]
UIContainer
 InheritedneedsMeasurement : Boolean = true
Only setting percent width/heights changes the needsMeasurement flag which makes its parent container call measure on it.
MeasurableControl
 Inheritedpadding : Padding
Paddings define the unusable space within UIContainers that should not be used for measurement and layout.
UIControl
 InheritedparentContainer : UIControl
MeasurableControl
 InheritedpercentHeight : Number
MeasurableControl
 InheritedpercentUnusedHeight : Number
Set/get the percent height.
MeasurableControl
 InheritedpercentUnusedWidth : Number
Set/get the percent width.
MeasurableControl
 InheritedpercentWidth : Number
MeasurableControl
 InheritedscrollHeight : Number
scrollHeight is the max height a vertical scrollbar needs to scroll
UIContainer
 InheritedscrollWidth : Number
scrollWidth is the max width a horizontal scrollbar needs to scroll
UIContainer
 InheritedsizeInvalidated : Boolean = false
The flag to mark that the control's size has been invalidated.
MeasurableControl
  skin : ISkin
[write-only]
ScrollBar
 InheritedskinnedControl : UIControl
UIControl
  slider : Slider
ScrollBar
 InheritedstyleName : String
Defines the skin this component is registered to.
UIControl
 InheritedtoolTip : *
UIControl
 InheritedusesMeasurementStrategy : Boolean
This property defines whether measure() will be called during validateSize() or not.
MeasurableControl
  value : Number
ScrollBar
 InheritedverticalScrollBar : ScrollBar
Returns The instance of the created verticalScrollBar or null if it was never created or is not visible.
UIContainer
 InheritedverticalScrollIncrement : Number
UIContainer
 InheritedverticalScrollPolicy : Boolean
UIContainer
 InheritedverticalScrollPosition : Number
UIContainer
 Inheritedvisible : Boolean
MeasurableControl
 Inheritedwidth : Number
Set/get the width of the control.
MeasurableControl
Protected Properties
 PropertyDefined by
 Inherited_backgroundPainter : IPainter
UIControl
 Inherited_clipContent : Boolean = true
UIContainer
 Inherited_contentHeight : Number = 0
UIContainer
 InheritedcontentPane : UIControl
UIContainer
 Inherited_contentWidth : Number = 0
UIContainer
 Inherited_creationCompleteFired : Boolean = false
MeasurableControl
  _decrementButton : Button
ScrollBar
  _decrementButtonSkin : ISkin
ScrollBar
 Inherited_dimensionsChanged : Boolean = true
MeasurableControl
  _direction : String
ScrollBar
 Inherited_dragEnabled : Boolean = false
UIControl
 Inherited_dropEnabled : Boolean = false
UIControl
 Inherited_explicitHeight : Number = NaN
MeasurableControl
 Inherited_explicitWidth : Number = NaN
MeasurableControl
 Inherited_horizontalScrollBar : ScrollBar
UIContainer
 Inherited_horizontalScrollPolicy : Boolean = true
UIContainer
  _incrementButton : Button
ScrollBar
  _incrementButtonSkin : ISkin
ScrollBar
 InheritedisMouseDown : Boolean = false
UIControl
 Inherited_layout : ILayout
UIContainer
 InheritedlayoutInvalidated : Boolean = true
UIContainer
 Inherited_maximumHeight : Number = NaN
MeasurableControl
 Inherited_maximumWidth : Number = NaN
MeasurableControl
  _maxScroll : Number = NaN
ScrollBar
 Inherited_measuredHeight : Number = NaN
MeasurableControl
 Inherited_measuredWidth : Number = NaN
MeasurableControl
 Inherited_mouseActionsDisabled : Boolean = false
MeasurableControl
 InheritedneedsHorizontalScrollBar : Boolean = false
UIContainer
 InheritedneedsVerticalScrollBar : Boolean = false
UIContainer
 Inherited_padding : Padding
UIControl
 Inherited_parentContainer : UIControl
MeasurableControl
 Inherited_percentHeight : Number
MeasurableControl
 Inherited_percentUnusedHeight : Number
MeasurableControl
 Inherited_percentUnusedWidth : Number
MeasurableControl
 Inherited_percentWidth : Number
MeasurableControl
 InheritedscrollBarsChanged : Boolean = false
UIContainer
  _scrollButtonSize : Number = NaN
ScrollBar
 InheritedscrollX : Number = 0
UIContainer
 InheritedscrollY : Number = 0
UIContainer
 Inherited_skin : ISkin
UIControl
 Inherited_skinnedControl : UIControl
UIControl
  _slider : Slider
ScrollBar
 Inherited_styleName : String
UIControl
 Inherited_toolTipData : *
UIControl
 InheritedtoolTipRenderer : Class
UIControl
 Inherited_verticalScrollBar : ScrollBar
UIContainer
 Inherited_verticalScrollPolicy : Boolean = true
UIContainer
  _visibleScroll : Number = NaN
ScrollBar
Public Methods
 MethodDefined by
  
ScrollBar(direction:String)
ScrollBar
 Inherited
addChild(child:DisplayObject):DisplayObject
UIContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
UIContainer
 Inherited
MeasurableControl
 Inherited
Calls the queueValidateDisplayList if measure causes _dimensionsChanged to change to true.
UIControl
 Inherited
dispose():void
UIControl
 Inherited
Lays out the layoutChildren based ILayout object.
UIContainer
 Inherited
doOnAdded():void
[Temp] This function is called automatically by a parent UIControl if this is created as a child of a UIControl.
MeasurableControl
 Inherited
MeasurableControl
 Inherited
getChildByName(name:String):DisplayObject
UIContainer
 Inherited
Returns the explicitly defined height or the measured height computed by the measure function.
MeasurableControl
 Inherited
Returns the explicitly defined width or the measured number computed by the measure function.
MeasurableControl
 Inherited
When measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
UIContainer
  
initialize():void
At the very least, a scrollBar needs a slider or some subclass of it.
ScrollBar
 Inherited
invalidateSize(event:PyroEvent = null):void
Marks itself dirty and waits till either the container to validateSize or validates itself at the next enterframe if it has no parent container.
MeasurableControl
 Inherited
isMouseOver(event:MouseEvent):Boolean
Utility function to check if a mouseEvent happened while the mouse was over the displayObject
MeasurableControl
 Inherited
measure():void
Measure is called during the validateSize if the needsmeasurement flag is set.
UIControl
 Inherited
position(x:Number, y:Number):UIControl
UIControl
 Inherited
This function is called if the framework determines that dimensions of the control have changed.
MeasurableControl
 Inherited
UIContainer
 Inherited
UIControl
 Inherited
removeChild(child:DisplayObject):DisplayObject
UIContainer
 Inherited
MeasurableControl
  
setScrollProperty(visibleScroll:Number, maxScroll:Number):void
For example: setScrollProperty(scrollHeight, contentHeight);
ScrollBar
 Inherited
size(w:*, h:*):UIControl
Convinience function for setting width and height in one call.
UIControl
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Unlike UIControls, UIContainers do not apply a skin directly on themselves but interpret the skin file and apply them to the different children.
UIContainer
 Inherited
validateDisplayList(event:Event = null):void
validateDisplayList is called as a response to invalidateDisplayList.
MeasurableControl
  
validateSize():void
For scrollBars, unless the dimension properites of the buttons are set, the button's width and heights are set to the same as the each other to create square buttons
ScrollBar
 Inherited
When measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
UIContainer
Protected Methods
 MethodDefined by
 Inherited
Calculates the measuredHeight property.
MeasurableControl
 Inherited
Calculates the measuredWidth property.
MeasurableControl
 Inherited
UIContainer
 Inherited
UIContainer
 Inherited
UIContainer
 Inherited
This is where the new children should be created and then added to the displaylist.
MeasurableControl
 Inherited
UIContainer
 Inherited
UIContainer
 Inherited
disableEvent(event:Event):void
MeasurableControl
 Inherited
dispatchDragStart(event:MouseEvent):void
UIControl
 Inherited
Dispatches the UpdateComplete event
MeasurableControl
 Inherited
UIContainer
 Inherited
doQueuedValidateSize(event:Event):void
doQueueValidateSize is executed by the top level UIControl.
MeasurableControl
 Inherited
handleMouseWheel(event:MouseEvent):void
UIContainer
 Inherited
handlePreDragMouseDown(event:Event):void
This function is called if the UIControl instance is drag enabled and the user clicks the mouse down.
UIControl
 Inherited
UIContainer
 Inherited
UIContainer
 Inherited
MeasurableControl
 Inherited
onAddedToParent(event:Event):void
The event listener executed when this component has been added to the parent.
MeasurableControl
 Inherited
Event listener for when the horizontal scrollbar is used.
UIContainer
 Inherited
UIContainer
 Inherited
Event listener for the horizontal scrollbar's creation and validation event.
UIContainer
 Inherited
onSkinnedControlResize(event:Event):void
Event handler for when the UIControl is applied as a Skin and the control it is skinning is resized.
UIControl
  
ScrollBar
  
ScrollBar
 Inherited
Event listener for when the vertical scrollbar is used.
UIContainer
 Inherited
UIContainer
 Inherited
Event listener for the vertical scrollbar's creation and validation event.
UIContainer
 Inherited
UIContainer
 Inherited
UIContainer
  
ScrollBar
Events
 EventSummaryDefined by
 Inherited  UIControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
    ScrollBar
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
 Inherited  MeasurableControl
Property detail
_decrementButtonproperty
protected var _decrementButton:Button
decrementButtonproperty 
decrementButton:Button  [read-write]Implementation
    public function get decrementButton():Button
    public function set decrementButton(value:Button):void
_decrementButtonSkinproperty 
protected var _decrementButtonSkin:ISkin
decrementButtonSkinproperty 
decrementButtonSkin:ISkin  [write-only]Implementation
    public function set decrementButtonSkin(value:ISkin):void
_directionproperty 
protected var _direction:String
directionproperty 
direction:String  [read-only]Implementation
    public function get direction():String
incrementalScrollDeltaproperty 
public var incrementalScrollDelta:Number = 25

The height/width the scrollbar must scroll when one of the scroll buttons is clicked on.

_incrementButtonproperty 
protected var _incrementButton:Button
incrementButtonproperty 
incrementButton:Button  [read-write]Implementation
    public function get incrementButton():Button
    public function set incrementButton(value:Button):void
_incrementButtonSkinproperty 
protected var _incrementButtonSkin:ISkin
incrementButtonSkinproperty 
incrementButtonSkin:ISkin  [write-only]Implementation
    public function set incrementButtonSkin(value:ISkin):void
maximumproperty 
maximum:Number  [read-write]Implementation
    public function get maximum():Number
    public function set maximum(value:Number):void
_maxScrollproperty 
protected var _maxScroll:Number = NaN
minimumproperty 
minimum:Number  [read-write]Implementation
    public function get minimum():Number
    public function set minimum(value:Number):void
_scrollButtonSizeproperty 
protected var _scrollButtonSize:Number = NaN
skinproperty 
skin:ISkin  [write-only]Implementation
    public function set skin(value:ISkin):void
_sliderproperty 
protected var _slider:Slider
sliderproperty 
slider:Slider  [read-write]Implementation
    public function get slider():Slider
    public function set slider(value:Slider):void
valueproperty 
value:Number  [read-write]Implementation
    public function get value():Number
    public function set value(value:Number):void
_visibleScrollproperty 
protected var _visibleScroll:Number = NaN
Constructor detail
ScrollBar()constructor
public function ScrollBar(direction:String)Parameters
direction:String
Method detail
initialize()method
public override function initialize():void

At the very least, a scrollBar needs a slider or some subclass of it. Increment and Decrement Buttons are created automatically when a skin is applied.

onSliderThumbDrag()method 
protected function onSliderThumbDrag(event:SliderEvent):voidParameters
event:SliderEvent
onSliderUpdateComplete()method 
protected function onSliderUpdateComplete(event:PyroEvent):voidParameters
event:PyroEvent
setScrollProperty()method 
public function setScrollProperty(visibleScroll:Number, maxScroll:Number):void

For example: setScrollProperty(scrollHeight, contentHeight);

Parameters
visibleScroll:Number — The height of the viewport being scrolled
 
maxScroll:Number — The height of the content to be scrolled
updateScrollUI()method 
protected function updateScrollUI():void
validateSize()method 
public override function validateSize():void

For scrollBars, unless the dimension properites of the buttons are set, the button's width and heights are set to the same as the each other to create square buttons

Event detail
scrollevent 
Event object type: org.openPyro.controls.events.ScrollEvent