blob: 1316242c76606dd0c20507b4d76330bd75e26353 [file] [log] [blame]
{ "type": "interface",
"qname": "spark.core.IGraphicElement",
"baseInterfaceNames": [
"mx.core.IVisualElement"]
,
"description": "The IGraphicElement is implemented by IVisualElements that take advantage of the parent <code>IGraphicElementContainer</code> DisplayObject management. <p>One typical use case is DisplayObject sharing. the Group class, which implements <code>IGraphicElementContainer</code>, organizes its IGraphicElement children in sequences that share and draw to the same DisplayObject. The DisplayObject is created by the first element in the sequence.</p> <p>Another use case is when an element does not derive from DisplayObject but instead maintains, creates and/or destroys its own DisplayObject. The <code>IGraphicElementContainer</code> will call the element to create the DisplayObject, add the DisplayObject as its child at the correct index, and handle its removal.</p> <p>Typically, you extend the GraphicElement class instead of directly implementing the IGraphciElement interface. The GraphicElement class already provides most of the required functionality.</p>",
"tags": [
{ "tagName": "see",
"values": ["spark.core.IGraphicElementContainer"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "displayObjectSharingMode",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Indicates the association between this IGraphicElement and its display objects. The <code>IGraphicElementContainer</code> manages this property and the values are one of the DisplayObjectSharingMode enum class. <ul> <li>A value of <code>DisplayObjectSharingMode.OWNS_UNSHARED_OBJECT</code> indicates that the IGraphicElement owns exclusively the DisplayObject corresponding to its <code>displayObject</code> property.</li> <li>A value of <code>DisplayObjectSharingMode.OWNS_SHARED_OBJECT</code> indicates taht the IGraphicElement owns the DisplayObject corresponding to its <code>displayObject</code> property but other IGraphicElements are using/drawing to that display object as well. Depending on the specific implementation, the IGraphicElement may perform certain management of the display object. For example the base class GraphicElement clears the transform of the display object, reset its visibility, alpha, etc. properties to their default values and additionally clear the graphics on every <code>validateDisplayList()</code> call.</li> <li>A value of <code>DisplayObjectSharingMode.USES_SHARED_OBJECT</code> indicates that the IGraphicElement draws into the DisplayObject corresponding to its <code>displayObject</code> property. There are one or more IGraphicElements that draw into that same displayObject, and the first element that draws has its mode set to <code>DisplayObjectMode.OWNS_SHARED_OBJECT</code></li> </ul>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.5"]},
{ "tagName": "productversion",
"values": ["Flex 4.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "canShareWithPrevious",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns <code>true</code> if this IGraphicElement is compatible and can share display objects with the previous IGraphicElement in the sequence. <p>In certain cases the element might be passed to the <code>IGraphicElementContainer</code> in a call to the <code>setSharedDisplayObject()</code> method. In those cases, this method is not called.</p> element in the sequence.",
"tags": [
{ "tagName": "see",
"values": ["#canShareWithNext", "#setSharedDisplayObject"]},
{ "tagName": "param",
"values": ["element The element that comes before this element in the sequence."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "return",
"values": ["Returns <code>true</code> when this element is compatible with the previous"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "element", "type": "spark.core.IGraphicElement"}]}
,
{ "type": "method",
"qname": "canShareWithNext",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns <code>true</code> if this IGraphicElement is compatible and can share display objects with the next IGraphicElement in the sequence. element in the sequence.",
"tags": [
{ "tagName": "see",
"values": ["#canShareWithPrevious", "#setSharedDisplayObject"]},
{ "tagName": "param",
"values": ["element The element that comes after this element in the sequence."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "return",
"values": ["Returns <code>true</code> when this element is compatible with the previous"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "element", "type": "spark.core.IGraphicElement"}]}
,
{ "type": "method",
"qname": "parentChanged",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Called by <code>IGraphicElementContainer</code> when an IGraphicElement is added to or removed from the host component. <p>You typically never need to call this method.</p>",
"tags": [
{ "tagName": "param",
"values": ["parent The <code>IGraphicElementContainer</code> of this <code>IGraphicElement</code>."]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "parent", "type": "spark.core.IGraphicElementContainer"}]}
,
{ "type": "method",
"qname": "validateProperties",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Called by the <code>IGraphicElementContainer</code> to validate the properties of this element. <p>To ensure that this method is called, notify the <code>IGraphicElementContainer</code> by calling its <code>invalidateGraphicElementProperties()</code> method.</p> <p>This method might be called even if this element has not notified the <code>IGraphicElementContainer</code>.</p>",
"tags": [
{ "tagName": "see",
"values": ["#validateSize", "#validateDisplayList"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "validateSize",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Called by the <code>IGraphicElementContainer</code> to validate the size of this element. <p>When the size of the element changes and is going to affect the <code>IGraphicElementContainer</code> layout, the implementer is responsible for invalidating the parent's size and display list.</p> <p>To ensure that this method is called, notify the <code>IGraphicElementContainer</code> by calling its <code>invalidateGraphicElementSize()</code> method.</p> <p>This method might be called even if this element has not notified the <code>IGraphicElementContainer</code>.</p>",
"tags": [
{ "tagName": "see",
"values": ["#validateProperties", "#validateDisplayList"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "validateDisplayList",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Called by the <code>IGraphicElementContainer</code> to redraw this element in its <code>displayObject</code> property. <p>If the element is the first in the sequence (<code>displayObjectSharingMode</code> is set to <code>DisplayObjectSharingMode.OWNS_SHARED_OBJECT</code>) then it must clear the <code>displayObject</code> graphics and set it up as necessary for drawing the rest of the elements.</p> <p>The element must alway redraw even if it itself has not changed since the last time the <code>validateDisplayList()</code> method was called. The parent <code>IGraphicElementContainer</code> will redraw the whole sequence if any of its elements need to be redrawn.</p> <p>To ensure this method is called, notify the <code>IGraphicElementContainer</code> by calling its <code>invalidateGraphicElementSize()</code> method.</p> <p>This method might be called even if this element has not notified the <code>IGraphicElementContainer</code>.</p>",
"tags": [
{ "tagName": "see",
"values": ["#displayObject", "#validateProperties", "#validateSize"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
]
}