View comments | RSS feed
Methods | Properties | Effects | Events | Styles Frames | No Frames

mx.core
Class UIObject


Direct Known Subclasses
           mx.charts.LegendItem, mx.controls.Label, mx.controls.ProgressBar, mx.controls.Spacer, mx.controls.listclasses.DragProxy, mx.controls.listclasses.ItemDragProxy, mx.core.UIComponent

class UIObject
extends MovieClip

The UIObject class is the base class for all components and graphical objects. UIObjects support events and styles, and resize by scaling. The UIObject class itself is not used as an MXML tag, but is occasionally used from ActionScript to generate a blank or empty component.

Common MXML Syntax Inherited from UIObject

All user interface components in Flex extend the UIObject class. Flex components inherit the following properties from the UIObject class.

 <mx:tagname
color="value"
creationComplete="Event handler; no default."
creationCompleteEffect="value"
dragComplete="Event handler; no default."
dragDrop="Event handler; no default."
dragEnter="Event handler; no default."
dragExit="Event handler; no default."
dragOver="Event handler; no default."
draw="Event handler; no default."
effectEnd="Event handler; no default."
effectStart="Event handler; no default."
fontFamily="value"
fontSize="value"
fontStyle="value"
fontWeight="value"
height="value"
hideEffect="value"
id="value"
initialize="Event handler; no default."
load="Event handler; no default.""
marginLeft="value"
marginRight="value"
maxHeight="value"
maxWidth="value"
minHeight="value"
minWidth="value"
mouseChangeSomewhere="Event handler; no default."
mouseDown="Event handler; no default."
mouseDownEffect="value"
mouseDownSomewhere="Event handler; no default."
mouseMove="Event handler; no default."
mouseMoveSomewhere="Event handler; no default."
mouseOut="Event handler; no default."
mouseOutEffect="value"
mouseOver="Event handler; no default."
mouseOverEffect="value"
mouseUp="Event handler; no default."
mouseUpEffect="value"
mouseUpSomewhere="Event handler; no default."
move="Event handler; no default."
moveEffect="value"
nestLevel="value
preferredWidth="value"
preferredHeight="value"
resize="Event handler; no default."
resizeEffect="value"
scaleX="value"
scaleY="value"
showEffect="value"
styleName="value"
tabEnabled="false|true"
textAlign="value"
textDecoration="value"
textIndent="value"
toolTip="value"
unload="Event handler; no default."
visible="value"
width="value"
x="Only recognized when a component is a child
of a Canvas container.
"
y="Only recognized when a component is a child
of a Canvas container.
"
>
...
child tags
...
</mx:UIObject>

See Also
    UIComponent



Constructors
UIObject ( )
Constructor.



Methods
       addEventListener
Adds a listener for a particular event.
       applyProperties( o: Object, refList: Object) :  Void
Apply a set of properties to this object.
       buildDepthTable
Returns a sparsely populated array of references to the children of this object.
       commitProperties( ) :  Void
Processes the properties set on the component via MXML attributes or the initObj parameter to the createClassObject(), createObject() or View.createChild() methods.
       constructObject2( initObj: Object) :  Void
Construct the object.
       createAccessibilityImplementation( )
Creates and initializes the accessibility implementation for this component.
       createChildAtDepth
Creates a new instance of a symbol at an available depth based on the DepthManager flag.
       createChildren( ) :  Void
Create child objects.
       createClassChildAtDepth
Creates a new instance of a class at an available depth based on the DepthManager flag.
       createClassObject( classRef: Function, name: String, depth: Number, initObj: Object) :  mx.core.UIObject
Creates an instance of a class that derives from UIObject from its class definition as a child of this object.
       createEmptyObject( name: String, depth: Number) :  mx.core.UIObject
Creates a blank or empty object as a child of this object.
       destroyObject( name: String) :  Void
Destroys an object that is a child of this object.
       dispatchEvent
Dispatch the event to all listeners.
       doLater( obj: Object, fn: String, args: Array) :  Void
Queues a function to be called later.
       draw( ) :  Void
Draws the object.
       drawRect( x1: Number, y1: Number, x2: Number, y2: Number, r) :  Void
Draws an unfilled rectangle on the screen.
       executeBindings
Flex mixin for data binding.
       fillRect( x1: Number, y1: Number, x2: Number, y2: Number, rgb: Number, alpha: Number) :  Void
Fills the rectangle on the screen.
       findNextAvailableDepth
Returns the next free depth above or below a depth.
       getRepeaterItem
Returns the item in the dataProvider that was used by the specified Repeater to produce this Repeater, or undefined if this Repeater isn't repeated.
       getStyle( styleProp: String)
Gets a style property.
       handleEvent
Called when an event is broadcast.
       init( ) :  Void
Initialize variables.
       invalidate( ) :  Void
Marks a component so that it is redrawn on the next screen update.
       invalidateLayout( ) :  Void
Marks a component so that its layoutChildren() method gets called during a later screen update.
       invalidateProperties( ) :  Void
Marks a component so that its commitProperties() method gets called during a later screen update.
       invalidateSize( ) :  Void
Marks a component so that its measure() method gets called during a later screen update.
       invalidateStyle( styleProp: String) :  Void
Marks a component so that it is redrawn on the next screen update in response to a style property change, which often takes less processing than a full invalidation.
       layoutChildren( )
Sizes and positions the children of a component.
       measure( ) :  Void
Calculates the preferred, mininum and maximum sizes of the component.
       move( x: Number, y: Number, noEvent: Boolean) :  Void
Moves the object.
       redraw( bAlways: Boolean) :  Void
Redraws the object instead of waiting for invalidation to do so.
       removeEventListener
Remove a listener for a particular event.
       setDepthAbove
Moves this object above the input object in the z-order such that, if the two object's overlap, this object would obscure the input object.
       setDepthBelow
Moves this object below the input object in the z-order such that, if the two object's overlap, this object would be obscured by the input object.
       setMask( mask_mc: MovieClip)
Applies a mask, which describes the region of the component that is visible.
       setSize( w: Number, h: Number, noEvent: Boolean) :  Void
Sizes the object.
       setSizeNoLayout( w: Number, h: Number, noEvent: Boolean) :  Void
Sizes the object.
       setStyle
Sets a style property.
       swapDepths( target) :  Void
Exchanges the z-order of the component with another component.



Properties
       alpha: Number
Determines how transparent a component is.
       baselinePosition: Number    [Read-Only]
Determines the baseline y-coordinate of the first line of text of the component.
       className: String
Name of component class.
       depth: Number    [Read-Only]
The MovieClip depth of the UIObject instance, which determines the z-ordering.
       documentDescriptor: Object    [Read-Only]
For a document object, which is an instance of a UIObject at the top of the hierarchy of a Flex application, MXML component, or ActionScript component, the documentDescriptor property is a reference to the descriptor at the top of the autogenerated descriptor tree for that document, which describes the set of children and their attributes for that document.
       height: Number
Number that specifies the height of the component, in pixels, in the parent's coordinates.
       heightFlex: Number
This property has been deprecated.
       id: String
MXML ID of this UIObject instance.
       instanceIndices: Array
An Array that contains the indices required to reference a Repeater from its parent document.
       isDocument: Boolean    [Read-Only]
Determines whether this UIObject instance is a document object, that is, whether it is at the top of the hierarchy of a Flex application, MXML component, or ActionScript component.
statickStretch: Number
Number used to indicate stretchability in the preferredWidth and preferredHeight.
       layoutHeight: Number
Number that specifies the height of the component, in pixels, in the component's coordinates.
       layoutWidth: Number
Number that specifies the width of the component, in pixels, in the component's coordinates.
       maxHeight: Number
Number that specifies the maximum height of the component, in pixels, in the component's coordinates.
       maxWidth: Number
Number that specifies the maximum width of the component, in pixels, in the component's coordinates.
       minHeight: Number
Number that specifies the minimum height of the component, in pixels, in the component's coordinates.
       minWidth: Number
Number that specifies the minimum width of the component, in pixels, in the component's coordinates.
       mouseX: Number    [Read-Only]
Horizontal coordinate of the mouse pointer's location in the coordinate system of this UIObject instance.
       mouseY: Number    [Read-Only]
Vertical coordinate of the mouse pointer's location in the coordinate system of this UIObject instance.
       nestLevel: Number
Depth of this object in the containment hierarchy.
       oldHeight: Number
Height before the height property was last changed.
       oldWidth: Number
Width before the width property was last changed.
       oldX: Number
The x value before the x property was last changed.
       oldY: Number
The y value before the y property was last changed.
       parent: Object    [Read-Only]
The parent container or component for this component.
       parentApplication: Object    [Read-Only]
A reference to the Application object that contains this UIObject instance.
       parentDocument: Object    [Read-Only]
A reference to the parent document object for this UIObject.
       percentHeight: Number    [Read-Only]
Number that specifies the height of a component in percent relative to its parents size.
       percentWidth: Number    [Read-Only]
Number that specifies the width of a component in percent relative to its parents size.
       preferredHeight: Number
Number that specifies the preferred height of the component, in pixels, in the component's coordinates.
       preferredWidth: Number
Number that specifies the preferred width of the component, in pixels, in the component's coordinates.
       repeaterIndices: Array
An array that contains the indices of the items in the dataProviders of the Repeaters in the parent document that produced this Repeater.
       scaleX: Number
Number that specifies the horizontal scaling percentage.
       scaleY: Number
Number that specifies the vertical scaling percentage.
       styleName: var
CSSStyleDeclaration or pointer to parent to be used by component in calculating style values.
       tabEnabled: Boolean
If true, object can receive focus.
       toolTip: String
Text to display in the ToolTip.
staticversion: String
Version string for this class.
       visible: Boolean
If true, the object is visible.
       width: Number
Number that specifies the width of the component, in pixels, in the parent's coordinates.
       widthFlex: Number
This property has been deprecated.
       x: Number
Number that specifies the component's x position within its parent container.
       y: Number
Number that specifies the component's y position within its parent container.



Effects
creationCompleteEffectComponent is created.
hideEffectComponent becomes invisible.
mouseDownEffectUser presses the mouse button while over the component.
mouseOutEffectUser rolls the mouse so it is no longer over the component.
mouseOverEffectUser rolls the mouse over the component.
mouseUpEffectUser releases the mouse button.
moveEffectComponent is moved.
resizeEffectComponent is resized.
showEffectComponent becomes visible.



Events
creationCompleteBroadcast when the object has finished its construction, property processing, measuring, layout, and drawing. At this point, the component may not be visible depending on its visible property, even though it has been drawn. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, creationComplete.
dragCompleteBroadcast by the drag initiator (the component that is the source of the data that is being dragged) when the drag operation completes, either when you drop the drag data onto a drop target or when you end the drag-and-drop operation without performing a drop. You can use this event to perform any final cleanup of the drag-and- drop operation. For example, if you drag a List control item from one list to another, you can delete the List control item from the source if you no longer need it.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, dragComplete.
The event object's dragSource property contains a DragSource object that contains the drag initiator.
The event object's action property contains a String that specifies what happened at the end of the drag: DragManager.NONE, DragManager.MOVE, DragManager.COPY, or DragManager.LINK.
dragDropBroadcast by the drop target when the mouse is released over it. You use this event handler to add the drag data to the drop target.
The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, dragDrop.
The event object's dragSource property contains the DragSource object that contains the drag data.
The event object's action property contains a String that specifies the action taken during the drag operation. The dragEnter and dragOver event handlers set this value.
dragEnterBroadcast by a component when the mouse moves over the component during a drag operation. In order to be a valid drop target, you must define a handler for this event. Within the handler, you can change the appearance of the drop target to provide visual feedback to the user that the component can accept the drag. For example, you could draw a border around the drop target, or give focus to the drop target.
You may also change the type of drag action by changing the action property of the event object. The default action is mx.managers.DragManager.MOVE. If you change the action property also set handled=true.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, dragEnter.
The event object's dragSource property contains the DragSource object that contains the drag data.
The event object's handled property contains a Boolean value that the event handler must set to true if the drag is accepted.
The event object's action property contains a String that the event handler sets to show the correct feedback pointer during the drag. Possible values are DragManager.MOVE, DragManager.COPY, DragManager.LINK, and DragManager.NONE. The default value is DragManager.MOVE.
dragExitBroadcast by the component when the user drags outside the component, but does not drop the data onto the target. Use this event to restore the drop target to its normal appearance if you modified its appearance as part of handling the dragEnter event.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, dragExit.
The event object's dragSource property contains the DragSource object that contains the drag data.
dragOverBroadcast by a component when the mouse moves while over the component during a drag operation. In order to be a valid drop target, you must define a handler for this event. Within the handler, you can change the appearance of the drop target to provide visual feedback to the user that the component can accept the drag. For example, you could draw a border around the drop target, or give focus to the drop target.
You should handle this event if you want to perform additional logic before allowing the drop, such as dropping data to various locations within the drop target, reading keyboard input to determine if the drag and drop action is a move or copy of the drag data, or providing different types of visual feedback based on the type of drag and drop action.
You may also change the type of drag action by changing the action property of the event object. The default action is mx.managers.DragManager.MOVE. If you change the action property also set handled=true.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, dragOver.
The event object's dragSource property contains the DragSource object that contains the drag data.
The event object's action property contains a String that the event handler can set to show different drag operation feedback. The default value is the value set in the dragEnter event handler.
drawBroadcast when an object has drawn its graphics. The Flash player effectively draws objects off-screen so this is the opportunity to alter the graphics before they actually become visible to the end-user. This event is broadcast in response to a call to redraw(), or when the system calls redraw() on the component in response to a call to invalidate(). Note that when you call redraw(), the draw event is broadcast before the method returns. In all other scenarios, the draw event will not be broadcast until sometime after the call to invalidate() depending on how much work the system needs to do. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, draw.
effectEndBroadcast after an effect ends. The effect will have made the last set of visual changes before this event is fired, however, those changes will not have actually been rendered on-screen. Thus you might need to use doLater() to delay any other changes you want to make until after the changes have been rendered on-screen.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, effectEnd.
effectStartBroadcast just before an effect starts. The effect will not start changing any visuals until after this event is fired. The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, effectStart.
hideBroadcast when an object's state changes from visible to invisible. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, hide.
hideToolTipBroadcast by the component when its tooltip is about to disappear because of the hide delay. Note: The hideToolTip event is not broadcast when the user actively changes the tooltip by moving the mouse, it is only when the ToolTipManager hides the tooltip after a specified period of time.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, hideToolTip.
The event object's toolTip property contains a reference to the ToolTip that is about to disappear.
initializeBroadcast when the component has finished its construction and has all initialization properties set. Most components create all or most of their children during construction. All properties specified in the initObj parameter to createClassObject, createObject, or View.createChild, and all MXML attributes have been set on the component, but may not be fully processed. This is because after the initialization phase, the component gets a chance to process all of the properties or attributes at once instead of having to process them individually. Thus, even though a property like hScrollPolicy is set to "on", the component may not have actually created the scrollbar yet. After the initialization phase, properties are processed, the component is measured, layed out and drawn, after which the createComplete event is broadcast. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, initialize.
loadDeprecated. Broadcast when an object is loaded. Use initialize, creationComplete, progress and complete events instead of load.

This event is broadcast when the system has confirmed that all of the bytes in the SWF required to implement this object has been loaded. When an object is defined in another SWF and is being loaded by the Loader control, the load event is broadcast once the portion of the SWF that defines this object has loaded. However, this does not mean the entire SWF has loaded or that the object has finished being constructed. Also, it is difficult to capture this event since the object you would want to listen to isn't constructed so you can't call addEventListener() on it. To be notified of the status of objects being loaded from another SWF, use the progress and complete events in the Loader control.

The load event also is broadcast for each object as it is constructed even if it is defined in the same SWF as the parent object. The load event is difficult to capture here since you need to add an event listener to it during its construction. It is better to use the initialize and creationComplete events instead. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event.

mouseChangeSomewhereBroadcast when the user moves the mouse from one MovieClip to another. This is sometimes used to support tooltip-like interactions where the user hovers over different objects. In Flex, consider using the ToolTipManager before writing this interaction yourself.
mouseDownBroadcast when the cursor is over the component and the user clicks the mouse button. The event will only be broadcast by the component if the mouse is not also over a child of the component that has a mouseDown listener, or the component is not obscured by another component with a mouseDown listener. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, mouseDown.
mouseDownSomewhereBroadcast when the user clicks the mouse button, even if it is outside the component. This is rarely used.
mouseMoveBroadcast when the user moves the mouse while over the component. When the mouse position changes, the set of components that the mouse is over is determined and compared to the previous set. For example, suppose there is a container A that has two children, container B and container C, and container B contains component D and container C contains component E. If the mouse is over component D, it must also be over D's parent (container B) and grandparent (container A). Now if the mouse is repositioned but is still over component D mouseMove events will be broadcast by component D, container B and container A. mouseOut events are broadcast before mouseOver events which are broadcast before mouseOver events The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, mouseMove.
mouseMoveSomewhereBroadcast whenever the user moves the mouse, even if it is outside the component. This is sometimes used to support drag-like interactions where the user presses the mouse button while over a component then drags out of the component. In Flex, consider using the DragManager before writing this interaction yourself.
mouseOutBroadcast when the user moves the cursor off of the component. When the mouse position changes, the set of components that the mouse is over is determined and compared to the previous set. For example, suppose there is a container A that has two children, container B and container C, and container B contains component D and container C contains component E. If the mouse is over component D, it must also be over D's parent (container B) and grandparent (container A). Now if the mouse is repositioned so that is is over component E mouseOut events will be broadcast by component D and container B, but not for container A. mouseOut events are broadcast before mouseOver events which are broadcast before mouseOver events The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, mouseOut.
mouseOverBroadcast when the user moves the cursor over the component. When the mouse position changes, the set of components that the mouse is over is determined and compared to the previous set. For example, suppose there is a container A that has two children, container B and container C, and container B contains component D and container C contains component E. If the mouse is over component D, it must also be over D's parent (container B) and grandparent (container A). Now if the mouse is repositioned so that is is over component E mouseOver events will be broadcast by component E and container C, but not for container A. mouseOut events are broadcast before mouseOver events which are broadcast before mouseOver events The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, mouseOver.
mouseUpBroadcast when the cursor is over the component and the user releases the mouse button. The event will only be broadcast by the component if the mouse is not also over a child of the component that has a mouseUp listener, or the component is not obscured by another component with a mouseUp listener. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, mouseUp.
mouseUpSomewhereBroadcast when the user releases the mouse button, even if it is outside the component. This is sometimes used to support drag-like interactions where the user presses the mouse button while over a component then drags out of the component. In Flex, consider using the DragManager before writing this interaction yourself.
moveBroadcast when the object has moved. The component can be moved via setting the x or y properties, via a call to the move() method, or in Flex, by the LayoutManager in response to setting of the following properties either on the component or on other components such that the LayoutManager needs to change the x or y properties of the component:
  • minWidth
  • minHeight
  • preferredWidth
  • preferredHeight
  • maxWidth
  • maxHeight
Note that when you call move(), the move event is broadcast before the method returns. In all other scenarios, the move event will not be broadcast until after sometime after the property changes, depending on how much work the LayoutManager needs to do. The event object contains the following properties:
  • oldX Previous x coordinate.
  • oldY Previous y coordinate.
  • target Reference to the component that triggered the event.
  • type property contains the name of the event, move.

resizeBroadcast when the component is resized. The component can be resized via setting the width or height properties, via a call to the setSize() method, or in Flex, by the LayoutManager in response to setting of the following properties either on the component or on other components such that the LayoutManager needs to change the width or height properties of the component:
  • minWidth
  • minHeight
  • preferredWidth
  • preferredHeight
  • maxWidth
  • maxHeight
Note that when you call setSize(), the resize event is broadcast before the method returns. In all other scenarios, the resize event will not be broadcast until after sometime after the property changes, depending on how much work the LayoutManager needs to do. The event object contains the following properties:
  • oldWidth Previous width.
  • oldHeight Previous height.
  • target Reference to the component that triggered the event.
  • type property contains the name of the event, resize.

showBroadcast when an object's state changes from invisible to visible. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, show.
showToolTipBroadcast by the component after its tooltip has appeared.
The event object's target property contains a reference to the component that triggered the event.
The event object's type property contains the name of the event, showToolTip.
The event object's toolTip property contains a reference to the ToolTip that appeared.
unloadBroadcast when the object is being unloaded. This event is broadcast in response to a call to the destroyObject() method, or if it is the main object that was loaded from another SWF and that SWF is unloaded (because the Loader was given a new SWF to load). The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, unload.



Styles
color Type: Number   Format: Color   CSS Inheritance: yes
Text color of a component label.
fontFamily Type: String   CSS Inheritance: yes
Name of the font to use. Unlike a full CSS implementation comma-separated lists are not supported. Any font family name can be used. If you specify a generic font name, it will be converted to an appropriate device font.
fontSize Type: Number   Format: Length   CSS Inheritance: yes
Height of the text in pixels.
fontStyle CSS Inheritance: yes
Whether the text is italic or not. Recognized values are normal and italic. The default is normal.
fontWeight CSS Inheritance: yes
Whether the text is bold or not. Recognized values are normal and bold. The default is normal.
horizontalGap Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between children in the horizontal direction.
leading Type: Number   Format: Length   CSS Inheritance: no
Additional vertical space between lines of text. The default is 'undefined'.
marginLeft Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the container's left border and its content area.
marginRight Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between the container's right border and its content area.
textAlign CSS Inheritance: yes
Alignment of text within a container. Recognized values are left, right, or center. The default value is left.
For the Button, Link, and AccordionHeader components, the default value is center. For these components, this property is only recognized when labelPlacement property is left or right. If labelPlacement is top or bottom, the text and any icon are centered.
textDecoration CSS Inheritance: no
Determines whether the text is underlined or not. Recognized values are none and underline. The default is none.
textIndent Type: Number   Format: Length   CSS Inheritance: yes
Offset of first line of text from the left side of the container. The default is 0.
verticalGap Type: Number   Format: Length   CSS Inheritance: no
Number of pixels between children in the vertical direction.



Constructor Detail

UIObject

UIObject( )

Constructor.



Method Detail

addEventListener

addEventListener( )

Adds a listener for a particular event. The signature for this method is:
addEventListener(event:String, listener):Void


applyProperties

applyProperties( o: Object, refList: Object) :  Void

Apply a set of properties to this object. This is an advanced method for use in subclassing.
Components call this method to control the order and set of properties to be applied as a group.

Parameters
    o: Object - An object of properties to be set
    refList: Object - A object that contains the order and set of properties to be applied


buildDepthTable

buildDepthTable( )

Returns a sparsely populated array of references to the children of this object. The index of a reference is its depth. The signature of this method is:
buildDepthTable() : Array


commitProperties

commitProperties( ) :  Void

Processes the properties set on the component via MXML attributes or the initObj parameter to the createClassObject(), createObject() or View.createChild() methods. This is an advanced method for use in subclassing.
Some components have properties that affect the number or kinds of subobjects they need to create, or have properties that interact with each other, such as hScrollPolicy and hScrollPosition. It is often best at startup time to process all of these properties at one time to avoid duplicating work or ignoring certain values. You should not call this method directly. It will be called at the appropriate time by the Flex LayoutManager. At application startup, the Flex LayoutManager attempts to create all components then have them commit their properties in the order created.


constructObject2

constructObject2( initObj: Object) :  Void

Construct the object. This is an advanced method for use in subclassing.
This method is called when the component is created and effectively serves as the constructor for the object. In general, the constructObject2() method must call super.constructObject2(). The initObj contains initial properties to be set on the object. Properties that need to be handled before the super class is called should be handled and deleted from the initObj before calling the super.constructObject2. Most of the time, you will just pass initObj to the super class and process the properties after the super.constructObject2() returns.

Parameters
    initObj: Object - An object of properties or MXML attributes to be set


createAccessibilityImplementation

createAccessibilityImplementation( )

Creates and initializes the accessibility implementation for this component.

See Also
    mx.accessibility.accImpl


createChildAtDepth

createChildAtDepth( )

Creates a new instance of a symbol at an available depth based on the DepthManager flag. The signature of this method is:
createChildAtDepth(symbolName:String, depthFlag:Number, initObj:Object) : MovieClip


createChildren

createChildren( ) :  Void

Create child objects. This is an advanced method for use in subclassing.
Components implement this method to create the subobjects in the component.


createClassChildAtDepth

createClassChildAtDepth( )

Creates a new instance of a class at an available depth based on the DepthManager flag. The signature of this method is:
createChildAtDepth(symbolName:String, depthFlag:Number, initObj:Object) : MovieClip


createClassObject

createClassObject( classRef: Function, name: String, depth: Number, initObj: Object) :  mx.core.UIObject

Creates an instance of a class that derives from UIObject from its class definition as a child of this object.

Parameters
    classRef: Function - Reference to the class of the object.
    name: String - Instance name of the object.
    depth: Number - Indicates the z order of the object.
    initObj: Object - Object that contains initialization properties. styles to be initialized.

Returns
     Reference to the object.


createEmptyObject

createEmptyObject( name: String, depth: Number) :  mx.core.UIObject

Creates a blank or empty object as a child of this object.

Parameters
    name: String - Instance name of the object.
    depth: Number - Indicates the z order of the object.

Returns
     Reference to the object.


destroyObject

destroyObject( name: String) :  Void

Destroys an object that is a child of this object.

Parameters
    name: String - Instance name of the object.


dispatchEvent

dispatchEvent( )

Dispatch the event to all listeners. The signature for this method is:
dispatchEvent(eventObj:Object) : Boolean


doLater

doLater( obj: Object, fn: String, args: Array) :  Void

Queues a function to be called later. Before each update of the screen, the Flash Player calls the set of functions that are scheduled for the update. Sometimes, a function should be called in the next update to allow the rest of the code scheduled for the current update to be executed. Some features, like effects, can cause queued functions to be delayed until the feature completes.

Parameters
    obj: Object - Object that contains the function.
    fn: String - Name of the function on the object.
    args: Array - Array of arguments to pass to the function specified by the fn parameter.


draw

draw( ) :  Void

Draws the object. This is an advanced method for use in subclassing.
This method is called by the redraw() method, which is called explicitly or by the system if the object is invalidated. In general, it should not be called directly. A component should handle graphical updates that do not affect the size of the component in this method. Many components do not have a draw() method because they are entirely comprised of subcomponents so the graphics of the component are essentially updated when the subcomponents are sized and positioned in layoutChildren().


drawRect

drawRect( x1: Number, y1: Number, x2: Number, y2: Number, r) :  Void

Draws an unfilled rectangle on the screen.

Parameters
    x1: Number - Horizontal position of one corner. <b>Note:</b> (x1, y1) is one corner of the rectangle.
    y1: Number - Vertical position of one corner. <b>Note:</b> (x1, y1) is one corner of the rectangle.
    x2: Number - Horizontal position of the corner diagonally opposite the first corner. <b>Note:</b> (x2, y2) is the other corner of the rectangle.
    y2: Number - Vertical position of the corner diagonally opposite the first corner. <b>Note:</b> (x2, y2) is the other corner of the rectangle.
    r - Corner radius of the rectangle or object containing radii for each corner.


executeBindings

executeBindings( )

Flex mixin for data binding. Executes all the bindings into a UIObject component.


fillRect

fillRect( x1: Number, y1: Number, x2: Number, y2: Number, rgb: Number, alpha: Number) :  Void

Fills the rectangle on the screen.

Parameters
    x1: Number - Horizontal position of one corner. <b>Note:</b> (x1, y1) is one corner of the rectangle.
    y1: Number - Vertical position of one corner. <b>Note:</b> (x1, y1) is one corner of the rectangle.
    x2: Number - Horizontal position of the corner diagonally opposite the first corner. <b>Note:</b> (x2, y2) is the other corner of the rectangle.
    y2: Number - Vertical position of the corner diagonally opposite the first corner. <b>Note:</b> (x2, y2) is the other corner of the rectangle.
    rgb: Number - Fill color.
    alpha: Number - Transparency, where 0=transparent, and 100=opaque.


findNextAvailableDepth

findNextAvailableDepth( )

Returns the next free depth above or below a depth. Used to find a depth where it is safe to create a new object. The signature of this method is:
findNextAvailableDepth(targetDepth: Number, depthTable: Array, direction: String) : Number


getRepeaterItem

getRepeaterItem( )

Returns the item in the dataProvider that was used by the specified Repeater to produce this Repeater, or undefined if this Repeater isn't repeated. The argument whichRepeater is 0 for the outermost Repeater, 1 for the next inner Repeater, and so on. If whichRepeater is not specified, the innermost Repeater is used. The signature of this method is getRepeaterItem(whichRepeater).


getStyle

getStyle( styleProp: String)

Gets a style property. This method is moderately expensive as it may have to check parents and other CSSStyleDeclarations to determine the correct value of the style property.

Parameters
    styleProp: String - Name of the style property.

Returns
     Style value.


handleEvent

handleEvent( )

Called when an event is broadcast. The signature of this method is:
handleEvent(event:Object) : Void


init

init( ) :  Void

Initialize variables. This is an advanced method for use in subclassing.
Components should implement this method and call super.init(). The width, height, layoutWidth, layoutHeight, and many other properties will not be set until after super.init() is called.


invalidate

invalidate( ) :  Void

Marks a component so that it is redrawn on the next screen update. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the text color and size, it would be wasteful to update the color immediately after you change it and then update the size when it gets set. It is more efficient to change both properties and then render the text with its new size and color once.

Invalidation methods rarely get called. In general, setting the properties on a component automatically calls the appropriate invalidation method.


invalidateLayout

invalidateLayout( ) :  Void

Marks a component so that its layoutChildren() method gets called during a later screen update. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the width and height, it would be wasteful to update the component immediately after you change the height and then update again with the new width. It is more efficient to change both properties and then render the component with its new size once.

Invalidation methods rarely get called. In general, setting a property on a component automatically calls the appropriate invalidation method.


invalidateProperties

invalidateProperties( ) :  Void

Marks a component so that its commitProperties() method gets called during a later screen update. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the text color and size, it would be wasteful to update the color immediately after you change it and then update the size when it gets set. It is more efficient to change both properties and then render the text with its new size and color once.

Invalidation methods rarely get called. In general, setting a property on a component automatically calls the appropriate invalidation method.


invalidateSize

invalidateSize( ) :  Void

Marks a component so that its measure() method gets called during a later screen update. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the text and font size, it would be wasteful to update the text immediately after you change it and then update the size when it gets set. It is more efficient to change both properties and then render the text with its new size once.

Invalidation methods rarely get called. In general, setting a property on a component automatically calls the appropriate invalidation method.


invalidateStyle

invalidateStyle( styleProp: String) :  Void

Marks a component so that it is redrawn on the next screen update in response to a style property change, which often takes less processing than a full invalidation. Invalidation is a useful mechanism for eliminating duplicate work by delaying processing of changes to a component until a later screen update. For example, if you want to change the text color and size, it would be wasteful to update the color immediately after you change it and then update the size when it gets set. It is more efficient to change both properties and then render the text with its new size and color once.

Invalidation methods rarely get called. In general, calling setStyle() on a component automatically calls the appropriate invalidation method.

Parameters
    styleProp: String - The name of the style property.


layoutChildren

layoutChildren( )

Sizes and positions the children of a component. This is an advanced method for use in subclassing.
This method is called by the system if the object's layout is invalidated. In general, it should not be called directly. A typical layoutChildren() implementation calls the move() and setSize() methods on its children so that they fit within the layoutWidth and layoutHeight of the component. It is important to use layoutWidth and layoutHeight instead of the width and height properties in order to take into account the scaleX and scaleY of the component.


measure

measure( ) :  Void

Calculates the preferred, mininum and maximum sizes of the component. This is an advanced method for use in subclassing.
Most components calculate these values based on the content they are displaying and the properties that affect content display. A few simply have hard-coded defaults. The calculated values are not necessarily used by the enclosing container because they can be overridden a call to setSize() or by explicit setting of the following layout properties: You should not call this method directly. It will be called at the appropriate time by the Flex LayoutManager. At application startup, the Flex LayoutManager attempts to measure all components from the children to the parents before setting them to their final sizes. To override this method, you must set the _measuredPreferredHeight and _measuredPreferredWidth properties. You may optionally set the following properties: These properties correspond to the layout properties listed above and are therefore not separately documented.

The default implementation for UIObject's is just to return the current size of the component.


move

move( x: Number, y: Number, noEvent: Boolean) :  Void

Moves the object.

Parameters
    x: Number - Left position of the object.
    y: Number - Top position of the object.
    noEvent: Boolean - If true, it does not broadcast a move event.


redraw

redraw( bAlways: Boolean) :  Void

Redraws the object instead of waiting for invalidation to do so.

Parameters
    bAlways: Boolean - If false, it does not redraw if not invalidated.


removeEventListener

removeEventListener( )

Remove a listener for a particular event. The signature of this method is:
removeEventListener(event:String, listener) : Void


setDepthAbove

setDepthAbove( )

Moves this object above the input object in the z-order such that, if the two object's overlap, this object would obscure the input object. The signature of this method is:
setDepthAbove(inputObject:UIObject) : void


setDepthBelow

setDepthBelow( )

Moves this object below the input object in the z-order such that, if the two object's overlap, this object would be obscured by the input object. The signature of this method is:
setDepthBelow(inputObject:UIObject) : void


setMask

setMask( mask_mc: MovieClip)

Applies a mask, which describes the region of the component that is visible. Overrides the MovieClip's setMask() method, so it is possible to determine later whether this object has a mask.

Parameters
    mask_mc: MovieClip - Mask that is currently applied to this object.


setSize

setSize( w: Number, h: Number, noEvent: Boolean) :  Void

Sizes the object. The setSize() method also sets the following properties so that the layout managers do not resize the object to its original size:

Parameters
    w: Number - Width of the object.
    h: Number - Height of the object.
    noEvent: Boolean - If true, it does not broadcast resize event.


setSizeNoLayout

setSizeNoLayout( w: Number, h: Number, noEvent: Boolean) :  Void

Sizes the object. The setSizeNoLayout() method does not set the preferredWidth and preferredHeight properties, so a future layout calculation may result in the object returning to its previous size. This method is used primarily by Effects and Layout managers.

Parameters
    w: Number - Width of the object.
    h: Number - Height of the object.
    noEvent: Boolean - If true, it does not broadcast resize event.


setStyle

setStyle( )

Sets a style property. Use this method sparingly because it results in a lot of processing. The signature of this method is: setStyle(styleProp:String, newValue) : Void


swapDepths

swapDepths( target) :  Void

Exchanges the z-order of the component with another component. Overrides the MovieClip's swapDepths() method, so you can send an event when an object's depth changes. You cannot use this method with the Panel or TitleWindow containers. Use the setDepthBelow() and setDepthAbove() methods instead.

Parameters
    target - UIObject to swap with.



Property Detail

alpha

alpha: Number  

Determines how transparent a component is. Values range from 0, which inidicates the component is invisible, to 100, which indicates the component is opaque. Device fonts do not honor alpha setting, although embedded fonts do. The default value is 100.


baselinePosition

baselinePosition: Number   [Read-Only]

Determines the baseline y-coordinate of the first line of text of the component. Each component should override this property.


className

className: String  

Name of component class. This property is also used in calculating style values. If _global.styles[className] exists, it set the defaults for a component if not otherwise specified.


depth

depth: Number   [Read-Only]

The MovieClip depth of the UIObject instance, which determines the z-ordering.


documentDescriptor

documentDescriptor: Object   [Read-Only]

For a document object, which is an instance of a UIObject at the top of the hierarchy of a Flex application, MXML component, or ActionScript component, the documentDescriptor property is a reference to the descriptor at the top of the autogenerated descriptor tree for that document, which describes the set of children and their attributes for that document. For other UIObjects, it is undefined.


height

height: Number  

Number that specifies the height of the component, in pixels, in the parent's coordinates. Setting this property causes a resize event. See the resize event for details on when this event is broadcast. If the component's scaleY property is not 100, the height of the component from its internal coordinates will not match. Thus a 100 pixel high component with a scaleX of 200 will take 100 pixels in the parent, but will internally think it is 50 pixels high. See the layoutHeight property for more information.


heightFlex

heightFlex: Number  

This property has been deprecated. For flexible heights, please set height to a percentage value.

Used to control the resizability of this object. If the heightFlex is zero, then the object is always sized using its preferredHeight. If the heightFlex is a positive number, then the object will stretch to consume unused space in its parent container, or it will shrink in order to fit in its surrounding container.

If two or more siblings have non-zero values for their heightFlex properties, then the objects are grown (or shrunk) in proportion to their heightFlex.

Consider the following example:

     <HBox height="500"> 
<Button label="Hi" heightFlex="3"/>
<Button label="Hello There" heightFlex="1"/>
</HBox>

The heights of the two buttons are calculated as follows:

First, Flex calculates the preferredHeight for each button. Suppose that the first Button has a preferredHeight of 75 and the second has a preferredHeight of 125.
After allocating each Button its preferredHeight, Flex discovers that the HBox has (500 - 75 - 125 =) 300 pixels of excess space.
The excess space is divided in proportion to the Buttons' heightFlex. The first Button is given (300 (3/4) =) 225 extra pixels, for total of 300 pixels. The second Button is given (300 (1/4) =) 75 extra pixels, for a total height of 200 pixels.
If the HBox's height had been 160 pixels, both buttons would have shrunk in proportion to their heightFlex. The first button would have shrunk by 30 pixels, and the second would have shrunk by 10 pixels.


id

id: String  

MXML ID of this UIObject instance. If no ID has been assigned, this property is the empty string.


instanceIndices

instanceIndices: Array  

An Array that contains the indices required to reference a Repeater from its parent document. The Array is empty unless the Repeater is within one or more Repeaters. The first element corresponds to the outermost Repeater. For example, if the ID is "r" and instanceIndices is [2,4], you reference it on the document as r[2][4].


isDocument

isDocument: Boolean   [Read-Only]

Determines whether this UIObject instance is a document object, that is, whether it is at the top of the hierarchy of a Flex application, MXML component, or ActionScript component.


kStretch

static  kStretch: Number  

Number used to indicate stretchability in the preferredWidth and preferredHeight. The default value is 5000.


layoutHeight

layoutHeight: Number  

Number that specifies the height of the component, in pixels, in the component's coordinates. You should not set this property directly. It is calculated from the height and scaleY properties of a component as those properties are changed either directly or via a call to the setSize() method. It is important that a component use this property when laying out its children because if the scaleY property is not 100, the height of the component will not match its layoutHeight, and the component will not appear properly if it is not layed out according to its layoutHeight. Thus a 100 pixel high component with a scaleY of 200 will take 100 pixels in the parent and have a height of 100, but will have a layoutHeight of 50 pixels.


layoutWidth

layoutWidth: Number  

Number that specifies the width of the component, in pixels, in the component's coordinates. You should not set this property directly. It is calculated from the width and scaleX properties of a component as those properties are changed either directly or via a call to the setSize() method. It is important that a component use this property when laying out its children because if the scaleX property is not 100, the width of the component will not match its layoutWidth, and the component will not appear properly if it is not layed out according to its layoutWidth. Thus a 100 pixel wide component with a scaleX of 200 will take 100 pixels in the parent and have a width of 100, but will have a layoutWidth of 50 pixels.


maxHeight

maxHeight: Number  

Number that specifies the maximum height of the component, in pixels, in the component's coordinates. This value is used by the container in calculating the size and position of the component. It is not used by the component itself in determining its default size. Thus this property may not have any effect if parented by mx.containers.Container, or containers that don't factor in this property. Because the value is in component coordinates the true maxHeight of with respect to its parent is affected by the scaleY property. Some components have no theoretical limit to their height. In those cases their maxHeight will be set to UIObject.kStretch.


maxWidth

maxWidth: Number  

Number that specifies the maximum width of the component, in pixels, in the component's coordinates. This value is used by the container in calculating the size and position of the component. It is not used by the component itself in determining its default size. Thus this property may not have any effect if parented by mx.containers.Container, or containers that don't factor in this property. Because the value is in component coordinates the true maxWidth of with respect to its parent is affected by the scaleX property. Some components have no theoretical limit to their height. In those cases their maxWidth will be set to UIObject.kStretch.


minHeight

minHeight: Number  

Number that specifies the minimum height of the component, in pixels, in the component's coordinates. This value is used by the container in calculating the size and position of the component. It is not used by the component itself in determining its default size. Thus this property may not have any effect if parented by mx.containers.Container, or containers that don't factor in this property. Because the value is in component coordinates the true minHeight of with respect to its parent is affected by the scaleY property.


minWidth

minWidth: Number  

Number that specifies the minimum width of the component, in pixels, in the component's coordinates. This value is used by the container in calculating the size and position of the component. It is not used by the component itself in determining its default size. Thus this property may not have any effect if parented by mx.containers.Container, or containers that don't factor in this property. Because the value is in component coordinates the true minWidth of with respect to its parent is affected by the scaleX property.


mouseX

mouseX: Number   [Read-Only]

Horizontal coordinate of the mouse pointer's location in the coordinate system of this UIObject instance.


mouseY

mouseY: Number   [Read-Only]

Vertical coordinate of the mouse pointer's location in the coordinate system of this UIObject instance.


nestLevel

nestLevel: Number  

Depth of this object in the containment hierarchy. This number is used by the measurement and layout code.


oldHeight

oldHeight: Number  

Height before the height property was last changed.


oldWidth

oldWidth: Number  

Width before the width property was last changed.


oldX

oldX: Number  

The x value before the x property was last changed.


oldY

oldY: Number  

The y value before the y property was last changed.


parent

parent: Object   [Read-Only]

The parent container or component for this component. Only UIObjects should have a parent property. Non-UIObjects should use another property to reference the object to which they belong. By convention, Non-UIObjects use "owner" to point to the object to which they belong.


parentApplication

parentApplication: Object   [Read-Only]

A reference to the Application object that contains this UIObject instance. This Application object might exist in a Loader in another Application, and so on, creating a chain of Application objects that can be walked using parentApplication. The parentApplication of an Application is never itself; it is either the Application into which it was loaded or undefined (for the top-level Application). Walking the application chain using the parentApplication property is similar to walking the document chain using the parentDocument property. You can access the top-level application using the application property of the Application class.


parentDocument

parentDocument: Object   [Read-Only]

A reference to the parent document object for this UIObject. A document object is a UIObject at the top of the hierarchy of a Flex application, MXML component, or AS component. For the Application object, parentDocument is undefined. This property is useful in MXML scripts to go up a level in the chain of document objects. It can be used to walk this chain using parentDocument.parentDocument, and so on. It is typed as Object so that authors can access properties and methods on ancestor document objects without casting.


percentHeight

percentHeight: Number   [Read-Only]

Number that specifies the height of a component in percent relative to its parents size. If the height of the parent was set to a pixel value then obtaining percentHeight will return 'undefined'. This property will return the numeric portion of a previous height percentage setting, it does NOT reflect the exact size of the component in percent.


percentWidth

percentWidth: Number   [Read-Only]

Number that specifies the width of a component in percent relative to its parents size. If the width of the parent was set to a pixel value then obtaining percentWidth will return 'undefined'. This property will return the numeric portion of a previous width percentage setting, it does NOT reflect the exact size of the component in percent.


preferredHeight

preferredHeight: Number  

Number that specifies the preferred height of the component, in pixels, in the component's coordinates. This value is used by the container in calculating the size and position of the component. It is not used by the component itself in determining its default size. Thus this property may not have any effect if parented by mx.containers.Container, or containers that don't factor in this property. Because the value is in component coordinates the true preferredHeight of with respect to its parent is affected by the scaleY property.


preferredWidth

preferredWidth: Number  

Number that specifies the preferred width of the component, in pixels, in the component's coordinates. This value is used by the container in calculating the size and position of the component. It is not used by the component itself in determining its default size. Thus this property may not have any effect if parented by mx.containers.Container, or containers that don't factor in this property. Because the value is in component coordinates the true preferredWidth of with respect to its parent is affected by the scaleX property.


repeaterIndices

repeaterIndices: Array  

An array that contains the indices of the items in the dataProviders of the Repeaters in the parent document that produced this Repeater. The array is empty unless this Repeater is within one or more Repeaters. The first element corresponds to the outermost Repeater. For example, if repeaterIndices is [2,4], it means that the outer repeater used item dataProvider[2] and the inner repeater used item dataProvider[4]. This property differs from instanceIndices if the startingIndex of any of the Repeaters is not 0. For example, even if a Repeater starts at dataProvider item 4, the document reference of the first repeated object is b[0], not b[4].


scaleX

scaleX: Number  

Number that specifies the horizontal scaling percentage. The default value is 100, which means that the object is not scaled. A scaleX of 200 means the object has been magnified by a factor of 2, and a scaleX of 50 means the object has been reduced by a factor of 2.


scaleY

scaleY: Number  

Number that specifies the vertical scaling percentage. The default value is 100, which means that the object is not scaled. A scaleY of 200 means the object has been magnified by a factor of 2, and a scaleY of 50 means the object has been reduced by a factor of 2.


styleName

styleName: var  

CSSStyleDeclaration or pointer to parent to be used by component in calculating style values.


tabEnabled

tabEnabled: Boolean  

If true, object can receive focus. UIObjects are not supposed to receive focus, so the default value is false


toolTip

toolTip: String  

Text to display in the ToolTip.


version

static  version: String  

Version string for this class.


visible

visible: Boolean  

If true, the object is visible. When setting to true, the object will broadcast a show event. When setting to false, the object will broadcast a hide event. In either case the children of the object will not emit a show or hide event unless the object has specifically written an implementation to do so.


width

width: Number  

Number that specifies the width of the component, in pixels, in the parent's coordinates. Setting this property causes a resize event. See the resize event for details on when this event is broadcast. If the component's scaleX property is not 100, the width of the component from its internal coordinates will not match. Thus a 100 pixel wide component with a scaleX of 200 will take 100 pixels in the parent, but will internally think it is 50 pixels wide. See the layoutWidth property for more information.


widthFlex

widthFlex: Number  

This property has been deprecated. For flexible widths, please set width to a percentage value.

Used to control the resizability of this object. If the widthFlex is zero, then the object is always sized using its preferredWidth. If the widthFlex is a positive number, then the object will stretch to consume unused space in its parent container, or it will shrink in order to fit in its surrounding container.

If two or more siblings have non-zero values for their widthFlex properties, then the objects are grown (or shrunk) in proportion to their widthFlex.

Consider the following example:

     <HBox width="500"> 
<Button label="Hi" widthFlex="3"/>
<Button label="Hello There" widthFlex="1"/>
</HBox>

The widths of the two buttons are calculated as follows:

First, Flex calculates the preferredWidth for each button. Suppose that the first Button has a preferredWidth of 75 and the second has a preferredWidth of 125.
After allocating each Button its preferredWidth, Flex discovers that the HBox has (500 - 75 - 125 =) 300 pixels of excess space.
The excess space is divided in proportion to the Buttons' widthFlex. The first Button is given (300 (3/4) =) 225 extra pixels, for total of 300 pixels. The second Button is given (300 (1/4) =) 75 extra pixels, for a total width of 200 pixels.
If the HBox's width had been 160 pixels, both buttons would have shrunk in proportion to their widthFlex. The first button would have shrunk by 30 pixels, and the second would have shrunk by 10 pixels.


x

x: Number  

Number that specifies the component's x position within its parent container. Setting this property directly or calling move() will have no effect or only a temporary effect if the component is parented by a layout container such as HBox, Grid, and Form because the layout calculations of those containers set the x position to the results of the calculation. However, the x property must almost always be set when the parent is a Canvas or other absolute- positioning container because the default value is 0.


y

y: Number  

Number that specifies the component's y position within its parent container. Setting this property directly or calling move() will have no effect or only a temporary effect if the component is parented by a relative-layout container such as HBox, Grid, and Form because the layout calculations of those containers will eventually set the y position to the results of the calculation. However, the y property must almost always be set when the parent is a Canvas or other absolute- positioning container because the default value is 0.


Comments


smgilson said on Mar 9, 2005 at 12:38 PM :
UIObject has two additional methods that you can override in your custom components to control how the component responds to validation failures or validation successes. The signature of these two methods is:

Public function validationFailed(validationFailedEvent:ValidationFailedEvent);

Public function validationSucceeded(validationSucceededEvent: Object);

Stephen Gilson
Flex Doc
halL said on Mar 22, 2005 at 12:08 PM :
You can also specify the height and width properties using percentage values, such as "100%" or "50%". These values specify the height or width as a percentage of the component's parent container dimension. For Application controls, the value is a percentage of the browser width.

Specifying a percentage value makes the component resizable.

Output values for the height and width properties are always in pixels, even if you set the value using a percentage.
serrault said on Jul 29, 2005 at 7:23 PM :
Not sure if it is the intended behavior, or a bug, but the value of textAlign can cause some varying display results:

textAlign="right" - when entering text into, for example textInput, once the maximum number of characters that can be displayed is reached the control will continue to accept input, but will not slide to the left so as to show the end of the string. It is therefore impossible to visually determine if an item is truncated or continues on past the the last visable character .

textAlign="center" - contrary to the above, when the maximum number of characters is reached the control will scroll to the left, with the cursor remaining relatively centered during entry. Should the user, however, decrease (backspace) the number of characters back to a length that can be fully displayed the value of textAlign appears to have been changed to "left" and will not return to "center"

textAlign="left" - appears normal
danger42 said on Aug 4, 2005 at 7:11 AM :
This might be a bug. Please file a report here:
http://www.macromedia.com/cfusion/mmform/index.cfm?name=wishform&product=20&6213=35

Thanks!

matt horn
flex docs
jonwillis said on Jun 7, 2006 at 12:13 PM :
The word "indicates" is misspelled in the second sentence of the property description for "alpha."

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flex/15/asdocs_en/mx/core/UIObject.html