| Package | org.openPyro.core |
| Class | public class UIContainer |
| Inheritance | UIContainer UIControl MeasurableControl flash.display.Sprite |
| Subclasses | Application, DividedBox, List, ScrollBar, ViewStack |
See also
| Property | Defined by | ||
|---|---|---|---|
![]() | backgroundPainter : IPainter
UIControls can have a backgroundPainter object attached that is
triggered everytime updateDisplayList is called.
| UIControl | |
| clipContent : Boolean | UIContainer | ||
| contentHeight : Number [read-only]
| UIContainer | ||
| contentWidth : Number [read-only]
| UIContainer | ||
![]() | creationCompleteFired : Boolean | MeasurableControl | |
![]() | displayListInvalidated : Boolean = true
Flag to mark a dirty displaylist.
| MeasurableControl | |
![]() | dragData : Object | UIControl | |
![]() | dragEnabled : Boolean | UIControl | |
![]() | dropEnabled : Boolean | UIControl | |
| explicitlyAllocatedHeight : Number
This property are modified by IContainerMeasurementHelpers.
| UIContainer | ||
| explicitlyAllocatedWidth : Number
This property are modified by IContainerMeasurementHelpers.
| UIContainer | ||
![]() | explicitWidth : Number The height set in terms of actual pixels.
| MeasurableControl | |
![]() | forceInvalidateDisplayList : Boolean = false | MeasurableControl | |
![]() | height : Number
Set/get the height of the control.
| MeasurableControl | |
| horizontalScrollBar : ScrollBar
[read-only]
Returns The instance of the created horizontal
or null if it was never created or is not visible.
| UIContainer | ||
| horizontalScrollIncrement : Number | UIContainer | ||
| horizontalScrollPolicy : Boolean | UIContainer | ||
| horizontalScrollPosition : Number | UIContainer | ||
![]() | includeInLayout : Boolean
Specifies whether this control participates in the
layout system in OpenPyro.
| MeasurableControl | |
![]() | initialized : Boolean = false
Property indicates whether a control has been initialized
or not.
| MeasurableControl | |
| layout : ILayout
Containers can be assigned different layouts
which control the positioning of the
different controls.
| UIContainer | ||
| layoutChildren : Array [read-only]
Returns an Array of displayObjects whose positions
are controlled by the
ILayout object. | UIContainer | ||
![]() | maximumHeight : Number | MeasurableControl | |
![]() | maximumWidth : Number | MeasurableControl | |
![]() | measuredHeight : 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 | |
![]() | measuredWidth : 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 | |
![]() | mouseActionsDisabled : Boolean | MeasurableControl | |
| mouseOverDisabled : Boolean = false [static]
| UIContainer | ||
![]() | needsMeasurement : Boolean = true
Only setting percent width/heights changes the
needsMeasurement flag which makes its parent
container call measure on it.
| MeasurableControl | |
![]() | padding : Padding
Paddings define the unusable space within
UIContainers that should not be used for
measurement and layout.
| UIControl | |
![]() | parentContainer : UIControl | MeasurableControl | |
![]() | percentHeight : Number | MeasurableControl | |
![]() | percentUnusedHeight : Number
Set/get the percent height.
| MeasurableControl | |
![]() | percentUnusedWidth : Number
Set/get the percent width.
| MeasurableControl | |
![]() | percentWidth : Number | MeasurableControl | |
| scrollHeight : Number [read-only]
scrollHeight is the max height a vertical
scrollbar needs to scroll
| UIContainer | ||
| scrollWidth : Number [read-only]
scrollWidth is the max width a horizontal
scrollbar needs to scroll
| UIContainer | ||
![]() | sizeInvalidated : Boolean = false
The flag to mark that the control's size
has been invalidated.
| MeasurableControl | |
![]() | skin : ISkin | UIControl | |
![]() | skinnedControl : UIControl | UIControl | |
![]() | styleName : String
Defines the skin this component is registered to.
| UIControl | |
![]() | toolTip : * | UIControl | |
![]() | usesMeasurementStrategy : Boolean
This property defines whether measure() will be called during
validateSize() or not.
| MeasurableControl | |
| verticalScrollBar : ScrollBar
Returns The instance of the created verticalScrollBar
or null if it was never created or is not visible.
| UIContainer | ||
| verticalScrollIncrement : Number | UIContainer | ||
| verticalScrollPolicy : Boolean | UIContainer | ||
| verticalScrollPosition : Number | UIContainer | ||
![]() | visible : Boolean | MeasurableControl | |
![]() | width : Number
Set/get the width of the control.
| MeasurableControl | |
| Method | Defined by | ||
|---|---|---|---|
| UIContainer | |||
|
addChild(child:DisplayObject):DisplayObject
| UIContainer | ||
|
addChildAt(child:DisplayObject, index:int):DisplayObject
| UIContainer | ||
![]() |
cancelMouseEvents():void
| MeasurableControl | |
![]() |
checkDisplayListValidation():void
Calls the queueValidateDisplayList if measure causes
_dimensionsChanged to change to true.
| UIControl | |
![]() |
dispose():void
| UIControl | |
|
doLayoutChildren():void
Lays out the layoutChildren based
ILayout
object. | UIContainer | ||
![]() |
doOnAdded():void
[Temp] This function is called automatically
by a parent UIControl if this is created as a
child of a UIControl.
| MeasurableControl | |
![]() |
enableMouseEvents():void
| MeasurableControl | |
|
getChildByName(name:String):DisplayObject
| UIContainer | ||
![]() |
getExplicitOrMeasuredHeight():Number
Returns the explicitly defined height or the measured
height computed by the
measure function. | MeasurableControl | |
![]() |
getExplicitOrMeasuredWidth():Number
Returns the explicitly defined width or the measured
number computed by the
measure function. | MeasurableControl | |
|
heightForMeasurement():Number
When measure is called, it uses the widthForMeasurement and
heightForMeasurement to calculate the sizes for
percent-dimension based children
| UIContainer | ||
|
initialize():void
This happens only once when a child is
first added to any parent.
| UIContainer | ||
![]() |
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 | |
![]() |
isMouseOver(event:MouseEvent):Boolean
Utility function to check if a mouseEvent happened
while the mouse was over the displayObject
| MeasurableControl | |
![]() |
measure():void
Measure is called during the validateSize if
the needsmeasurement flag is set.
| UIControl | |
![]() | UIControl | ||
![]() |
queueValidateDisplayList(event:PyroEvent = null):void
This function is called if the framework determines that dimensions of the
control have changed.
| MeasurableControl | |
|
removeAllChildren():void
| UIContainer | ||
![]() |
removeBackgroundPainter():void
| UIControl | |
|
removeChild(child:DisplayObject):DisplayObject
| UIContainer | ||
![]() |
resizeHandler():void
| MeasurableControl | |
![]() |
Convinience function for setting width and height
in one call.
| UIControl | |
|
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 | ||
![]() |
validateDisplayList(event:Event = null):void
validateDisplayList is called as a response to invalidateDisplayList.
| MeasurableControl | |
|
validateSize():void
The validateSize function is called in response to
a component declaring its size invalid (usually
by calling invalidateSize()).
| UIContainer | ||
|
widthForMeasurement():Number
When measure is called, it uses the widthForMeasurement and
heightForMeasurement to calculate the sizes for
percent-dimension based children
| UIContainer | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
calculateMeasuredHeight():void
Calculates the measuredHeight property.
| MeasurableControl | |
![]() |
calculateMeasuredWidth():void
Calculates the measuredWidth property.
| MeasurableControl | |
|
checkNeedsHScrollBar():void
| UIContainer | ||
|
checkNeedsVScrollBar():void
| UIContainer | ||
|
checkRevalidation():void
| UIContainer | ||
![]() |
createChildren():void
This is where the new children should
be created and then added to the displaylist.
| MeasurableControl | |
|
createHScrollBar():void
| UIContainer | ||
|
createVScrollBar():void
| UIContainer | ||
![]() |
disableEvent(event:Event):void
| MeasurableControl | |
![]() |
dispatchDragStart(event:MouseEvent):void
| UIControl | |
![]() |
dispatchUpdateComplete():void
Dispatches the UpdateComplete event
| MeasurableControl | |
|
doChildBasedValidation():void
| UIContainer | ||
![]() |
doQueuedValidateSize(event:Event):void
doQueueValidateSize is executed by the top level UIControl.
| MeasurableControl | |
|
handleMouseWheel(event:MouseEvent):void
| UIContainer | ||
![]() |
handlePreDragMouseDown(event:Event):void
This function is called if the UIControl instance is drag enabled
and the user clicks the mouse down.
| UIControl | |
|
hideHScrollBar():void
| UIContainer | ||
|
hideVScrollBar():void
| UIContainer | ||
![]() |
invalidateDisplayList():void
| MeasurableControl | |
![]() |
onAddedToParent(event:Event):void
The event listener executed when this component
has been added to the parent.
| MeasurableControl | |
|
onHorizontalScroll(event:ScrollEvent):void
Event listener for when the horizontal scrollbar is
used.
| UIContainer | ||
|
onHorizontalScrollBarSizeValidated(event:PyroEvent):void
| UIContainer | ||
|
onHScrollBarUpdateComplete(event:PyroEvent):void
Event listener for the horizontal scrollbar's
creation and validation event.
| UIContainer | ||
![]() |
onSkinnedControlResize(event:Event):void
Event handler for when the UIControl is applied as a Skin
and the control it is skinning is resized.
| UIControl | |
|
onVerticalScroll(event:ScrollEvent):void
Event listener for when the vertical scrollbar is
used.
| UIContainer | ||
|
onVerticalScrollBarSizeValidated(event:PyroEvent):void
| UIContainer | ||
|
onVScrollBarUpdateComplete(event:PyroEvent):void
Event listener for the vertical scrollbar's
creation and validation event.
| UIContainer | ||
|
setContentMask():void
| UIContainer | ||
|
setVerticalScrollBar():void
| UIContainer | ||
| _clipContent | property |
protected var _clipContent:Boolean = true
| clipContent | property |
clipContent:Boolean [read-write]Implementation
public function get clipContent():Boolean
public function set clipContent(value:Boolean):void
| _contentHeight | property |
protected var _contentHeight:Number = 0
| contentHeight | property |
contentHeight:Number [read-only]Implementation
public function get contentHeight():Number
| contentPane | property |
protected var contentPane:UIControl
| _contentWidth | property |
protected var _contentWidth:Number = 0
| contentWidth | property |
contentWidth:Number [read-only]Implementation
public function get contentWidth():Number
| explicitlyAllocatedHeight | property |
explicitlyAllocatedHeight:Number [read-write]This property are modified by IContainerMeasurementHelpers. which most container layouts implement.
Implementation public function get explicitlyAllocatedHeight():Number
public function set explicitlyAllocatedHeight(value:Number):void
See also
| explicitlyAllocatedWidth | property |
explicitlyAllocatedWidth:Number [read-write]This property are modified by IContainerMeasurementHelpers. which most container layouts implement.
Implementation public function get explicitlyAllocatedWidth():Number
public function set explicitlyAllocatedWidth(value:Number):void
See also
| _horizontalScrollBar | property |
protected var _horizontalScrollBar:ScrollBar
| horizontalScrollBar | property |
horizontalScrollBar:ScrollBar [read-only]Returns The instance of the created horizontal or null if it was never created or is not visible. Note that this function does cannot be used to detect if the scrollbar was created or not, since scrollbars once created are never distroyed, even if a subsequent change in the container's layout does not require the scrollbar anymore.
Implementation public function get horizontalScrollBar():ScrollBar
| horizontalScrollIncrement | property |
horizontalScrollIncrement:Number [read-write]Implementation
public function get horizontalScrollIncrement():Number
public function set horizontalScrollIncrement(value:Number):void
| _horizontalScrollPolicy | property |
protected var _horizontalScrollPolicy:Boolean = true
| horizontalScrollPolicy | property |
horizontalScrollPolicy:Boolean [read-write]Implementation
public function get horizontalScrollPolicy():Boolean
public function set horizontalScrollPolicy(value:Boolean):void
| horizontalScrollPosition | property |
horizontalScrollPosition:Number [read-write]Implementation
public function get horizontalScrollPosition():Number
public function set horizontalScrollPosition(value:Number):void
| _layout | property |
protected var _layout:ILayout
| layout | property |
layout:ILayout [read-write]Containers can be assigned different layouts which control the positioning of the different controls.
Implementation public function get layout():ILayout
public function set layout(value:ILayout):void
See also
| layoutChildren | property |
layoutChildren:Array [read-only]
Returns an Array of displayObjects whose positions
are controlled by the ILayout object.
These do not include, for example, the scrollbars.
public function get layoutChildren():Array
See also
| layoutInvalidated | property |
protected var layoutInvalidated:Boolean = true
| mouseOverDisabled | property |
public static var mouseOverDisabled:Boolean = false
| needsHorizontalScrollBar | property |
protected var needsHorizontalScrollBar:Boolean = false
| needsVerticalScrollBar | property |
protected var needsVerticalScrollBar:Boolean = false
| scrollBarsChanged | property |
protected var scrollBarsChanged:Boolean = false
| scrollHeight | property |
scrollHeight:Number [read-only]scrollHeight is the max height a vertical scrollbar needs to scroll
Implementation public function get scrollHeight():Number
| scrollWidth | property |
scrollWidth:Number [read-only]scrollWidth is the max width a horizontal scrollbar needs to scroll
Implementation public function get scrollWidth():Number
| scrollX | property |
protected var scrollX:Number = 0
| scrollY | property |
protected var scrollY:Number = 0
| _verticalScrollBar | property |
protected var _verticalScrollBar:ScrollBar
| verticalScrollBar | property |
verticalScrollBar:ScrollBar [read-write]Returns The instance of the created verticalScrollBar or null if it was never created or is not visible. Note that this function does cannot be used to detect if the scrollbar was created or not, since scrollbars once created are never distroyed, even if a subsequent change in the container's layout does not require the scrollbar anymore.
Implementation public function get verticalScrollBar():ScrollBar
public function set verticalScrollBar(value:ScrollBar):void
| verticalScrollIncrement | property |
verticalScrollIncrement:Number [read-write]Implementation
public function get verticalScrollIncrement():Number
public function set verticalScrollIncrement(value:Number):void
| _verticalScrollPolicy | property |
protected var _verticalScrollPolicy:Boolean = true
| verticalScrollPolicy | property |
verticalScrollPolicy:Boolean [read-write]Implementation
public function get verticalScrollPolicy():Boolean
public function set verticalScrollPolicy(value:Boolean):void
| verticalScrollPosition | property |
verticalScrollPosition:Number [read-write]Implementation
public function get verticalScrollPosition():Number
public function set verticalScrollPosition(value:Number):void
| UIContainer | () | constructor |
public function UIContainer()
| addChild | () | method |
public override function addChild(child:DisplayObject):DisplayObjectParameters
child:DisplayObject |
DisplayObject |
| addChildAt | () | method |
public override function addChildAt(child:DisplayObject, index:int):DisplayObjectParameters
child:DisplayObject |
|
index:int |
DisplayObject |
| checkNeedsHScrollBar | () | method |
protected function checkNeedsHScrollBar():void
| checkNeedsVScrollBar | () | method |
protected function checkNeedsVScrollBar():void
| checkRevalidation | () | method |
protected function checkRevalidation():void
| createHScrollBar | () | method |
protected function createHScrollBar():void
| createVScrollBar | () | method |
protected function createVScrollBar():void
| doChildBasedValidation | () | method |
protected override function doChildBasedValidation():void
| doLayoutChildren | () | method |
public override function doLayoutChildren():void
Lays out the layoutChildren based ILayout
object.
See also
| getChildByName | () | method |
public override function getChildByName(name:String):DisplayObjectParameters
name:String |
DisplayObject |
| handleMouseWheel | () | method |
protected function handleMouseWheel(event:MouseEvent):voidParameters
event:MouseEvent |
| heightForMeasurement | () | method |
public override function heightForMeasurement():NumberWhen measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
ReturnsNumber |
| hideHScrollBar | () | method |
protected function hideHScrollBar():void
| hideVScrollBar | () | method |
protected function hideVScrollBar():void
| initialize | () | method |
public override function initialize():voidThis happens only once when a child is first added to any parent. Subsequent removeChild and addChild actions do not trigger this function but rather directly call validateSize.
| onHorizontalScroll | () | method |
protected function onHorizontalScroll(event:ScrollEvent):voidEvent listener for when the horizontal scrollbar is used.
Parametersevent:ScrollEvent |
| onHorizontalScrollBarSizeValidated | () | method |
protected function onHorizontalScrollBarSizeValidated(event:PyroEvent):voidParameters
event:PyroEvent |
| onHScrollBarUpdateComplete | () | method |
protected function onHScrollBarUpdateComplete(event:PyroEvent):voidEvent listener for the horizontal scrollbar's creation and validation event.
Parametersevent:PyroEvent |
| onVerticalScroll | () | method |
protected function onVerticalScroll(event:ScrollEvent):voidEvent listener for when the vertical scrollbar is used.
Parametersevent:ScrollEvent |
| onVerticalScrollBarSizeValidated | () | method |
| onVScrollBarUpdateComplete | () | method |
protected function onVScrollBarUpdateComplete(event:PyroEvent):voidEvent listener for the vertical scrollbar's creation and validation event.
Parametersevent:PyroEvent |
| removeAllChildren | () | method |
public function removeAllChildren():void
| removeChild | () | method |
public override function removeChild(child:DisplayObject):DisplayObjectParameters
child:DisplayObject |
DisplayObject |
| setContentMask | () | method |
protected function setContentMask():void
| setVerticalScrollBar | () | method |
protected function setVerticalScrollBar():void
| updateDisplayList | () | method |
public override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidUnlike UIControls, UIContainers do not apply a skin directly on themselves but interpret the skin file and apply them to the different children. So updateDisplayList here does not call super.updateDisplayList() The updateDisplayList is triggered everytime the framework determines that some event has taken place that needs the UI to be refreshed.
ParametersunscaledWidth:Number — The computed width of the control
|
|
unscaledHeight:Number — The computed height of the control
|
| validateSize | () | method |
public override function validateSize():voidThe validateSize function is called in response to a component declaring its size invalid (usually by calling invalidateSize()). The job of this method is to compute the final width and height (whether by calling measure if an explicit w/h is not declared or not if an explicit w & h is declared)
| widthForMeasurement | () | method |
public override function widthForMeasurement():NumberWhen measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
ReturnsNumber |