blob: 208fc91f135a374ea21efabd806cf2fa04742796 [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.Tree",
"baseClassname": "mx.controls.List"
,
"description": "The Tree control lets a user view hierarchical data arranged as an expandable tree. Each item in a tree can be a leaf or a branch. A leaf item is an end point in the tree. A branch item can contain leaf or branch items, or it can be empty. <p>By default, a leaf is represented by a text label next to a file icon. A branch is represented by a text label next to a folder icon, with a disclosure triangle that a user can open to expose children.</p> <p>The Tree class uses an ITreeDataDescriptor or ITreeDataDescriptor2 object to parse and manipulate the data provider. The default tree data descriptor, an object of the DefaultDataDescriptor class, supports XML and Object classes; an Object class data provider must have all children in <code>children</code> fields. </p> <p>The Tree control has the following default sizing characteristics:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>Wide enough to accommodate the icon, label, and expansion triangle, if any, of the widest node in the first 7 displayed (uncollapsed) rows, and seven rows high, where each row is 20 pixels in height. If a scroll bar is required, the width of the scroll bar is not included in the width calculations.</td> </tr> <tr> <td>Minimum size</td> <td>0 pixels.</td> </tr> <tr> <td>Maximum size</td> <td>5000 by 5000.</td> </tr> </table> <p> The &lt;mx:Tree&gt; tag inherits all the tag attributes of its superclass, and adds the following tag attributes: </p> <pre>\\n &lt;mx:Tree\\n <b>Properties</b>\\n dataDescriptor=&quot;<i>Instance of DefaultDataDescriptor</i>&quot;\\n dataProvider=&quot;null&quot;\\n dragMoveEnabled=&quot;true|false&quot;\\n firstVisibleItem=&quot;<i>First item in the control</i>&quot;\\n hasRoot=&quot;false|true&quot;\\n itemIcons=&quot;null&quot;\\n maxHorizontalScrollPosition=&quot;0&quot;\\n openItems=&quot;null&quot;\\n showRoot=&quot;true|false&quot;\\n &nbsp;\\n <b>Styles</b>\\n alternatingItemColors=&quot;undefined&quot;\\n backgroundDisabledColor=&quot;0xDDDDDD&quot;\\n defaultLeafIcon=&quot;<i>'TreeNodeIcon' symbol in Assets.swf</i>&quot;\\n depthColors=&quot;undefined&quot;\\n disclosureClosedIcon=&quot;<i>'TreeDisclosureClosed' symbol in Assets.swf</i>&quot;\\n disclosureOpenIcon=&quot;<i>'TreeDisclosureOpen' symbol in Assets.swf</i>&quot;\\n folderClosedIcon=&quot;<i>'TreeFolderClosed' symbol in Assets.swf</i>&quot;\\n folderOpenIcon=&quot;<i>'TreeFolderOpen' symbol in Assets.swf</i>&quot;\\n indentation=&quot;17&quot;\\n openDuration=&quot;250&quot;\\n openEasingFunction=&quot;undefined&quot;\\n paddingLeft=&quot;2&quot;\\n paddingRight=&quot;0&quot;\\n rollOverColor=&quot;0xAADEFF&quot;\\n selectionColor=&quot;0x7FCDFE&quot;\\n selectionDisabledColor=&quot;0xDDDDDD&quot;\\n selectionEasingFunction=&quot;undefined&quot;\\n textRollOverColor=&quot;0x2B333C&quot;\\n textSelectedColor=&quot;0x2B333C&quot;\\n &nbsp;\\n <b>Events</b>\\n change=&quot;<i>No default</i>&quot;\\n itemClose=&quot;<i>No default</i>&quot;\\n itemOpen=&quot;<i>No default</i>&quot;\\n itemOpening=&quot;<i>No default</i>&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/TreeExample.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.treeClasses.ITreeDataDescriptor", "mx.controls.treeClasses.ITreeDataDescriptor2", "mx.controls.treeClasses.DefaultDataDescriptor"]},
{ "tagName": "royalesuppresspublicvarwarning",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "mx.controls.Tree",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "borderStyle",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Border Style",
"tags": [
{ "tagName": "default",
"values": ["0"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "field",
"qname": "wrappedCollection",
"return": "mx.collections.ICollectionView",
"namespace": "mx_internal",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A hook for accessibility",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "dataProvider",
"namespace": "public",
"bindable": ["collectionChange"],
"details": ["override"],
"deprecated": {},
"description": "An object that contains the data to be displayed. When you assign a value to this property, the Tree class handles the source data object as follows: <p> <ul><li>A String containing valid XML text is converted to an XMLListCollection.</li> <li>An XMLNode is converted to an XMLListCollection.</li> <li>An XMLList is converted to an XMLListCollection.</li> <li>Any object that implements the ICollectionView interface is cast to an ICollectionView.</li> <li>An Array is converted to an ArrayCollection.</li> <li>Any other type object is wrapped in an Array with the object as its sole entry.</li></ul> </p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "mx.controls.treeClasses.ITreeDataDescriptor",
"qname": "dataDescriptor",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Tree delegates to the data descriptor for information about the data. This data is then used to parse and move about the data source. <p>When you specify this property as an attribute in MXML you must use a reference to the data descriptor, not the string name of the descriptor. Use the following format for the property:</p> <pre>&lt;mx:Tree id=&quot;tree&quot; dataDescriptor=&quot;{new MyCustomTreeDataDescriptor()}&quot;/&gt;></pre> <p>Alternatively, you can specify the property in MXML as a nested subtag, as the following example shows:</p> <pre>&lt;mx:Tree&gt;\\n &lt;mx:dataDescriptor&gt;\\n &lt;myCustomTreeDataDescriptor&gt;</pre> <p>The default value is an internal instance of the DefaultDataDescriptor class.</p>",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "showRoot",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Sets the visibility of the root item. If the dataProvider data has a root node, and this is set to <code>false</code>, the Tree control does not display the root item. Only the decendants of the root item are displayed. This flag has no effect on non-rooted dataProviders, such as List and Array.",
"tags": [
{ "tagName": "default",
"values": ["true"]},
{ "tagName": "see",
"values": ["#hasRoot"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "openItems",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The items that have been opened or set opened.",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "isItemOpen",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns <code>true</code> if the specified item branch is open (is showing its children).",
"tags": [
{ "tagName": "param",
"values": ["item Item to inspect."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["True if open, false if not."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "item", "type": "Object"}]}
,
{ "type": "method",
"qname": "expandItem",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Opens or closes a branch item. When a branch item opens, it restores the open and closed states of its child branches if they were already opened. If you set <code>dataProvider</code> and then immediately call <code>expandItem()</code> you may not see the correct behavior. You should either wait for the component to validate or call <code>validateNow()</code>. If a branch has over 20 children, it does not animate the first time it opens, for performance reasons.) after the open animation is complete.",
"tags": [
{ "tagName": "param",
"values": ["item Item to affect.", "open Specify <code>true</code> to open, <code>false</code> to close.", "animate Specify <code>true</code> to animate the transition. (Note:", "dispatchEvent Controls whether the tree fires an <code>open</code> event", "cause The event, if any, that initiated the item open action."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "item", "type": "Object"},
{ "name": "open", "type": "Boolean"},
{ "name": "animate", "type": "Boolean"},
{ "name": "dispatchEvent", "type": "Boolean"},
{ "name": "cause", "type": "org.apache.royale.events.Event"}]}
,
{ "type": "method",
"qname": "expandChildrenOf",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Opens or closes all the tree items below the specified item. If you set <code>dataProvider</code> and then immediately call <code>expandChildrenOf()</code> you may not see the correct behavior. You should either wait for the component to validate or call the <code>validateNow()</code> method. Specify <code>true</code> to open the items, and <code>false</code> to close them.",
"tags": [
{ "tagName": "param",
"values": ["item The starting item.", "open Toggles an open or close operation."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "item", "type": "Object"},
{ "name": "open", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "getParentItem",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns the known parent of a child item. This method returns a value only if the item was or is currently visible. Top level items have a parent with the value <code>null</code>.",
"tags": [
{ "tagName": "param",
"values": ["The item for which to get the parent."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["The parent of the item."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "*",
"params": [{ "name": "item", "type": "Object"}]}
]
}