Packagecom.yworks.ui.tree
Classpublic class TreeNode
InheritanceTreeNode Inheritance Object
Subclasses TreeGroupNode

A tree node represents a INode in a data provider created by the class HierarchyTreeView



Public Properties
 PropertyDefined By
  item : INode
[read-only] The node which is represented by this TreeNode
TreeNode
  textProvider : Function
A function which will return a String representation to be displayed in the Tree.
TreeNode
Public Methods
 MethodDefined By
  
TreeNode(item:INode, textProvider:Function = null)
Creates an instance with the given node.
TreeNode
  
toString():String
Returns a String representation of this TreeNode.
TreeNode
Property Detail
itemproperty
item:INode  [read-only]

The node which is represented by this TreeNode


Implementation
    public function get item():INode
textProviderproperty 
textProvider:Function

A function which will return a String representation to be displayed in the Tree.

It has the signature

function( item:Object ):String
and will get the current TreeNode as item. The wrapped INode can then be accessed by item.item.


Implementation
    public function get textProvider():Function
    public function set textProvider(value:Function):void
Constructor Detail
TreeNode()Constructor
public function TreeNode(item:INode, textProvider:Function = null)

Creates an instance with the given node.

Parameters
item:INode — The node which is represented by this TreeNode
 
textProvider:Function (default = null) — A textProvider to which toString() will delegate.
Method Detail
toString()method
public function toString():String

Returns a String representation of this TreeNode. If a textProvider is set, this method will delegate to it, otherwise it returns the item's String representation.

Returns
String — A String representation of this TreeNode