| Package | org.openPyro.core |
| Class | public class UIControl |
| Inheritance | UIControl MeasurableControl flash.display.Sprite |
| Implements | ISkin, ISkinClient |
| Subclasses | AbstractButtonSkin, AuroraPainterButtonSkin, Button, ComboBox, DefaultListRenderer, GradientRectSkin, HDividerSkin, Image, Label, ProgressBar, Slider, UIContainer |
| Property | Defined by | ||
|---|---|---|---|
| backgroundPainter : IPainter
UIControls can have a backgroundPainter object attached that is
triggered everytime updateDisplayList is called.
| UIControl | ||
![]() | creationCompleteFired : Boolean | MeasurableControl | |
![]() | displayListInvalidated : Boolean = true
Flag to mark a dirty displaylist.
| MeasurableControl | |
| dragData : Object | UIControl | ||
| dragEnabled : Boolean | UIControl | ||
| dropEnabled : Boolean [write-only]
| UIControl | ||
![]() | 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 | |
![]() | 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 | |
![]() | 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 | |
![]() | 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 | |
![]() | sizeInvalidated : Boolean = false
The flag to mark that the control's size
has been invalidated.
| MeasurableControl | |
| skin : ISkin
[write-only]
| UIControl | ||
| skinnedControl : UIControl | UIControl | ||
| styleName : String
Defines the skin this component is registered to.
| UIControl | ||
| toolTip : * [write-only]
| UIControl | ||
![]() | usesMeasurementStrategy : Boolean
This property defines whether measure() will be called during
validateSize() or not.
| MeasurableControl | |
![]() | visible : Boolean | MeasurableControl | |
![]() | width : Number
Set/get the width of the control.
| MeasurableControl | |
| Method | Defined by | ||
|---|---|---|---|
| UIControl | |||
|
addChild(child:DisplayObject):DisplayObject
| UIControl | ||
|
addChildAt(child:DisplayObject, index:int):DisplayObject
| UIControl | ||
![]() |
cancelMouseEvents():void
| MeasurableControl | |
|
checkDisplayListValidation():void
Calls the queueValidateDisplayList if measure causes
_dimensionsChanged to change to true.
| UIControl | ||
|
dispose():void
| UIControl | ||
|
doLayoutChildren():void
| UIControl | ||
![]() |
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 | |
![]() |
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
| UIControl | ||
|
initialize():void
This happens only once when a child is
first added to any parent.
| UIControl | ||
![]() |
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 | |
|
removeBackgroundPainter():void
| UIControl | ||
|
removeChild(d:DisplayObject):DisplayObject
| UIControl | ||
![]() |
resizeHandler():void
| MeasurableControl | |
|
Convinience function for setting width and height
in one call.
| UIControl | ||
|
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
The updateDisplayList is triggered everytime the framework
determines that some event has taken place that needs the
UI to be refreshed.
| UIControl | ||
![]() |
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()).
| MeasurableControl | |
|
widthForMeasurement():Number
When measure is called, it uses the widthForMeasurement and
heightForMeasurement to calculate the sizes for
percent-dimension based children
| UIControl | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
calculateMeasuredHeight():void
Calculates the measuredHeight property.
| MeasurableControl | |
![]() |
calculateMeasuredWidth():void
Calculates the measuredWidth property.
| MeasurableControl | |
![]() |
createChildren():void
This is where the new children should
be created and then added to the displaylist.
| MeasurableControl | |
![]() |
disableEvent(event:Event):void
| MeasurableControl | |
|
dispatchDragStart(event:MouseEvent):void
| UIControl | ||
![]() |
dispatchUpdateComplete():void
Dispatches the UpdateComplete event
| MeasurableControl | |
|
doChildBasedValidation():void
While UIControls can be sized based on the dimensions of the parent
container, if the explicit or percent dimension values are not specified,
the UIControl can look at its children's dimensions and base its
sizing off them.
| UIControl | ||
![]() |
doQueuedValidateSize(event:Event):void
doQueueValidateSize is executed by the top level UIControl.
| MeasurableControl | |
|
handlePreDragMouseDown(event:Event):void
This function is called if the UIControl instance is drag enabled
and the user clicks the mouse down.
| UIControl | ||
![]() |
invalidateDisplayList():void
| MeasurableControl | |
![]() |
onAddedToParent(event:Event):void
The event listener executed when this component
has been added to the parent.
| MeasurableControl | |
|
onSkinnedControlResize(event:Event):void
Event handler for when the UIControl is applied as a Skin
and the control it is skinning is resized.
| UIControl | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| UIControl | ||||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
![]() | MeasurableControl | |||
| _backgroundPainter | property |
protected var _backgroundPainter:IPainter
| backgroundPainter | property |
backgroundPainter:IPainter [read-write]UIControls can have a backgroundPainter object attached that is triggered everytime updateDisplayList is called.
Implementation public function get backgroundPainter():IPainter
public function set backgroundPainter(value:IPainter):void
See also
| dragData | property |
public var dragData:Object
| _dragEnabled | property |
protected var _dragEnabled:Boolean = false
| dragEnabled | property |
dragEnabled:Boolean [read-write]Implementation
public function get dragEnabled():Boolean
public function set dragEnabled(value:Boolean):void
| _dropEnabled | property |
protected var _dropEnabled:Boolean = false
| dropEnabled | property |
dropEnabled:Boolean [write-only]Implementation
public function set dropEnabled(value:Boolean):void
| isMouseDown | property |
protected var isMouseDown:Boolean = false
| measuredHeight | property |
measuredHeight:Number [read-write]
Overrides the set measuredHeight property from
MeasurableControl to invalidate children
(UIControl acknowledges that it can have children whose
dimensions are based on its own)
public function get measuredHeight():Number
public function set measuredHeight(value:Number):void
| measuredWidth | property |
measuredWidth:Number [read-write]
Overrides the set measuredWidth property from
MeasurableControl to invalidate children
(UIControl acknowledges that it can have children whose
dimensions are based on its own)
public function get measuredWidth():Number
public function set measuredWidth(value:Number):void
| _padding | property |
protected var _padding:Padding
| padding | property |
padding:Padding [read-write]Paddings define the unusable space within UIContainers that should not be used for measurement and layout. Similar to HTML/CSS padding
Implementation public function get padding():Padding
public function set padding(value:Padding):void
| _skin | property |
protected var _skin:ISkin
| skin | property |
| _skinnedControl | property |
protected var _skinnedControl:UIControl
| skinnedControl | property |
skinnedControl:UIControl [read-write]Implementation
public function get skinnedControl():UIControl
public function set skinnedControl(value:UIControl):void
| _styleName | property |
protected var _styleName:String
| styleName | property |
styleName:String [read-write]Defines the skin this component is registered to. As long as a skin is registered with the same name as this value, this control will get that skin when instantiated or when that definition changes.
Implementation public function get styleName():String
public function set styleName(value:String):void
See also
| toolTip | property |
toolTip:* [write-only]Implementation
public function set toolTip(value:*):void
| _toolTipData | property |
protected var _toolTipData:*
| toolTipRenderer | property |
protected var toolTipRenderer:Class
| UIControl | () | constructor |
public function UIControl()
| 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 |
| checkDisplayListValidation | () | method |
public override function checkDisplayListValidation():voidCalls the queueValidateDisplayList if measure causes _dimensionsChanged to change to true. UIControl overrides this with a call to doChildBasedValidation which then goes and checks if the size of the children affects the size of the control.
| dispatchDragStart | () | method |
protected function dispatchDragStart(event:MouseEvent):voidParameters
event:MouseEvent |
| dispose | () | method |
public function dispose():void
| doChildBasedValidation | () | method |
protected function doChildBasedValidation():voidWhile UIControls can be sized based on the dimensions of the parent container, if the explicit or percent dimension values are not specified, the UIControl can look at its children's dimensions and base its sizing off them. For example, Label controls can look at the size of the text rendered by them to define their own width.
| doLayoutChildren | () | method |
public function doLayoutChildren():void
| handlePreDragMouseDown | () | method |
protected function handlePreDragMouseDown(event:Event):voidThis function is called if the UIControl instance is drag enabled and the user clicks the mouse down. The control then waits for the mouse to move for dispatching the DragEvent.DRAG_START event. That event can be used to trigger DragManager's doDrag() function to implement Drag And Drop
Parametersevent:Event |
| heightForMeasurement | () | method |
public function heightForMeasurement():NumberWhen measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
ReturnsNumber |
| 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.
| measure | () | method |
public override function measure():voidMeasure is called during the validateSize if the needsmeasurement flag is set. At this point, new measured width/heights are calculated. If these values are different from the values previously calculated, the resizeHandler is queued for the next enterframe
| onSkinnedControlResize | () | method |
protected function onSkinnedControlResize(event:Event):voidEvent handler for when the UIControl is applied as a Skin and the control it is skinning is resized.
Parametersevent:Event |
See also
| position | () | method |
public function position(x:Number, y:Number):UIControlParameters
x:Number |
|
y:Number |
UIControl |
| removeBackgroundPainter | () | method |
public function removeBackgroundPainter():void
| removeChild | () | method |
public override function removeChild(d:DisplayObject):DisplayObjectParameters
d:DisplayObject |
DisplayObject |
| size | () | method |
public function size(w:*, h:*):UIControlConvinience function for setting width and height in one call. The parameters can either be Strings or Numbers. When passing strings, you can append a '%' character at the end of the string to set a percent value
Parametersw:* — Width either as a Number or as a String
ending with a % character
|
|
h:* — Height either as a Number or as a String
ending with a % character
|
UIControl |
— if the datatype passed in is not a Number
or String
|
| updateDisplayList | () | method |
public override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):voidThe 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
|
| widthForMeasurement | () | method |
public function widthForMeasurement():NumberWhen measure is called, it uses the widthForMeasurement and heightForMeasurement to calculate the sizes for percent-dimension based children
ReturnsNumber |
| dragDrop | event |