| Methods | Properties | Effects | Events | Styles | Frames | No Frames |
Direct Known Subclasses
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)
:
VoidApply a set of properties to this object. |
| buildDepthTable
Returns a sparsely populated array of references to the children of this object. |
| commitProperties(
)
:
VoidProcesses the properties set on the component via MXML attributes or the initObj parameter to the createClassObject(), createObject() or View.createChild() methods. |
| constructObject2(
initObj:
Object)
:
VoidConstruct 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(
)
:
VoidCreate 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.UIObjectCreates 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.UIObjectCreates a blank or empty object as a child of this object. |
| destroyObject(
name:
String)
:
VoidDestroys an object that is a child of this object. |
| dispatchEvent
Dispatch the event to all listeners. |
| doLater(
obj:
Object, fn:
String, args:
Array)
:
VoidQueues a function to be called later. |
| draw(
)
:
VoidDraws the object. |
| drawRect(
x1:
Number, y1:
Number, x2:
Number, y2:
Number, r)
:
VoidDraws 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)
:
VoidFills 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(
)
:
VoidInitialize variables. |
| invalidate(
)
:
VoidMarks a component so that it is redrawn on the next screen update. |
| invalidateLayout(
)
:
VoidMarks a component so that its layoutChildren() method gets called during a later screen update. |
| invalidateProperties(
)
:
VoidMarks a component so that its commitProperties() method gets called during a later screen update. |
| invalidateSize(
)
:
VoidMarks a component so that its measure() method gets called during a later screen update. |
| invalidateStyle(
styleProp:
String)
:
VoidMarks 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(
)
:
VoidCalculates the preferred, mininum and maximum sizes of the component. |
| move(
x:
Number, y:
Number, noEvent:
Boolean)
:
VoidMoves the object. |
| redraw(
bAlways:
Boolean)
:
VoidRedraws 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)
:
VoidSizes the object. |
| setSizeNoLayout(
w:
Number, h:
Number, noEvent:
Boolean)
:
VoidSizes the object. |
| setStyle
Sets a style property. |
| swapDepths(
target)
:
VoidExchanges 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:
StringName 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:
NumberNumber that specifies the height of the component, in pixels, in the parent's coordinates. |
| heightFlex:
NumberThis property has been deprecated. |
| id:
StringMXML 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. |
static | kStretch:
NumberNumber used to indicate stretchability in the preferredWidth and preferredHeight. |
| layoutHeight:
NumberNumber that specifies the height of the component, in pixels, in the component's coordinates. |
| layoutWidth:
NumberNumber that specifies the width of the component, in pixels, in the component's coordinates. |
| maxHeight:
NumberNumber that specifies the maximum height of the component, in pixels, in the component's coordinates. |
| maxWidth:
NumberNumber that specifies the maximum width of the component, in pixels, in the component's coordinates. |
| minHeight:
NumberNumber that specifies the minimum height of the component, in pixels, in the component's coordinates. |
| minWidth:
NumberNumber 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:
NumberDepth of this object in the containment hierarchy. |
| oldHeight:
NumberHeight before the height property was last changed. |
| oldWidth:
NumberWidth before the width property was last changed. |
| oldX:
NumberThe x value before the x property was last changed. |
| oldY:
NumberThe 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:
NumberNumber that specifies the preferred height of the component, in pixels, in the component's coordinates. |
| preferredWidth:
NumberNumber 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:
NumberNumber that specifies the horizontal scaling percentage. |
| scaleY:
NumberNumber that specifies the vertical scaling percentage. |
| styleName:
varCSSStyleDeclaration 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. |
static | version:
StringVersion string for this class. |
| visible:
BooleanIf true, the object is visible. |
| width:
NumberNumber that specifies the width of the component, in pixels, in the parent's coordinates. |
| widthFlex:
NumberThis property has been deprecated. |
| x:
NumberNumber that specifies the component's x position within its parent container. |
| y:
NumberNumber that specifies the component's y position within its parent container. |
| Effects | |
creationCompleteEffect | Component is created. |
hideEffect | Component becomes invisible. |
mouseDownEffect | User presses the mouse button while over the component. |
mouseOutEffect | User rolls the mouse so it is no longer over the component. |
mouseOverEffect | User rolls the mouse over the component. |
mouseUpEffect | User releases the mouse button. |
moveEffect | Component is moved. |
resizeEffect | Component is resized. |
showEffect | Component becomes visible. |
| Events | |
creationComplete | Broadcast 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. |
dragComplete | Broadcast 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. |
dragDrop | Broadcast 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. |
dragEnter | Broadcast 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. |
dragExit | Broadcast 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. |
dragOver | Broadcast 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. |
draw | Broadcast 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. |
effectEnd | Broadcast 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. |
effectStart | Broadcast 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. |
hide | Broadcast 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. |
hideToolTip | Broadcast 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. |
initialize | Broadcast 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. |
load | Deprecated. 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. |
mouseChangeSomewhere | Broadcast 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. |
mouseDown | Broadcast 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. |
mouseDownSomewhere | Broadcast when the user clicks the mouse button, even if it is outside the component. This is rarely used. |
mouseMove | Broadcast 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. |
mouseMoveSomewhere | Broadcast 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. |
mouseOut | Broadcast 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. |
mouseOver | Broadcast 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. |
mouseUp | Broadcast 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. |
mouseUpSomewhere | Broadcast 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. |
move | Broadcast 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:
|
resize | Broadcast 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:
|
show | Broadcast 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. |
showToolTip | Broadcast 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. |
unload | Broadcast 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:
yesText color of a component label. |
fontFamily |
Type:
String
CSS Inheritance:
yesName 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:
yesHeight of the text in pixels. |
fontStyle |
CSS Inheritance:
yesWhether the text is italic or not. Recognized values are normal and italic. The default is normal. |
fontWeight |
CSS Inheritance:
yesWhether the text is bold or not. Recognized values are normal and bold. The default is normal. |
horizontalGap |
Type:
Number
Format:
Length
CSS Inheritance:
noNumber of pixels between children in the horizontal direction. |
leading |
Type:
Number
Format:
Length
CSS Inheritance:
noAdditional vertical space between lines of text. The default is 'undefined'. |
marginLeft |
Type:
Number
Format:
Length
CSS Inheritance:
noNumber of pixels between the container's left border and its content area. |
marginRight |
Type:
Number
Format:
Length
CSS Inheritance:
noNumber of pixels between the container's right border and its content area. |
textAlign |
CSS Inheritance:
yesAlignment 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:
noDetermines whether the text is underlined or not. Recognized values are none and underline. The default is none. |
textIndent |
Type:
Number
Format:
Length
CSS Inheritance:
yesOffset of first line of text from the left side of the container. The default is 0. |
verticalGap |
Type:
Number
Format:
Length
CSS Inheritance:
noNumber of pixels between children in the vertical direction. |
| Constructor Detail |
UIObject(
)
| Method Detail |
addEventListener(
)
addEventListener(event:String, listener):Void
applyProperties(
o:
Object, refList:
Object)
:
Void
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() : Array
commitProperties(
)
:
Void
constructObject2(
initObj:
Object)
:
Void
Parameters
initObj:
Object - An object of properties or MXML attributes to be set
createAccessibilityImplementation(
)
See Also
mx.accessibility.accImpl
createChildAtDepth(
)
createChildAtDepth(symbolName:String, depthFlag:Number, initObj:Object) : MovieClip
createChildren(
)
:
Void
createClassChildAtDepth(
)
createChildAtDepth(symbolName:String, depthFlag:Number, initObj:Object) : MovieClip
createClassObject(
classRef:
Function, name:
String, depth:
Number, initObj:
Object)
:
mx.core.UIObject
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(
name:
String, depth:
Number)
:
mx.core.UIObject
Parameters
name:
String - Instance name of the object.
depth:
Number - Indicates the z order of the object.
Returns
Reference to the object.
destroyObject(
name:
String)
:
Void
Parameters
name:
String - Instance name of the object.
dispatchEvent(
)
dispatchEvent(eventObj:Object) : Boolean
doLater(
obj:
Object, fn:
String, args:
Array)
:
Void
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(
)
:
Void
drawRect(
x1:
Number, y1:
Number, x2:
Number, y2:
Number, r)
:
Void
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(
)
fillRect(
x1:
Number, y1:
Number, x2:
Number, y2:
Number, rgb:
Number, alpha:
Number)
:
Void
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(targetDepth: Number, depthTable: Array, direction: String) : Number
getRepeaterItem(
)
getRepeaterItem(whichRepeater).
getStyle(
styleProp:
String)
Parameters
styleProp:
String - Name of the style property.
Returns
Style value.
handleEvent(
)
handleEvent(event:Object) : Void
init(
)
:
Void
invalidate(
)
:
Void
Invalidation methods rarely get called. In general, setting the properties on a component automatically calls the appropriate invalidation method.
invalidateLayout(
)
:
Void
Invalidation methods rarely get called. In general, setting a property on a component automatically calls the appropriate invalidation method.
invalidateProperties(
)
:
Void
Invalidation methods rarely get called. In general, setting a property on a component automatically calls the appropriate invalidation method.
invalidateSize(
)
:
Void
Invalidation methods rarely get called. In general, setting a property on a component automatically calls the appropriate invalidation method.
invalidateStyle(
styleProp:
String)
:
Void
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(
)
measure(
)
:
Void
The default implementation for UIObject's is just to return the current size of the component.
move(
x:
Number, y:
Number, noEvent:
Boolean)
:
Void
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(
bAlways:
Boolean)
:
Void
Parameters
bAlways:
Boolean - If false, it does not redraw if not invalidated.
removeEventListener(
)
removeEventListener(event:String, listener) : Void
setDepthAbove(
)
setDepthAbove(inputObject:UIObject) : void
setDepthBelow(
)
setDepthBelow(inputObject:UIObject) : void
setMask(
mask_mc:
MovieClip)
Parameters
mask_mc:
MovieClip - Mask that is currently applied to this object.
setSize(
w:
Number, h:
Number, noEvent:
Boolean)
:
Void
Parameters
w:
Number - Width of the object.
h:
Number - Height of the object.
noEvent:
Boolean - If true, it does not broadcast resize event.
setSizeNoLayout(
w:
Number, h:
Number, noEvent:
Boolean)
:
Void
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(styleProp:String, newValue) : Void
swapDepths(
target)
:
Void
setDepthBelow() and setDepthAbove() methods instead.
Parameters
target - UIObject to swap with.
| Property Detail |
alpha:
Number
baselinePosition:
Number
[Read-Only]
className:
String
depth:
Number
[Read-Only]
documentDescriptor:
Object
[Read-Only]
height:
Number
heightFlex:
Number
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:
String
instanceIndices:
Array
isDocument:
Boolean
[Read-Only]
static
kStretch:
Number
layoutHeight:
Number
layoutWidth:
Number
maxHeight:
Number
maxWidth:
Number
minHeight:
Number
minWidth:
Number
mouseX:
Number
[Read-Only]
mouseY:
Number
[Read-Only]
nestLevel:
Number
oldHeight:
Number
oldWidth:
Number
oldX:
Number
oldY:
Number
parent:
Object
[Read-Only]
parentApplication:
Object
[Read-Only]
parentDocument:
Object
[Read-Only]
percentHeight:
Number
[Read-Only]
percentWidth:
Number
[Read-Only]
preferredHeight:
Number
preferredWidth:
Number
repeaterIndices:
Array
scaleX:
Number
scaleY:
Number
styleName:
var
tabEnabled:
Boolean
toolTip:
String
static
version:
String
visible:
Boolean
width:
Number
widthFlex:
Number
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:
Number
y:
Number
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
Comments
smgilson said on Mar 9, 2005 at 12:38 PM : halL said on Mar 22, 2005 at 12:08 PM : serrault said on Jul 29, 2005 at 7:23 PM : danger42 said on Aug 4, 2005 at 7:11 AM : jonwillis said on Jun 7, 2006 at 12:13 PM :