mx.updatedcontrols

class Tree

mx.updatedcontrols.List | +--mx.updatedcontrols.Tree
All Known Subclasses: dndTree

class Tree extends List
Tree class - extends List

    Field Summary

    branchNodes: Object
    An index of branch nodes in the tree
    nodeIndices: Object
    An index of nodes displayed in the tree
    openNodes: Object
    A table of nodes that are open

    Property Summary

    firstVisibleNode (read, write)
    Gets or sets the first visible node at the top of the view pane
    selectedNode (read, write)
    Gets or sets the selected node in the tree
    selectedNodes (read, write)
    Gets or sets the selected nodes in the tree

    Constructor

    Tree ( )

    Method Summary

    addTreeNode ( label, data )
    Appends a child node at the end of the tree node
    addTreeNodeAt ( index, label, data )
    Adds a child node at the specified index on the tree node
    Returns the index of the node specified on the tree's list of displayed nodes
    getIsBranch ( node )
    Checks if the specified node is a branch
    getIsOpen ( node )
    Returns if the specified node is open or closed
    getNodeDepth ( node )
    Returns the depth of the specified node
    Returns the node specified on the tree's list of displayed nodes
    Gets the root node from the tree
    getTreeNodeAt ( index )
    Returns the child node at the specified index
    isNodeVisible ( node )
    Returns if the node specified is a visible node
    Redraws the displayed nodes
    Removes all nodes from the tree
    Removes the child node at the specified index
    setDisplayIndex ( node, UID )
    setIcon ( node, iconID, iconID2 )
    Sets the icon(s) for the specified node
    setIsBranch ( node, branch )
    Sets the specified node to be a branch or leaf node (if possible)
    setIsOpen ( node, open, animate, fireEvent )
    Opens or closes the specified node

    Field Documentation


    Property Documentation


    Constructor Documentation

    Tree

    function Tree (
    )

      Method Documentation

      setDisplayIndex

      function setDisplayIndex (
      node,
      UID)

        setIsBranch

        function setIsBranch (
        node,
        branch)
        Sets the specified node to be a branch or leaf node (if possible)
        Method; Sets the specified node to be a branch even if node has no children. It will also set a branch node to a leaf node if possible (if it has no children). A branch node can be thought of as a type of node that has a folder icon, an expander arrow (disclosure icon) and either has children or can have children. A node is automatically set as a branch when it has children. You only need to call setIsBranch() when you want to create or preserve an empty folder. You may want to create branches that don’t yet have children if, for example, you only want child nodes to load when a user opens a folder. You can use the labelFunction to specifically and automatically type your nodes on a as needed basis. The labelFunction is called when a row is drawn. You would check if an attribute exists or check if childNodes exist (its up to you to determine) and set the node to a leaf or branch. Use setIsBranch(theNode, true) or setIsBranch(theNode, false). Note you cannot set a node to a leaf node type if it has children. You can also use the preserveBranches property to keep branches as branches when the last child node is moved or cut out.

        The documentation was generated from the following file:
        • Tree.as, Last Modified: 5/18/2006 5:30:00 PM