blob: 34a9c3b1dc77a53e79370dbd4d66ba40e2c4ae39 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../../override.css" type="text/css"><meta name="keywords" content="DefaultDataDescriptor,mx.controls.treeClasses.DefaultDataDescriptor,addChildAt,addChildAt,getChildren,getChildren,getData,getData,getGroupName,getHierarchicalCollectionAdaptor,getHierarchicalCollectionAdaptor,getNodeDepth,getNodeDepth,getParent,getParent,getType,hasChildren,hasChildren,isBranch,isBranch,isEnabled,isToggled,removeChildAt,removeChildAt,setEnabled,setToggled"><title>mx.controls.treeClasses.DefaultDataDescriptor</title></head><body><script language="javascript" type="text/javascript" src="../../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../../help.js"></script><script language="javascript" type="text/javascript" src="../../../cookies.js"></script><script language="javascript" type="text/javascript"><!--
asdocTitle = 'DefaultDataDescriptor - ApacheFlex API Reference';
var baseRef = '../../../';
window.onload = configPage;
--></script>
<script type="text/javascript">
scrollToNameAnchor();
</script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../../package-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Packages</a>&nbsp;|&nbsp;<a href="../../../class-summary.html" onclick="loadClassListFrame('../../../all-classes.html')">All Classes</a>&nbsp;|&nbsp;<a href="../../../all-index-A.html" onclick="loadClassListFrame('../../../index-list.html')">Index</a>&nbsp;|&nbsp;<a id="framesLink1" href="../../../index.html?mx/controls/treeClasses/DefaultDataDescriptor.html&amp;mx/controls/treeClasses/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">DefaultDataDescriptor</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3">&nbsp;</td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("DefaultDataDescriptor"); titleBar_setSubNav(false,false,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);}
-->
</script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.controls.treeClasses</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class DefaultDataDescriptor</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">DefaultDataDescriptor <img src="../../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</td></tr><tr><td class="classHeaderTableLabel">Implements</td><td> <a href="../../../mx/controls/treeClasses/ITreeDataDescriptor2.html">ITreeDataDescriptor2</a>, <a href="../../../mx/controls/menuClasses/IMenuDataDescriptor.html">IMenuDataDescriptor</a></td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p>
The DefaultDataDescriptor class provides a default implementation for
accessing and manipulating data for use in controls such as Tree and Menu.
This implementation handles e4x XML and object nodes in similar but different
ways. See each method description for details on how the method
accesses values in nodes of various types.
This class is the default value of the Tree, Menu, MenuBar, and
PopUpMenuButton control <code>dataDescriptor</code> properties.
<p></p><p><span class="classHeaderTableLabel">See also</span></p><div class="seeAlso"><a href="ITreeDataDescriptor.html" target="">mx.controls.treeClasses.ITreeDataDescriptor</a><br/><a href="../../../mx/controls/menuClasses/IMenuDataDescriptor.html" target="">mx.controls.menuClasses.IMenuDataDescriptor</a><br/><a href="../../../mx/controls/Menu.html" target="">mx.controls.Menu</a><br/><a href="../../../mx/controls/MenuBar.html" target="">mx.controls.MenuBar</a><br/><a href="../../../mx/controls/PopUpMenuButton.html" target="">mx.controls.PopUpMenuButton</a><br/><a href="../../../mx/controls/Tree.html" target="">mx.controls.Tree</a></div><br/><hr></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#DefaultDataDescriptor()" class="signatureLink">DefaultDataDescriptor</a>()</div><div class="summaryTableDescription">
Constructor.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#addChildAt()" class="signatureLink">addChildAt</a>(parent:Object, newChild:Object, index:int, model:Object = null):Boolean</div><div class="summaryTableDescription">
Add a child node to a node at the specified index.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getChildren()" class="signatureLink">getChildren</a>(node:Object, model:Object = null):<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></div><div class="summaryTableDescription">
Provides access to a node's children.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getData()" class="signatureLink">getData</a>(node:Object, model:Object = null):Object</div><div class="summaryTableDescription">
Returns a node's data.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getGroupName()" class="signatureLink">getGroupName</a>(node:Object):String</div><div class="summaryTableDescription">
Returns the name of the radio button group to which
the node belongs, if any.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getHierarchicalCollectionAdaptor()" class="signatureLink">getHierarchicalCollectionAdaptor</a>(hierarchicalData:<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a>, uidFunction:Function, openItems:Object, model:Object = null):<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></div><div class="summaryTableDescription">
Returns an ICollectionView instance that makes the hierarchical data appear
as if it was a linear ICollectionView instance.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getNodeDepth()" class="signatureLink">getNodeDepth</a>(node:Object, iterator:<a href="../../../mx/collections/IViewCursor.html">IViewCursor</a>, model:Object = null):int</div><div class="summaryTableDescription">
Returns the depth of the node, meaning the number of ancestors it has.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getParent()" class="signatureLink">getParent</a>(node:Object, collection:<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a>, model:Object = null):Object</div><div class="summaryTableDescription">
Returns the parent of the node
The parent of a top-level node is null.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getType()" class="signatureLink">getType</a>(node:Object):String</div><div class="summaryTableDescription">
Returns the type identifier of a node.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#hasChildren()" class="signatureLink">hasChildren</a>(node:Object, model:Object = null):Boolean</div><div class="summaryTableDescription">
Determines if the node actually has children.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#isBranch()" class="signatureLink">isBranch</a>(node:Object, model:Object = null):Boolean</div><div class="summaryTableDescription">
Tests a node for termination.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#isEnabled()" class="signatureLink">isEnabled</a>(node:Object):Boolean</div><div class="summaryTableDescription">
Returns whether the node is enabled.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#isToggled()" class="signatureLink">isToggled</a>(node:Object):Boolean</div><div class="summaryTableDescription">
Returns whether the node is toggled.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#removeChildAt()" class="signatureLink">removeChildAt</a>(parent:Object, child:Object, index:int, model:Object = null):Boolean</div><div class="summaryTableDescription">
Removes the child node from a node at the specified index.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setEnabled()" class="signatureLink">setEnabled</a>(node:Object, value:Boolean):void</div><div class="summaryTableDescription">
Sets the value of the field or attribute in the data provider
that identifies whether the node is enabled.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr><tr class=""><td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setToggled()" class="signatureLink">setToggled</a>(node:Object, value:Boolean):void</div><div class="summaryTableDescription">
Sets the value of the field or attribute in the data provider
that identifies whether the node is toggled.</div></td><td class="summaryTableOwnerCol">DefaultDataDescriptor</td></tr></table></div><script language="javascript" type="text/javascript"><!--
showHideInherited();
--></script><div class="MainContent"><a name="constructorDetail"></a><div class="detailSectionHeader">Constructor Detail</div><a name="DefaultDataDescriptor()"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">DefaultDataDescriptor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">Constructor</td></tr></table><div class="detailBody"><code>public function DefaultDataDescriptor()</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p>
Constructor.
</p></div><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="addChildAt()"></a><a name="addChildAt(Object,Object,int,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">addChildAt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public function addChildAt(parent:Object, newChild:Object, index:int, model:Object = null):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Add a child node to a node at the specified index.
This implementation does the following:
<ul>
<li>If the <code>parent</code> parameter is null or undefined,
inserts the <code>child</code> parameter at the
specified index in the collection specified by <code>model</code>
parameter.
</li>
<li>If the <code>parent</code> parameter has a <code>children</code>
field or property, the method adds the <code>child</code> parameter
to it at the <code>index</code> parameter location.
In this case, the <code>model</code> parameter is not required.
</li>
<li>If the <code>parent</code> parameter does not have a <code>children</code>
field or property, the method adds the <code>children</code>
property to the <code>parent</code>. The method then adds the
<code>child</code> parameter to the parent at the
<code>index</code> parameter location.
In this case, the <code>model</code> parameter is not required.
</li>
<li>If the <code>index</code> value is greater than the collection
length or number of children in the parent, adds the object as
the last child.
</li>
</ul>
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">parent</span>:Object</code> &mdash; The node object that will parent the child.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">newChild</span>:Object</code> &mdash; The node object that will be parented by the node.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">index</span>:int</code> &mdash; The 0-based index of where to put the child node relative to the parent.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The entire collection that this node is a part of.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if successful.
</td></tr></table></div><a name="getChildren()"></a><a name="getChildren(Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getChildren</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getChildren(node:Object, model:Object = null):<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Provides access to a node's children. Returns a collection
of children if they exist. If the node is an Object, the method
returns the contents of the object's <code>children</code> field as
an ArrayCollection.
If the node is XML, the method returns an XMLListCollection containing
the child elements.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node object currently being evaluated.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection that contains the node; ignored by this class.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></code> &mdash; An object containing the children nodes.
</td></tr></table></div><a name="getData()"></a><a name="getData(Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getData</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getData(node:Object, model:Object = null):Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns a node's data.
Currently returns the entire node.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node object currently being evaluated.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection that contains the node; ignored by this class.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Object</code> &mdash; The node.
</td></tr></table></div><a name="getGroupName()"></a><a name="getGroupName(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getGroupName</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getGroupName(node:Object):String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns the name of the radio button group to which
the node belongs, if any.
This method is used by menu-based controls.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node for which to get the group name.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> &mdash; The value of the node's <code>groupName</code>
attribute or field, or an empty string if there is no such
entry.
</td></tr></table></div><a name="getHierarchicalCollectionAdaptor()"></a><a name="getHierarchicalCollectionAdaptor(mx.collections.ICollectionView,Function,Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getHierarchicalCollectionAdaptor</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getHierarchicalCollectionAdaptor(hierarchicalData:<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a>, uidFunction:Function, openItems:Object, model:Object = null):<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns an ICollectionView instance that makes the hierarchical data appear
as if it was a linear ICollectionView instance.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">hierarchicalData</span>:<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></code> &mdash; The hierarchical data.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">uidFunction</span>:Function</code> &mdash; A function that takes an Object and returns the UID, as a String.
This parameter is usually the <code>Tree.itemToUID()</code> method.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">openItems</span>:Object</code> &mdash; The items that have been opened or set opened.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection to which this node belongs.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code><a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></code> &mdash; An ICollectionView instance.
</td></tr></table></div><a name="getNodeDepth()"></a><a name="getNodeDepth(Object,mx.collections.IViewCursor,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getNodeDepth</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getNodeDepth(node:Object, iterator:<a href="../../../mx/collections/IViewCursor.html">IViewCursor</a>, model:Object = null):int</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns the depth of the node, meaning the number of ancestors it has.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The Object that defines the node.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">iterator</span>:<a href="../../../mx/collections/IViewCursor.html">IViewCursor</a></code> &mdash; An IViewCursor instance that could be used to do the calculation.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection to which this node belongs.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>int</code> &mdash; The depth of the node, where 0 corresponds to the top level,
and -1 if the depth cannot be calculated.
</td></tr></table></div><a name="getParent()"></a><a name="getParent(Object,mx.collections.ICollectionView,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getParent</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getParent(node:Object, collection:<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a>, model:Object = null):Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns the parent of the node
The parent of a top-level node is <code>null</code>.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The Object that defines the node.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">collection</span>:<a href="../../../mx/collections/ICollectionView.html">ICollectionView</a></code> &mdash; An ICollectionView instance that could be used to do the calculation.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection to which this node belongs.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Object</code> &mdash; The parent node containing the node as child,
<code>null</code> for a top-level node,
and <code>undefined</code> if the parent cannot be determined.
</td></tr></table></div><a name="getType()"></a><a name="getType(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getType</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function getType(node:Object):String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns the type identifier of a node.
This method is used by menu-based controls to determine if the
node represents a separator, radio button,
a check box, or normal item.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node object for which to get the type.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> &mdash; The value of the <code>type</code> attribute or field,
or the empty string if there is no such field.
</td></tr></table></div><a name="hasChildren()"></a><a name="hasChildren(Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">hasChildren</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function hasChildren(node:Object, model:Object = null):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Determines if the node actually has children.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node object currently being evaluated.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection that contains the node; ignored by this class.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if this node currently has children.
</td></tr></table></div><a name="isBranch()"></a><a name="isBranch(Object,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">isBranch</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function isBranch(node:Object, model:Object = null):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Tests a node for termination.
Branches are non-terminating but are not required to have any leaf nodes.
If the node is XML, returns <code>true</code> if the node has children
or a <code>true isBranch</code> attribute.
If the node is an object, returns <code>true</code> if the node has a
(possibly empty) <code>children</code> field.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node object currently being evaluated.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The collection that contains the node; ignored by this class.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if this node is non-terminating.
</td></tr></table></div><a name="isEnabled()"></a><a name="isEnabled(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">isEnabled</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function isEnabled(node:Object):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns whether the node is enabled.
This method is used by menu-based controls.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node for which to get the status.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> &mdash; The value of the node's <code>enabled</code>
attribute or field, or <code>true</code> if there is no such
entry or the value is not <code>false</code>.
</td></tr></table></div><a name="isToggled()"></a><a name="isToggled(Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">isToggled</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function isToggled(node:Object):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Returns whether the node is toggled.
This method is used by menu-based controls.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node for which to get the status.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> &mdash; The value of the node's <code>toggled</code>
attribute or field, or <code>false</code> if there is no such
entry.
</td></tr></table></div><a name="removeChildAt()"></a><a name="removeChildAt(Object,Object,int,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">removeChildAt</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function removeChildAt(parent:Object, child:Object, index:int, model:Object = null):Boolean</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Removes the child node from a node at the specified index.
If the <code>parent</code> parameter is null
or undefined, the method uses the <code>model</code> parameter to
access the child; otherwise, it uses the <code>parent</code> parameter
and ignores the <code>model</code> parameter.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">parent</span>:Object</code> &mdash; The node object that currently parents the child node.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">child</span>:Object</code> &mdash; The node that is being removed.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">index</span>:int</code> &mdash; The 0-based index of the child node to remove relative to the parent.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">model</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; The entire collection that this node is a part of.
</td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Boolean</code> &mdash; <code>true</code> if successful.
</td></tr></table></div><a name="setEnabled()"></a><a name="setEnabled(Object,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setEnabled</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setEnabled(node:Object, value:Boolean):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Sets the value of the field or attribute in the data provider
that identifies whether the node is enabled.
This method sets the value of the node's <code>enabled</code>
attribute or field.
This method is used by menu-based controls.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node for which to set the status.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">value</span>:Boolean</code> &mdash; Whether the node is enabled.
</td></tr></table></p></div><a name="setToggled()"></a><a name="setToggled(Object,Boolean)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setToggled</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td></tr></table><div class="detailBody"><code> public function setToggled(node:Object, value:Boolean):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version :&nbsp;</b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version :&nbsp;</b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions :&nbsp;</b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p>
Sets the value of the field or attribute in the data provider
that identifies whether the node is toggled.
This method sets the value of the node's <code>toggled</code>
attribute or field.
This method is used by menu-based controls.
</p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">node</span>:Object</code> &mdash; The node for which to set the status.
</td></tr><tr><td class="paramSpacer">&nbsp;</td></tr><tr><td width="20px"></td><td><code><span class="label">value</span>:Boolean</code> &mdash; Whether the node is toggled.
</td></tr></table></p></div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 -->