Packagespark.primitives.supportClasses
Classpublic class GraphicElement
InheritanceGraphicElement Inheritance EventDispatcher Inheritance Object
Implements IGraphicElement, IInvalidating, ILayoutElement, IVisualElement, IID
Subclasses BitmapImage, StrokedElement

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

A base class for defining individual graphic elements. Types of graphic elements include:

When defining a graphic element, you specify an explicit size for the element; that is, you cannot use percentage sizing as you can when specifying the size of a control.

The TBounds are the boundaries of an object in the object's parent coordinate space. The UBounds are the boundaries of an object in its own coordinate space.

If you set the transform.matrix declaratively in MXML, then it will override the values of any transform properties (rotation, scaleX, scaleY, x, and y). If you set the transform.matrix or the transform properties in ActionScript, then the last value set will be used.



Public Properties
 PropertyDefined By
  alpha : Number
GraphicElement
  baseline : Object
The vertical distance in pixels from the anchor target to the control's baseline position.
GraphicElement
  baselinePosition : Number
[read-only] The y-coordinate of the baseline of the first line of text of the component.
GraphicElement
  blendMode : String
A value from the BlendMode class that specifies which blend mode to use.
GraphicElement
  bottom : Object
The vertical distance in pixels from the bottom edge of the component to the anchor target's bottom edge.
GraphicElement
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  depth : Number
Determines the order in which items inside of containers are rendered.
GraphicElement
  designLayer : DesignLayer
Specifies the optional DesignLayer instance associated with this visual element.
GraphicElement
  displayObject : DisplayObject
[read-only] The shared DisplayObject where this IGraphicElement is drawn.
GraphicElement
  displayObjectSharingMode : String
GraphicElement
  explicitHeight : Number
Number that specifies the explicit height of the component, in pixels, in the component's coordinates.
GraphicElement
  explicitMaxHeight : Number
The maximum recommended height of the component to be considered by the parent during layout.
GraphicElement
  explicitMaxWidth : Number
The maximum recommended width of the component to be considered by the parent during layout.
GraphicElement
  explicitMinHeight : Number
The minimum recommended height of the component to be considered by the parent during layout.
GraphicElement
  explicitMinWidth : Number
The minimum recommended width of the component to be considered by the parent during layout.
GraphicElement
  explicitWidth : Number
Number that specifies the explicit width of the component, in pixels, in the component's coordinates.
GraphicElement
  filters : Array
An indexed array that contains each filter object currently associated with the graphic element.
GraphicElement
  hasLayoutMatrix3D : Boolean
[read-only] True if the element has 3D Matrix.
GraphicElement
  height : Number
The height of the graphic element.
GraphicElement
  horizontalCenter : Object
The horizontal distance in pixels from the center of the component to the center of the anchor target's content area.
GraphicElement
  id : String
The identity of the component.
GraphicElement
  includeInLayout : Boolean
Specifies whether this element is included in the layout of the group.
GraphicElement
  is3D : Boolean
[read-only] True, when the element is in 3D.
GraphicElement
  left : Object
The horizontal distance in pixels from the left edge of the component to the anchor target's left edge.
GraphicElement
  luminosityClip : Boolean
Documentation is not currently available.
GraphicElement
  luminosityInvert : Boolean
Documentation is not currently available.
GraphicElement
  mask : DisplayObject
The calling display object is masked by the specified mask object.
GraphicElement
  maskType : String
The maskType defines how the mask is applied to the GraphicElement. The possible values are MaskType.CLIP and MaskType.ALPHA. Clip Masking When masking in clip mode, a clipping masks is reduced to 1-bit.
GraphicElement
  maxHeight : Number
The maximum recommended height of the component to be considered by the parent during layout.
GraphicElement
  maxWidth : Number
The maximum recommended width of the component to be considered by the parent during layout.
GraphicElement
  measuredHeight : Number
The default height of the component, in pixels.
GraphicElement
  measuredWidth : Number
The default width of the component, in pixels.
GraphicElement
  measuredX : Number
The default measured bounds top-left corner relative to the origin of the element.
GraphicElement
  measuredY : Number
The default measured bounds top-left corner relative to the origin of the element.
GraphicElement
  minHeight : Number
The minimum recommended height of the component to be considered by the parent during layout.
GraphicElement
  minWidth : Number
The minimum recommended width of the component to be considered by the parent during layout.
GraphicElement
  owner : DisplayObjectContainer
The owner of this IVisualElement object.
GraphicElement
  parent : DisplayObjectContainer
[read-only] The parent container or component for this component.
GraphicElement
  percentHeight : Number
Number that specifies the height of a component as a percentage of its parent's size.
GraphicElement
  percentWidth : Number
Number that specifies the width of a component as a percentage of its parent's size.
GraphicElement
  postLayoutTransformOffsets : mx.geom:TransformOffsets
GraphicElement
 Inheritedprototype : Object
[static] A reference to the prototype object of a class or function object.
Object
  right : Object
The horizontal distance in pixels from the right edge of the component to the anchor target's right edge.
GraphicElement
  rotation : Number
Indicates the rotation of the element, in degrees, from the transform point.
GraphicElement
  rotationX : Number
Indicates the x-axis rotation of the element instance, in degrees, from its original orientation relative to the 3D parent container.
GraphicElement
  rotationY : Number
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
GraphicElement
  rotationZ : Number
Indicates the rotation of the element, in degrees, from the transform point.
GraphicElement
  scaleX : Number
The horizontal scale (percentage) of the element as applied from the transform point.
GraphicElement
  scaleY : Number
The vertical scale (percentage) of the element as applied from the transform point.
GraphicElement
  scaleZ : Number
The z scale (percentage) of the element as applied from the transform point.
GraphicElement
  top : Object
The vertical distance in pixels from the top edge of the component to the anchor target's top edge.
GraphicElement
  transform : flash.geom:Transform
GraphicElement
  transformX : Number
The x position transform point of the element.
GraphicElement
  transformY : Number
The y position transform point of the element.
GraphicElement
  transformZ : Number
The z position transform point of the element.
GraphicElement
  verticalCenter : Object
The vertical distance in pixels from the center of the component to the center of the anchor target's content area.
GraphicElement
  visible : Boolean
Controls the visibility of this visual element.
GraphicElement
  width : Number
The width of the graphic element.
GraphicElement
  x : Number
The x position of the graphic element.
GraphicElement
  y : Number
The y position of the graphic element.
GraphicElement
  z : Number
The z position of the graphic element.
GraphicElement
Protected Properties
 PropertyDefined By
  drawnDisplayObject : DisplayObject
[read-only] The actual DisplayObject that is drawn into by the GraphicElement.
GraphicElement
  drawX : Number
[read-only] The x position where the element should be drawn.
GraphicElement
  drawY : Number
[read-only] The y position where the element should be drawn.
GraphicElement
  hasComplexLayoutMatrix : Boolean
[read-only] Returns true if the GraphicElement has any non-translation (x,y) transform properties
GraphicElement
  layoutFeatures : AdvancedLayoutFeatures
Contain all of the implementation details of how the GraphicElement implements transform and layering support.
GraphicElement
  needsDisplayObject : Boolean
[read-only] True if the element requires an exclusive DisplayObject.
GraphicElement
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
  
Return true if this IGraphicElement is compatible and can share display objects with the next IGraphicElement in the sequence.
GraphicElement
  
Return true if this IGraphicElement is compatible and can share display objects with the previous IGraphicElement in the sequence.
GraphicElement
  
Creates a new DisplayObject where this IGraphicElement is drawn.
GraphicElement
 Inherited
Dispatches an event into the event flow.
EventDispatcher
  
getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Returns the x coordinate of the element's bounds at the specified element size.
GraphicElement
  
getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Returns the y coordinate of the element's bounds at the specified element size.
GraphicElement
  
getLayoutBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's layout height.
GraphicElement
  
getLayoutBoundsWidth(postLayoutTransform:Boolean = true):Number
GraphicElement
  
getLayoutBoundsX(postLayoutTransform:Boolean = true):Number
Returns the x coordinate that the element uses to draw on screen.
GraphicElement
  
getLayoutBoundsY(postLayoutTransform:Boolean = true):Number
Returns the y coordinate that the element uses to draw on screen.
GraphicElement
  
Returns the transform matrix that is used to calculate the component's layout relative to its siblings.
GraphicElement
  
Returns the layout transform Matrix3D for this element.
GraphicElement
  
getMaxBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's maximum height.
GraphicElement
  
getMaxBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's maximum width.
GraphicElement
  
getMinBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's minimum height.
GraphicElement
  
getMinBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's minimum width.
GraphicElement
  
getPreferredBoundsHeight(postLayoutTransform:Boolean = true):Number
Returns the element's preferred height.
GraphicElement
  
getPreferredBoundsWidth(postLayoutTransform:Boolean = true):Number
Returns the element's preferred width.
GraphicElement
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
  
Calling this method results in a call to the elements's validateDisplayList() method before the display list is rendered.
GraphicElement
  
Calling this method results in a call to the elements's validateProperties() method before the display list is rendered.
GraphicElement
  
Calling this method results in a call to the elements's validateSize() method before the display list is rendered.
GraphicElement
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
Converts the point object from the object's (local) coordinates to the Stage (global) coordinates.
GraphicElement
  
Called by Group when an IGraphicElement is added to or removed from a Group.
GraphicElement
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
  
setLayoutBoundsPosition(newBoundsX:Number, newBoundsY:Number, postLayoutTransform:Boolean = true):void
Sets the coordinates that the element uses to draw on screen.
GraphicElement
  
setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean = true):void
Sets the layout size to the specified dimensions.
GraphicElement
  
setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void
Sets the transform Matrix that is used to calculate the component's layout size and position relative to its siblings.
GraphicElement
  
setLayoutMatrix3D(value:Matrix3D, invalidateLayout:Boolean):void
Sets the transform Matrix3D that is used to calculate the component's layout size and position relative to its siblings.
GraphicElement
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
Determines whether this element can draw itself to the sharedDisplayObject of the sequence.
GraphicElement
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
transformAround(transformCenter:Vector3D, scale:Vector3D = null, rotation:Vector3D = null, translation:Vector3D = null, postLayoutScale:Vector3D = null, postLayoutRotation:Vector3D = null, postLayoutTranslation:Vector3D = null):void
GraphicElement
  
transformPointToParent(transformCenter:Vector3D, position:Vector3D, postLayoutPosition:Vector3D):void
FIXME (chaase) : FLEXDOCS-1031
GraphicElement
  
Called by the parent Group to redraw this element in its displayObject property.
GraphicElement
  
Validates and updates the properties and layout of this object by immediately calling validateProperties(), validateSize(), and validateDisplayList(), if necessary.
GraphicElement
  
Used by layout logic to validate the properties of a component by calling the commitProperties() method.
GraphicElement
  
Called by the parent Group to validate the size of this element.
GraphicElement
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Protected Methods
 MethodDefined By
  
GraphicElement
  
Processes the properties set on the element.
GraphicElement
  
getStrokeExtents(postLayoutTransform:Boolean = true):Rectangle
Returns the amount of pixels occupied by the stroke on each side of the element's bounds.
GraphicElement
  
Utility method that notifies the host that this element has changed and needs its layer to be updated.
GraphicElement
  
Helper method to invalidate parent size and display list if this object affects its layout (includeInLayout is true).
GraphicElement
  
Calculates the default size of the element.
GraphicElement
  
Used for the implementation of the ILayoutElement interface, returns the explicit of measured height pre-transform.
GraphicElement
  
Used for the implementation of the ILayoutElement interface, returns the explicit of measured width pre-transform.
GraphicElement
  
transformHeightForLayout(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Transform the element's size.
GraphicElement
  
transformWidthForLayout(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
Transform the element's size.
GraphicElement
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Draws the element and/or sizes and positions its content.
GraphicElement
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
Property Detail
alphaproperty
alpha:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5



Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
baselineproperty 
baseline:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The vertical distance in pixels from the anchor target to the control's baseline position. By default the anchor target is the the top edge of the container's content area. In layouts with advanced constraints, the target can be a constraint row. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To spcify an anchor target, set the property value to a string in the format "anchorTargetName:value" e.g. "row1:10".



Implementation
    public function get baseline():Object
    public function set baseline(value:Object):void
baselinePositionproperty 
baselinePosition:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The y-coordinate of the baseline of the first line of text of the component.



Implementation
    public function get baselinePosition():Number
blendModeproperty 
blendMode:String

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

A value from the BlendMode class that specifies which blend mode to use.

The default value is auto.



Implementation
    public function get blendMode():String
    public function set blendMode(value:String):void

See also

bottomproperty 
bottom:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The vertical distance in pixels from the bottom edge of the component to the anchor target's bottom edge. By default the anchor target is the the container's content area. In layouts with advanced constraints, the target can be a constraint row. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To spcify an anchor target, set the property value to a string in the format "anchorTargetName:value" e.g. "row1:10".



Implementation
    public function get bottom():Object
    public function set bottom(value:Object):void
depthproperty 
depth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Determines the order in which items inside of containers are rendered. Spark containers order their items based on their depth property, with the lowest depth in the back, and the higher in the front. Items with the same depth value appear in the order they are added to the container.



Implementation
    public function get depth():Number
    public function set depth(value:Number):void
designLayerproperty 
designLayer:DesignLayer

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies the optional DesignLayer instance associated with this visual element.

When a DesignLayer is assigned, a visual element must consider the visibility and alpha of its parent layer when ultimately committing its own effective visibility or alpha to its backing DisplayObject (if applicable).

A visual element must listen for layerPropertyChange notifications from the associated layer parent. When the effectiveAlpha or effectiveVisibility of the layer changes, the element must then compute its own effective visibility (or alpha) and apply it accordingly.

This property should not be set within MXML directly.

The designLayer property is not used for z-order control, please see depth.



Implementation
    public function get designLayer():DesignLayer
    public function set designLayer(value:DesignLayer):void
displayObjectproperty 
displayObject:DisplayObject  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The shared DisplayObject where this IGraphicElement is drawn. Implementers should not create the DisplayObject here, but in createDisplayObject().

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get displayObject():DisplayObject
displayObjectSharingModeproperty 
displayObjectSharingMode:String

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5



Implementation
    public function get displayObjectSharingMode():String
    public function set displayObjectSharingMode(value:String):void
drawnDisplayObjectproperty 
drawnDisplayObject:DisplayObject  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The actual DisplayObject that is drawn into by the GraphicElement. Typically this is equivalent to the displayObject property. Subclasses should perform drawing commands on this property instead of on displayObject.



Implementation
    protected function get drawnDisplayObject():DisplayObject
drawXproperty 
drawX:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The x position where the element should be drawn.



Implementation
    protected function get drawX():Number
drawYproperty 
drawY:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The y position where the element should be drawn.



Implementation
    protected function get drawY():Number
explicitHeightproperty 
explicitHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Number that specifies the explicit height of the component, in pixels, in the component's coordinates.



Implementation
    public function get explicitHeight():Number
    public function set explicitHeight(value:Number):void

See also

explicitMaxHeightproperty 
explicitMaxHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The maximum recommended height of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels.



Implementation
    public function get explicitMaxHeight():Number
    public function set explicitMaxHeight(value:Number):void

See also

explicitMaxWidthproperty 
explicitMaxWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The maximum recommended width of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels.



Implementation
    public function get explicitMaxWidth():Number
    public function set explicitMaxWidth(value:Number):void

See also

explicitMinHeightproperty 
explicitMinHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The minimum recommended height of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels.



Implementation
    public function get explicitMinHeight():Number
    public function set explicitMinHeight(value:Number):void

See also

explicitMinWidthproperty 
explicitMinWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The minimum recommended width of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels.



Implementation
    public function get explicitMinWidth():Number
    public function set explicitMinWidth(value:Number):void

See also

explicitWidthproperty 
explicitWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Number that specifies the explicit width of the component, in pixels, in the component's coordinates.



Implementation
    public function get explicitWidth():Number
    public function set explicitWidth(value:Number):void

See also

filtersproperty 
filters:Array

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

An indexed array that contains each filter object currently associated with the graphic element. The mx.filters.package contains several classes that define specific filters you can use. The getter returns a copy of the filters array. The filters property value can only be changed via the setter.



Implementation
    public function get filters():Array
    public function set filters(value:Array):void
hasComplexLayoutMatrixproperty 
hasComplexLayoutMatrix:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns true if the GraphicElement has any non-translation (x,y) transform properties



Implementation
    protected function get hasComplexLayoutMatrix():Boolean
hasLayoutMatrix3Dproperty 
hasLayoutMatrix3D:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

True if the element has 3D Matrix. Use hasLayoutMatrix3D instead of calling and examining the value of getLayoutMatrix3D() as that method returns a valid matrix even when the element is in 2D.



Implementation
    public function get hasLayoutMatrix3D():Boolean
heightproperty 
height:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The height of the graphic element.

The default value is 0.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get height():Number
    public function set height(value:Number):void
horizontalCenterproperty 
horizontalCenter:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The horizontal distance in pixels from the center of the component to the center of the anchor target's content area. The default anchor target is the container itself. In layouts with advanced constraints, the anchor target can be a constraint column. Then the content area is the space between the preceeding column (or container side) and the target column. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To specify an anchor target, set the property value to a string in the format "constraintColumnId:value" e.g. "col1:10".



Implementation
    public function get horizontalCenter():Object
    public function set horizontalCenter(value:Object):void
idproperty 
id:String

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The identity of the component.



Implementation
    public function get id():String
    public function set id(value:String):void
includeInLayoutproperty 
includeInLayout:Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Specifies whether this element is included in the layout of the group.

The default value is true.



Implementation
    public function get includeInLayout():Boolean
    public function set includeInLayout(value:Boolean):void
is3Dproperty 
is3D:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

True, when the element is in 3D. The element can be in 3D either because it has 3D transform properties or it has 3D transform offsets or both.



Implementation
    public function get is3D():Boolean
layoutFeaturesproperty 
protected var layoutFeatures:AdvancedLayoutFeatures

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Contain all of the implementation details of how the GraphicElement implements transform and layering support. In most cases, you should not have to modify this property.

leftproperty 
left:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The horizontal distance in pixels from the left edge of the component to the anchor target's left edge. By default the anchor target is the the container's content area. In layouts with advanced constraints, the target can be a constraint column. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To spcify an anchor target, set the property value to a string in the format "anchorTargetName:value" e.g. "col1:10".



Implementation
    public function get left():Object
    public function set left(value:Object):void
luminosityClipproperty 
luminosityClip:Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Documentation is not currently available.



Implementation
    public function get luminosityClip():Boolean
    public function set luminosityClip(value:Boolean):void
luminosityInvertproperty 
luminosityInvert:Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Documentation is not currently available.



Implementation
    public function get luminosityInvert():Boolean
    public function set luminosityInvert(value:Boolean):void
maskproperty 
mask:DisplayObject

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The calling display object is masked by the specified mask object. If, the mask display object is not on the display list, it will be added to the display list as a child of the displayObject. The mask object itself is not drawn. Set mask to null to remove the mask. To use another GraphicElement as a mask, wrap the GraphicElement in a Group or other container.



Implementation
    public function get mask():DisplayObject
    public function set mask(value:DisplayObject):void

See also

maskTypeproperty 
maskType:String

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The maskType defines how the mask is applied to the GraphicElement.

The possible values are MaskType.CLIP and MaskType.ALPHA.

Clip Masking

When masking in clip mode, a clipping masks is reduced to 1-bit. This means that a mask will not affect the opacity of a pixel in the source content; it either leaves the value unmodified, if the corresponding pixel in the mask is has a non-zero alpha value, or makes it fully transparent, if the mask pixel value has an alpha value of zero.

When clip masking is used, only the actual path and shape vectors and fills defined by the mask are used to determine the effect on the source content. strokes and bitmap filters defined on the mask are ignored. Any filled region in the mask is considered filled, and renders the source content. The type and parameters of the fill is irrelevant; a solid color fill, gradient fill, or bitmap fill in a mask will all render the underlying source content, regardless of the alpha values of the mask fill.

BitmapGraphics are treated as bitmap filled rectangles when used in a clipping mask. As a result, the alpha channel of the source bitmap is irrelevant when part of a mask -- the bitmap affects the mask in the same manner as solid filled rectangle of equivalent dimensions.

Alpha Masking

In alpha mode, the opacity of each pixel in the source content is multiplied by the opacity of the corresponding region of the mask. i.e., a pixel in the source content with an opacity of 1 that is masked by a region of opacity of .5 will have a resulting opacity of .5. A source pixel with an opacity of .8 masked by a region with opacity of .5 will have a resulting opacity of .4.

Conceptually, Alpha masking is equivalent to rendering the transformed mask and source content into separate RGBA surfaces, and multiplying the alpha channel of the mask content into the alpha channel of the source content. All of the mask content is rendered into its surface before compositing into the source content's surface. As a result, all FXG features, such as strokes, bitmap filters, and fill opacity will affect the final composited content.

When in alpha mode, the alpha channel of any bitmap data is composited normally into the mask alpha channel, and will affect the final rendered content. This holds true for both BitmapGraphics and bitmap filled shapes and paths.

The default value is MaskType.CLIP.



Implementation
    public function get maskType():String
    public function set maskType(value:String):void
maxHeightproperty 
maxHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The maximum recommended height of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels. The default value of this property is set by the component developer.

The component developer uses this property to set an upper limit on the height of the component.

If the application developer overrides the default value of maxHeight, the new value is stored in explicitMaxHeight. The default value of maxHeight does not change. As a result, at layout time, if maxHeight was explicitly set by the application developer, then the value of explicitMaxHeight is used for the component's maximum recommended height. If maxHeight is not set explicitly by the user, then the default value is used.

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 Container, or containers that don't factor in this property. Because the value is in component coordinates, the true maxHeight 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 UIComponent.DEFAULT_MAX_HEIGHT.



Implementation
    public function get maxHeight():Number
    public function set maxHeight(value:Number):void
maxWidthproperty 
maxWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The maximum recommended width of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels. The default value of this property is set by the component developer.

The component developer uses this property to set an upper limit on the width of the component.

If the application developer overrides the default value of maxWidth, the new value is stored in explicitMaxWidth. The default value of maxWidth does not change. As a result, at layout time, if maxWidth was explicitly set by the application developer, then the value of explicitMaxWidth is used for the component's maximum recommended width. If maxWidth is not set explicitly by the user, then the default value is used.

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 Container, or containers that don't factor in this property. Because the value is in component coordinates, the true maxWidth with respect to its parent is affected by the scaleX property. Some components have no theoretical limit to their width. In those cases their maxWidth will be set to UIComponent.DEFAULT_MAX_WIDTH.



Implementation
    public function get maxWidth():Number
    public function set maxWidth(value:Number):void
measuredHeightproperty 
measuredHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The default height of the component, in pixels. This value is set by the measure() method.



Implementation
    public function get measuredHeight():Number
    public function set measuredHeight(value:Number):void
measuredWidthproperty 
measuredWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The default width of the component, in pixels. This value is set by the measure() method.



Implementation
    public function get measuredWidth():Number
    public function set measuredWidth(value:Number):void
measuredXproperty 
measuredX:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The default measured bounds top-left corner relative to the origin of the element.



Implementation
    public function get measuredX():Number
    public function set measuredX(value:Number):void
measuredYproperty 
measuredY:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The default measured bounds top-left corner relative to the origin of the element.



Implementation
    public function get measuredY():Number
    public function set measuredY(value:Number):void
minHeightproperty 
minHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The minimum recommended height of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels. The default value depends on the component's implementation.

If the application developer sets the value of minHeight, the new value is stored in explicitMinHeight. The default value of minHeight does not change. As a result, at layout time, if minHeight was explicitly set by the application developer, then the value of explicitMinHeight is used for the component's minimum recommended height. If minHeight is not set explicitly by the application developer, then the value of measuredMinHeight is used.

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 Container, or containers that don't factor in this property. Because the value is in component coordinates, the true minHeight with respect to its parent is affected by the scaleY property.



Implementation
    public function get minHeight():Number
    public function set minHeight(value:Number):void
minWidthproperty 
minWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The minimum recommended width of the component to be considered by the parent during layout. This value is in the component's coordinates, in pixels. The default value depends on the component's implementation.

If the application developer sets the value of minWidth, the new value is stored in explicitMinWidth. The default value of minWidth does not change. As a result, at layout time, if minWidth was explicitly set by the application developer, then the value of explicitMinWidth is used for the component's minimum recommended width. If minWidth is not set explicitly by the application developer, then the value of measuredMinWidth is used.

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 Container, or containers that don't factor in this property. Because the value is in component coordinates, the true minWidth with respect to its parent is affected by the scaleX property.



Implementation
    public function get minWidth():Number
    public function set minWidth(value:Number):void
needsDisplayObjectproperty 
needsDisplayObject:Boolean  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

True if the element requires an exclusive DisplayObject. Developers don't usually call this method directly, but override it in their subclasses to indicate that an exclusive DisplayObject is needed. Usually a subclass needs a DisplayObject when it has to set its properties. Some examples of such DisplayObject properties are filters, blendMode, mask, rotation, alpha.



Implementation
    protected function get needsDisplayObject():Boolean
ownerproperty 
owner:DisplayObjectContainer

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The owner of this IVisualElement object. By default, it is the parent of this IVisualElement object. However, if this IVisualElement object is a child component that is popped up by its parent, such as the drop-down list of a ComboBox control, the owner is the component that popped up this IVisualElement object.

This property is not managed by Flex, but by each component. Therefore, if you use the PopUpManger.createPopUp() or PopUpManger.addPopUp() method to pop up a child component, you should set the owner property of the child component to the component that popped it up.

The default value is the value of the parent property.



Implementation
    public function get owner():DisplayObjectContainer
    public function set owner(value:DisplayObjectContainer):void
parentproperty 
parent:DisplayObjectContainer  [read-only]

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The parent container or component for this component. Only visual elements should have a parent property. Non-visual items should use another property to reference the object to which they belong. By convention, non-visual objects use an owner property to reference the object to which they belong.



Implementation
    public function get parent():DisplayObjectContainer
percentHeightproperty 
percentHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Number that specifies the height of a component as a percentage of its parent's size. Allowed values are 0-100. Setting the height or explicitHeight properties resets this property to NaN.

This property returns a numeric value only if the property was previously set; it does not reflect the exact size of the component in percent.



Implementation
    public function get percentHeight():Number
    public function set percentHeight(value:Number):void
percentWidthproperty 
percentWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Number that specifies the width of a component as a percentage of its parent's size. Allowed values are 0-100. The default value is NaN. Setting the width or explicitWidth properties resets this property to NaN.

This property returns a numeric value only if the property was previously set; it does not reflect the exact size of the component in percent.

This property is always set to NaN for the UITextField control.



Implementation
    public function get percentWidth():Number
    public function set percentWidth(value:Number):void
postLayoutTransformOffsetsproperty 
postLayoutTransformOffsets:mx.geom:TransformOffsets

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5



Implementation
    public function get postLayoutTransformOffsets():mx.geom:TransformOffsets
    public function set postLayoutTransformOffsets(value:mx.geom:TransformOffsets):void
rightproperty 
right:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The horizontal distance in pixels from the right edge of the component to the anchor target's right edge. By default the anchor target is the the container's content area. In layouts with advanced constraints, the target can be a constraint column. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To spcify an anchor target, set the property value to a string in the format "anchorTargetName:value" e.g. "col1:10".



Implementation
    public function get right():Object
    public function set right(value:Object):void
rotationproperty 
rotation:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Indicates the rotation of the element, in degrees, from the transform point.



Implementation
    public function get rotation():Number
    public function set rotation(value:Number):void
rotationXproperty 
rotationX:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Indicates the x-axis rotation of the element instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. This property is ignored during calculation by any of Flex's 2D layouts.



Implementation
    public function get rotationX():Number
    public function set rotationX(value:Number):void
rotationYproperty 
rotationY:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation. Values outside this range are added to or subtracted from 360 to obtain a value within the range. This property is ignored during calculation by any of Flex's 2D layouts.



Implementation
    public function get rotationY():Number
    public function set rotationY(value:Number):void
rotationZproperty 
rotationZ:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Indicates the rotation of the element, in degrees, from the transform point.



Implementation
    public function get rotationZ():Number
    public function set rotationZ(value:Number):void
scaleXproperty 
scaleX:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The horizontal scale (percentage) of the element as applied from the transform point.



Implementation
    public function get scaleX():Number
    public function set scaleX(value:Number):void
scaleYproperty 
scaleY:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The vertical scale (percentage) of the element as applied from the transform point.



Implementation
    public function get scaleY():Number
    public function set scaleY(value:Number):void
scaleZproperty 
scaleZ:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The z scale (percentage) of the element as applied from the transform point.



Implementation
    public function get scaleZ():Number
    public function set scaleZ(value:Number):void
topproperty 
top:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The vertical distance in pixels from the top edge of the component to the anchor target's top edge. By default the anchor target is the the container's content area. In layouts with advanced constraints, the target can be a constraint row. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To spcify an anchor target, set the property value to a string in the format "anchorTargetName:value" e.g. "row1:10".



Implementation
    public function get top():Object
    public function set top(value:Object):void
transformproperty 
transform:flash.geom:Transform

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5



Implementation
    public function get transform():flash.geom:Transform
    public function set transform(value:flash.geom:Transform):void
transformXproperty 
transformX:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The x position transform point of the element.



Implementation
    public function get transformX():Number
    public function set transformX(value:Number):void
transformYproperty 
transformY:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The y position transform point of the element.



Implementation
    public function get transformY():Number
    public function set transformY(value:Number):void
transformZproperty 
transformZ:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The z position transform point of the element.



Implementation
    public function get transformZ():Number
    public function set transformZ(value:Number):void
verticalCenterproperty 
verticalCenter:Object

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The vertical distance in pixels from the center of the component to the center of the anchor target's content area. The default anchor target is the container itself. In layouts with advanced constraints, the anchor target can be a constraint row. Then the content area is the space between the preceeding row (or container side) and the target row. Setting the property to a number or to a numerical string like "10" specifies use of the default anchor target. To specify an anchor target, set the property value to a string in the format "constraintColumnId:value" e.g. "row1:10".



Implementation
    public function get verticalCenter():Object
    public function set verticalCenter(value:Object):void
visibleproperty 
visible:Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Controls the visibility of this visual element. If true, the object is visible.

If an object is not visible, but the includeInLayout property is set to true, then the object takes up space in the container, but is invisible.

If visible is set to true, the object may not necessarily be visible due to its size and whether container clipping is enabled.

Setting visible to false, prevents the component from getting focus.



Implementation
    public function get visible():Boolean
    public function set visible(value:Boolean):void
widthproperty 
width:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The width of the graphic element.

The default value is 0.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
x:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The x position of the graphic element.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The y position of the graphic element.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get y():Number
    public function set y(value:Number):void
zproperty 
z:Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

The z position of the graphic element.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get z():Number
    public function set z(value:Number):void
Method Detail
canShareWithNext()method
public function canShareWithNext(element:IGraphicElement):Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Return true if this IGraphicElement is compatible and can share display objects with the next IGraphicElement in the sequence.

Parameters

element:IGraphicElement — The element that comes after this element in the sequence.

Returns
Boolean — Returns true when this element is compatible with the previous element in the sequence.
canShareWithPrevious()method 
public function canShareWithPrevious(element:IGraphicElement):Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Return true if this IGraphicElement is compatible and can share display objects with the previous IGraphicElement in the sequence.

Note that in certain cases the element may be passed offered the parent Group itself in a call to setSharedDisplayObject. In those cases, this method won't be called.

Parameters

element:IGraphicElement — The element that comes before this element in the sequence.

Returns
Boolean — Returns true when this element is compatible with the previous element in the sequence.
canSkipMeasurement()method 
protected function canSkipMeasurement():Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns
Boolean
commitProperties()method 
protected function commitProperties():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Processes the properties set on the element. This is an advanced method that you might override when creating a subclass.

You do not call this method directly. Flex calls the commitProperties() method when you use the addElement() method to add an element to the group, or when you call the invalidateProperties() method of the element. Calls to the commitProperties() method occur before calls to the measure() method. This lets you set property values that might be used by the measure() method.

Some elements have properties that interact with each other. It is often best at startup time to process all of these properties at one time to avoid duplicating work.

createDisplayObject()method 
public function createDisplayObject():DisplayObject

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Creates a new DisplayObject where this IGraphicElement is drawn. Subsequent calls to the getter of the displayObject property must return the same display object. After the DisplayObject is created, the parent Group will pass along the display objects to the rest of the elements in the sequence. Group will ensure that this method is called only when needed.

If the element wants to participate in the DisplayObject sharing, then the new DisplayObject must implement IShareableDisplayObject. This interface is being used by the Group to manage invalidation and redrawing of the graphic element sequence and typically is not directly used by the Developer.

To reevaluate the shared sequences, call the parent Group invalidateGraphicElementSharing() method. To force the Group to remove the element's current DisplayObject from its display list and recalculate the display object sharing, call the parent Group discardDisplayObject() method.

Returns
DisplayObject — The display object created
getBoundsXAtSize()method 
public function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the x coordinate of the element's bounds at the specified element size. This method is typically used by layouts during measure() to predict what the element position will be, if the element is resized to particular dimesions.

Parameters

width:Number — The element's bounds width, or NaN to use the preferred width.
 
height:Number — The element's bounds height, or NaN to use the preferred height.
 
postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns x coordinate of the element's bounding box top-left corner. Bounding box is in element's parent coordinate space and is calculated from the specified bounds size, layout position and layout transform matrix.

Returns
Number
getBoundsYAtSize()method 
public function getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the y coordinate of the element's bounds at the specified element size. This method is typically used by layouts during measure() to predict what the element position will be, if the element is resized to particular dimesions.

Parameters

width:Number — The element's bounds width, or NaN to use the preferred width.
 
height:Number — The element's bounds height, or NaN to use the preferred height.
 
postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns y coordinate of the element's bounding box top-left corner. Bounding box is in element's parent coordinate space and is calculated from the specified bounds size, layout position and layout transform matrix.

Returns
Number
getLayoutBoundsHeight()method 
public function getLayoutBoundsHeight(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's layout height. This is the size that the element uses to draw on screen.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box width. Bounding box is in element's parent coordinate space and is calculated from the element's layout size and layout transform matrix.

Returns
Number
getLayoutBoundsWidth()method 
public function getLayoutBoundsWidth(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Parameters

postLayoutTransform:Boolean (default = true)

Returns
Number
getLayoutBoundsX()method 
public function getLayoutBoundsX(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the x coordinate that the element uses to draw on screen.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns x coordinate of the element's bounding box top-left corner. Bounding box is in element's parent coordinate space and is calculated from the element's layout size, layout position and layout transform matrix.

Returns
Number
getLayoutBoundsY()method 
public function getLayoutBoundsY(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the y coordinate that the element uses to draw on screen.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns y coordinate of the element's bounding box top-left corner. Bounding box is in element's parent coordinate space and is calculated from the element's layout size, layout position and layout transform matrix.

Returns
Number
getLayoutMatrix()method 
public function getLayoutMatrix():Matrix

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the transform matrix that is used to calculate the component's layout relative to its siblings.

This matrix is typically defined by the component's 2D properties such as x, y, rotation, scaleX, scaleY, transformX, and transformY. Some components may have additional transform properties that are applied on top of the layout matrix to determine the final, computed matrix. For example UIComponent defines the offsets property.

Returns
Matrix

Returns the layout transform Matrix for this element. Don't directly modify the return value but call setLayoutMatrix instead.

getLayoutMatrix3D()method 
public function getLayoutMatrix3D():Matrix3D

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the layout transform Matrix3D for this element.

This matrix is typically defined by the component's transform properties such as x, y, z, rotationX, rotationY, rotationZ, scaleX, scaleY, scaleZ, transformX, and transformY. Some components may have additional transform properties that are applied on top of the layout matrix to determine the final, computed matrix. For example UIComponent defines the offsets property.

Returns
Matrix3D

Returns the layout transform Matrix3D for this element. Don't directly modify the return value but call setLayoutMatrix instead.

getMaxBoundsHeight()method 
public function getMaxBoundsHeight(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's maximum height.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box height. Bounding box is in element's parent coordinate space and is calculated from the element's maximum size and layout transform matrix.

Returns
Number
getMaxBoundsWidth()method 
public function getMaxBoundsWidth(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's maximum width.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box width. Bounding box is in element's parent coordinate space and is calculated from the element's maximum size and layout transform matrix.

Returns
Number
getMinBoundsHeight()method 
public function getMinBoundsHeight(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's minimum height.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box height. Bounding box is in element's parent coordinate space and is calculated from the element's minimum size and layout transform matrix.

Returns
Number
getMinBoundsWidth()method 
public function getMinBoundsWidth(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's minimum width.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box width. Bounding box is in element's parent coordinate space and is calculated from the element's minimum size and layout transform matrix.

Returns
Number
getPreferredBoundsHeight()method 
public function getPreferredBoundsHeight(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's preferred height.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box height. Bounding box is in element's parent coordinate space and is calculated from the element's perferred size and layout transform matrix.

Returns
Number — Returns the element's preferred height. Preferred height is usually based on the default element size and any explicit overrides. For UIComponent this is the same as getExplicitOrMeasuredHeight().
getPreferredBoundsWidth()method 
public function getPreferredBoundsWidth(postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the element's preferred width.

Parameters

postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true the method returns the element's bounding box width. Bounding box is in element's parent coordinate space and is calculated from the element's perferred size and layout transform matrix.

Returns
Number — Returns the element's preferred width. Preferred width is usually based on the default element size and any explicit overrides. For UIComponent this is the same as getExplicitOrMeasuredWidth().
getStrokeExtents()method 
protected function getStrokeExtents(postLayoutTransform:Boolean = true):Rectangle

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Returns the amount of pixels occupied by the stroke on each side of the element's bounds.

Parameters

postLayoutTransform:Boolean (default = true) — - if true, the stroke extents are calculated in parent coordinate space (after applying the element's transformations).

Returns
Rectangle — Rectangle of the stroke extents. The rectangle's left, right, top and bottom properties represent the stroke extent for the respective side of the element's bounding box.
invalidateDisplayList()method 
public function invalidateDisplayList():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Calling this method results in a call to the elements's validateDisplayList() method before the display list is rendered.

Subclasses should override and do their work in updateDisplayList().

invalidateDisplayObjectSharing()method 
protected function invalidateDisplayObjectSharing():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Utility method that notifies the host that this element has changed and needs its layer to be updated.

invalidateParentSizeAndDisplayList()method 
protected function invalidateParentSizeAndDisplayList():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Helper method to invalidate parent size and display list if this object affects its layout (includeInLayout is true).

invalidateProperties()method 
public function invalidateProperties():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Calling this method results in a call to the elements's validateProperties() method before the display list is rendered.

Subclasses should do their work in commitProperties().

invalidateSize()method 
public function invalidateSize():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Calling this method results in a call to the elements's validateSize() method before the display list is rendered.

Subclasses should override and do their measurement in measure(). By default when explicitWidth and explicitHeight are set, measure() will not be called. To override this default behavior subclasses should override skipMeasure().

localToGlobal()method 
public function localToGlobal(point:Point):Point

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Converts the point object from the object's (local) coordinates to the Stage (global) coordinates.

This method allows you to convert any given x and y coordinates from values that are relative to the origin (0,0) of a specific object (local coordinates) to values that are relative to the origin of the Stage (global coordinates).

To use this method, first create an instance of the Point class. The x and y values that you assign represent local coordinates because they relate to the origin of the object.

You then pass the Point instance that you created as the parameter to the localToGlobal() method. The method returns a new Point object with x and y values that relate to the origin of the Stage instead of the origin of the object.

Parameters

point:Point — The name or identifier of a point created with the Point class, specifying the x and y coordinates as properties.

Returns
Point — A Point object with coordinates relative to the Stage.

See also

measure()method 
protected function measure():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Calculates the default size of the element. This is an advanced method that you might override when creating a subclass of GraphicElement.

You do not call this method directly. Flex calls the measure() method when the element is added to a group using the addElement() method, and when the element's invalidateSize() method is called.

By default you set both explicit height and explicit width of an element, Flex does not call the measure() method, even if you explicitly call the invalidateSize() method. To override this behavior, override skipMeasure() method.

In your override of this method, you must set the measuredWidth and measuredHeight properties to define the default size. You can optionally set the measuredX and measuredY properties to define the default measured bounds top-left corner relative to the origin of the element.

The conceptual point of measure() is for the element to provide its own natural or intrinsic bounds as a default. Therefore, the measuredWidth and measuredHeight properties should be determined by factors such as:

In some cases, there is no intrinsic way to determine default values. For example, a simple GreenCircle element might simply set measuredWidth = 100 and measuredHeight = 100 in its measure() method to provide a reasonable default size. In other cases, such as a TextArea, an appropriate computation (such as finding the right width and height that would just display all the text and have the aspect ratio of a Golden Rectangle) might be too time-consuming to be worthwhile.

The default implementation of measure() sets the values of the measuredWidth, measuredHeight, measuredX, and measuredY properties to 0.

parentChanged()method 
public function parentChanged(value:Group):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Called by Group when an IGraphicElement is added to or removed from a Group. Developers typically never need to call this method.

Parameters

value:Group — The parent group of this IGraphicElement.

preferredHeightPreTransform()method 
protected function preferredHeightPreTransform():Number

Used for the implementation of the ILayoutElement interface, returns the explicit of measured height pre-transform.

Returns
Number
preferredWidthPreTransform()method 
protected function preferredWidthPreTransform():Number

Used for the implementation of the ILayoutElement interface, returns the explicit of measured width pre-transform.

Returns
Number
setLayoutBoundsPosition()method 
public function setLayoutBoundsPosition(newBoundsX:Number, newBoundsY:Number, postLayoutTransform:Boolean = true):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Sets the coordinates that the element uses to draw on screen.

Parameters

newBoundsX:Number — When postLayoutTransform is true, the element is positioned in such a way that the top-left corner of its bounding box is (x, y). Bounding box is in element's parent coordinate space and is calculated from the element's layout size, layout position and layout transform matrix. Note that calls to setLayoutSize can affect the layout position, so setLayoutPosition should be called after setLayoutSize.
 
newBoundsY:Number
 
postLayoutTransform:Boolean (default = true)

setLayoutBoundsSize()method 
public function setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean = true):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Sets the layout size to the specified dimensions. This is the size that the element uses to draw on screen. If one of the dimensions is left unspecified (NaN), it's size will be picked such that element can be optimally sized to fit the other dimension. This is useful when the caller doesn't want to overconstrain the element, for example when the element's width and height are corelated (text, components with complex transforms, etc.) If both dimensions are left unspecified, the element will have its layout size set to its preferred size. setLayoutSize does not clip against minium or maximum sizes. Note that calls to setLayoutSize can affect the layout position, so setLayoutSize should be called before setLayoutPosition.

Parameters

width:Number — The target width.
 
height:Number — The target height.
 
postLayoutTransform:Boolean (default = true) — When postLayoutTransform is true, the specified dimensions are those of the element's bounding box. Bounding box is in element's parent coordinate space and is calculated from the element's layout size, layout position and layout transform matrix.

setLayoutMatrix()method 
public function setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Sets the transform Matrix that is used to calculate the component's layout size and position relative to its siblings.

This matrix is typically defined by the component's 2D properties such as x, y, rotation, scaleX, scaleY, transformX, and transformY. Some components may have additional transform properties that are applied on top of the layout matrix to determine the final, computed matrix. For example UIComponent defines the offsets.

Note that layout Matrix is factored in the getPreferredSize(), getMinSize(), getMaxSize(), getLayoutSize() when computed in parent coordinates as well as in getLayoutPosition() in both parent and child coordinates. Layouts that calculate the transform matrix explicitly typically call this method and work with sizes in child coordinates. Layouts calling this method pass false to invalidateLayout so that a subsequent layout pass is not triggered.

Developers that call this method directly typically pass true to invalidateLayout so that the parent container is notified that it needs to re-layout the children.

Parameters

value:Matrix
 
invalidateLayout:Boolean

setLayoutMatrix3D()method 
public function setLayoutMatrix3D(value:Matrix3D, invalidateLayout:Boolean):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Sets the transform Matrix3D that is used to calculate the component's layout size and position relative to its siblings.

This matrix is typically defined by the component's transform properties such as x, y, z, rotationX, rotationY, rotationZ, scaleX, scaleY, scaleZ, transformX, and transformY. Some components may have additional transform properties that are applied on top of the layout matrix to determine the final, computed matrix. For example UIComponent defines the offsets property.

Note that layout Matrix3D is factored in the getPreferredSize(), getMinSize(), getMaxSize(), getLayoutSize() when computed in parent coordinates as well as in getLayoutPosition() in both parent and child coordinates. Layouts that calculate the transform matrix explicitly typically call this method and work with sizes in child coordinates. Layouts calling this method pass false to invalidateLayout so that a subsequent layout pass is not triggered.

Developers that call this method directly typically pass true to invalidateLayout so that the parent container is notified that it needs to re-layout the children.

Parameters

value:Matrix3D
 
invalidateLayout:Boolean

setSharedDisplayObject()method 
public function setSharedDisplayObject(sharedDisplayObject:DisplayObject):Boolean

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Determines whether this element can draw itself to the sharedDisplayObject of the sequence.

Typically implementers will return true when this IGraphicElement can cumulatively draw in the shared DisplayObject graphics property. In all cases where this IGraphicElement needs to set properties on the DisplayObject that don't apply to the rest of the elements in the sequence this method must return false. Examples for such properties are rotation, scale, transform, mask, alpha, filters, color transform, 3D, layer, etc.

When this method returns true, subsequent calls to the getter of the displayObject property must return the same display object.

Note that in certain cases the sharedDisplayObject may be the parent Group itself. In the rest of the cases the DisplayObject is created by the first element in the sequence.

When this IGraphicElement needs to rebuild its sequence, it notifies the parent Group by calling its invalidateGraphicElementSharing() method.

Parameters

sharedDisplayObject:DisplayObject

Returns
Boolean — Returns true when this IGraphicElement can draw itself to the shared DisplayObject of the sequence.
transformAround()method 
public function transformAround(transformCenter:Vector3D, scale:Vector3D = null, rotation:Vector3D = null, translation:Vector3D = null, postLayoutScale:Vector3D = null, postLayoutRotation:Vector3D = null, postLayoutTranslation:Vector3D = null):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Parameters

transformCenter:Vector3D
 
scale:Vector3D (default = null)
 
rotation:Vector3D (default = null)
 
translation:Vector3D (default = null)
 
postLayoutScale:Vector3D (default = null)
 
postLayoutRotation:Vector3D (default = null)
 
postLayoutTranslation:Vector3D (default = null)

transformHeightForLayout()method 
protected function transformHeightForLayout(width:Number, height:Number, postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Transform the element's size.

Parameters

width:Number — The target pre-transform width.
 
height:Number — The target pre-transform height.
 
postLayoutTransform:Boolean (default = true)

Returns
Number — Returns the transformed height. Transformation is this element's layout transformation matrix.
transformPointToParent()method 
public function transformPointToParent(transformCenter:Vector3D, position:Vector3D, postLayoutPosition:Vector3D):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

FIXME (chaase) : FLEXDOCS-1031

Parameters

transformCenter:Vector3D
 
position:Vector3D
 
postLayoutPosition:Vector3D

transformWidthForLayout()method 
protected function transformWidthForLayout(width:Number, height:Number, postLayoutTransform:Boolean = true):Number

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Transform the element's size.

Parameters

width:Number — The target pre-transform width.
 
height:Number — The target pre-transform height.
 
postLayoutTransform:Boolean (default = true)

Returns
Number — Returns the transformed width. Transformation is this element's layout transformation matrix.
updateDisplayList()method 
protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Draws the element and/or sizes and positions its content. This is an advanced method that you might override when creating a subclass of GraphicElement.

You do not call this method directly. Flex calls the updateDisplayList() method when the component is added to a group using the addElement() method, and when the element's invalidateDisplayList() method is called.

This method is where you would do programmatic drawing using methods on the elements's displayObject such as graphics.drawRect().

Parameters

unscaledWidth:Number — Specifies the width of the component, in pixels, in the component's coordinates, regardless of the value of the scaleX property of the component.
 
unscaledHeight:Number — Specifies the height of the component, in pixels, in the component's coordinates, regardless of the value of the scaleY property of the component.

validateDisplayList()method 
public function validateDisplayList():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Called by the parent Group to redraw this element in its displayObject property.

If the element is the first in the sequence (displayObjectSharingMode is set to DisplayObjectSharingMode.OWNS_SHARED_OBJECT) then it must clear the displayObject graphics and set it up as necessary for drawing the rest of the elements.

The element must alway redraw even if it itself has not changed since the last time validateDisplayList() was called as the parent Group will redraw the whole sequence if any of its elements need to be redrawn.

To ensure this method is called, notify the parent Group by calling its invalidateGraphicElementSize() method.

Note that this method may be called even if this element have not notified the parent Group.

validateNow()method 
public function validateNow():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Validates and updates the properties and layout of this object by immediately calling validateProperties(), validateSize(), and validateDisplayList(), if necessary.

validateProperties()method 
public function validateProperties():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Used by layout logic to validate the properties of a component by calling the commitProperties() method. In general, subclasses should override the commitProperties() method and not this method.

validateSize()method 
public function validateSize():void

Language Version: ActionScript 3.0
Product Version: Flex 4
Runtime Versions: Flash Player 10, AIR 1.5

Called by the parent Group to validate the size of this element. When the size of the element changes and is going to affect the parent Group layout, the implementer is responsible for invalidating the parent's size and display list. To ensure this method is called, notify the parent Group by calling its invalidateGraphicElementSize() method. Note that this method may be called even if this element have not notified the parent Group.