blob: a4fcac23b1d5d2397752df901c5dc032ca3821fe [file] [log] [blame]
{ "type": "class",
"qname": "org.apache.royale.textLayout.elements.InlineGraphicElement",
"baseClassname": "org.apache.royale.textLayout.elements.FlowLeafElement"
,
"description": "The InlineGraphicElement class handles graphic objects that display inline in the text. <p>You can embed a graphic or any DisplayObject or specify a URl for the location of the graphic. The <code>height</code> and <code>width</code> properties of InlineGraphicElement control the actual size of the graphic to display. These values also control how much space to allocate for the graphic in the ITextLine object that contains the graphic. The <code>height</code> and <code>width</code> properties each can be one of:</p> <ol> <li>A number of pixels</li> <li>A percent of the measured size of the image</li> <li>The constant, &quot;auto&quot;, which computes the size (Default value)</li> </ol> There are three properties, or accessors, pertaining to the width and height of a graphic: <ul> <li>The <code>width</code> and <code>height</code> properties</li> <li>The <code>measuredWidth</code> and <code>measuredHeight</code> properties, which are the width or height of the graphic at load time</li> <li>The <code>actualWidth</code> and <code>actualHeight</code> properties, which are the actual display and compose width and height of the graphic as computed from <code>width</code> or <code>height</code> and <code>measuredWidth</code> or <code>measuredHeight</code></li> </ul> <p>The values of the <code>actualWidth</code> and <code>actualHeight</code> properties are always zero until the graphic is loaded.</p> <p>If <code>source</code> is specified as a URI, the graphic is loaded asynchronously. If it's a DisplayObject, TextLayout uses the <code>width</code> and <code>height</code> at the time the graphic is set into the InlineGraphicElement object as <code>measuredHeight</code> and <code>measuredWidth</code>; its width and height are read immediately.</p> <p><strong>Notes</strong>: For graphics that are loaded asynchronously the user must listen for a StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE event on the TextFlow and call <code>IFlowComposer.updateAllControllers()</code> to have the graphic appear. The value of <code>measuredWidth</code> and <code>measuredHeight</code> for graphics that are in the process of loading is zero.</p> <p>Some inline graphics are animations or videos that possibly have audio. They begin to run the first time they are composed after they finish loading. They don't stop running until the flowComposer on the TextFlow is set to null. At that time they are stopped and unloaded.</p> The following restrictions apply to InLineGraphicElement objects: <ol> <li>On export of TLFMarkup, source is converted to a string. If the graphic element is a class, the Text Layout Framework can't export it properly</li>. <li>When doing a copy/paste operation of an InlineGraphicElement, if source can't be used to create a new InLineGraphicElement, it won't be pasted. For example if source is a DisplayObject, or if the graphic is set directly, it can't be duplicated. Best results are obtained if the source is the class of an embedded graphic though that doesn't export/import.</li> <li>InLineGraphicElement objects work in the factory (TextFlowTextLineFactory) only if the source is a class or if you explicitly set the graphic to a loaded graphic. InlineGraphic objects that require delayed loads generally do not show up.</li> </ol>",
"tags": [
{ "tagName": "see",
"values": ["#actualHeight", "#actualWidth", "flash.display.DisplayObject DisplayObject", "org.apache.royale.textLayout.compose.IFlowComposer#updateAllControllers()", "org.apache.royale.textLayout.events.StatusChangeEvent StatusChangeEvent", "TextFlow"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "org.apache.royale.textLayout.elements.InlineGraphicElement",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor - create new InlineGraphicElement object",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "className",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.formats.ITextLayoutFormat",
"qname": "computedFormat",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.core.IUIBase",
"qname": "graphic",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The embedded graphic.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.core.IParentIUIBase",
"qname": "placeholderGraphic",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "elementWidth",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Width used by composition for laying out text around the graphic. @private"},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "elementHeight",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Height used by composition for laying out text around the graphic. @private"},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.property.Property",
"qname": "heightPropertyDefinition",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.property.Property",
"qname": "widthPropertyDefinition",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.property.Property",
"qname": "rotationPropertyDefinition",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "org.apache.royale.textLayout.property.Property",
"qname": "floatPropertyDefinition",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "status",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The current status of the image. On each status change the owning TextFlow sends a StatusChangeEvent.",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.textLayout.elements.InlineGraphicElementStatus", "org.apache.royale.textLayout.events.StatusChangeEvent"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "return",
"values": ["one of LOAD_PENDING, LOADING, SIZE_PENDING, READY, ERROR"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "*",
"qname": "width",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The width of the graphic. The value can be 'auto', a number of pixels or a percent of the measured width of the image. <p>Legal values are org.apache.royale.textLayout.formats.&quot;auto&quot; and org.apache.royale.textLayout.formats.FormatValue.INHERIT.</p> <p>Legal values as a number are from 0 to 32000.</p> <p>Legal values as a percent are numbers from 0 to 1000000.</p> <p>Default value is undefined indicating not set.</p> <p>If undefined or &quot;inherit&quot; the InlineGraphicElement will use the default value of &quot;auto&quot;.</p>",
"tags": [
{ "tagName": "see",
"values": ["#actualWidth", "#measuredWidth"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "throws",
"values": ["RangeError when set value is not within range for this property"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "measuredWidth",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The natural width of the graphic. This is the width of the graphic at load time.",
"tags": [
{ "tagName": "see",
"values": ["#actualWidth", "#width"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "actualWidth",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The actual width in effect. This is the display and compose width that's computed from the <code>width</code> and <code>measuredWidth</code> properties. <p>The values of the <code>actualWidth</code>property are computed according to the following table:</p> <table class=&quot;innertable&quot; width=&quot;100%&quot;> <tr> <th>width property</th> <th>actualWidth</th> </tr> <tr> <td>auto</td> <td>measuredWidth</td> </tr> <tr> <td>w a Percent</td> <td>w percent of measuredWidth</td> </tr> <tr> <td>w a Number</td> <td>w</td> </tr> </table> <p><strong>Notes</strong>: If the inline graphic is a IUIBase, its width and height are read immediately. If <code>measuredWidth</code> or <code>measuredHeight</code> are zero, then any auto calculations that would cause a divide by zero sets the result to zero.</p>",
"tags": [
{ "tagName": "see",
"values": ["#measuredWidth", "#width"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "*",
"qname": "height",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The height of the image. May be 'auto', a number of pixels or a percent of the measured height. <p>Legal values are org.apache.royale.textLayout.formats.&quot;auto&quot; and org.apache.royale.textLayout.formats.FormatValue.INHERIT.</p> <p>Legal values as a number are from 0 to 32000.</p> <p>Legal values as a percent are numbers from 0 to 1000000.</p> <p>Default value is undefined indicating not set.</p> <p>If undefined or &quot;inherit&quot; the InlineGraphicElement will use the default value of &quot;auto&quot;.</p>",
"tags": [
{ "tagName": "see",
"values": ["#actualHeight", "#measuredHeight"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "throws",
"values": ["RangeError when set value is not within range for this property"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "*",
"qname": "computedFloat",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-only",
"return": "*",
"qname": "effectiveFloat",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-write",
"return": "*",
"qname": "float",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Controls the placement of the graphic relative to the text. It can be part of the line, or can be beside the line with the text wrapped around it. <p>Legal values are <code>org.apache.royale.textLayout.formats.Float.NONE</code>, <code>org.apache.royale.textLayout.formats.Float.LEFT</code>, <code>org.apache.royale.textLayout.formats.Float.RIGHT</code>, <code>org.apache.royale.textLayout.formats.Float.START</code>, and <code>org.apache.royale.textLayout.formats.Float.END</code>.</p> <p>Default value is undefined indicating not set.</p> <p>If undefined will be treated as <code>Float.NONE</code>.</p>",
"tags": [
{ "tagName": "see",
"values": ["org.apache.royale.textLayout.formats.Float"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 2.0"]},
{ "tagName": "throws",
"values": ["RangeError when set value is not within range for this property"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "measuredHeight",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The natural height of the graphic. This is the height of the graphic at load time.",
"tags": [
{ "tagName": "see",
"values": ["#actualHeight", "#height"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Number",
"qname": "actualHeight",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The actual height in effect. This is the display and compose height that's computed from the <code>height</code> and <code>measuredHeight</code> properties. <p>The values of the <code>actualHeight</code> property are computed according to the following table:</p> <table class=&quot;innertable&quot; width=&quot;100%&quot;> <tr> <th>height property</th> <th>actualHeight</th> </tr> <tr> <td>auto</td> <td>measuredheight</td> </tr> <tr> <td>h a Percent</td> <td>h percent of measuredheight</td> </tr> <tr> <td>h a Number</td> <td>h</td> </tr> </table> <p><strong>Notes</strong>: If the inline graphic is a IUIBase, its width and height are read immmediately. If <code>measuredWidth</code> or <code>measuredHeight</code> are zero, then any auto calculations that would cause a divide by zero sets the result to zero.</p>",
"tags": [
{ "tagName": "see",
"values": ["#height", "#measuredHeight"]},
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "source",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sets the source for the graphic. The value can be either a String that is interpreted as a URI, a Class that's interpreted as the class of an embeddded IUIBase, a IUIBase instance, or a URLRequest. Creates a IUIBase and, if the InlineGraphicElement object is added into a ParagraphElement in a TextFlow object, causes it to appear inline in the text.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10", "AIR 1.5"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "Boolean",
"qname": "abstract",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "@private"},
{ "type": "accessor",
"access": "read-only",
"return": "String",
"qname": "defaultTypeName",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "@private"}]
}