libgdx API

com.badlogic.gdx.scenes.scene2d.ui
Class Tree.Node

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.ui.Tree.Node
Enclosing class:
Tree

public static class Tree.Node
extends java.lang.Object


Constructor Summary
Tree.Node(Actor actor)
           
 
Method Summary
 void add(Tree.Node node)
           
 void addAll(Array<Tree.Node> nodes)
           
protected  void addToTree(Tree tree)
          Called to add the actor to the tree when the node's parent is expanded.
 void collapseAll()
          Collapses all nodes under and including this node.
 void expandAll()
          Expands all nodes under and including this node.
 void expandTo()
          Expands all parent nodes of this node.
 Tree.Node findNode(java.lang.Object object)
          Returns this node or the child node with the specified object, or null.
 Actor getActor()
           
 Array<Tree.Node> getChildren()
           
 Drawable getIcon()
           
 java.lang.Object getObject()
           
 Tree.Node getParent()
           
 Tree getTree()
          Returns the tree this node is currently in, or null.
 void insert(int index, Tree.Node node)
           
 boolean isExpanded()
           
 boolean isSelectable()
           
 void remove()
           
 void remove(Tree.Node node)
           
 void removeAll()
           
protected  void removeFromTree(Tree tree)
          Called to remove the actor from the tree when the node's parent is collapsed.
 void setExpanded(boolean expanded)
           
 void setIcon(Drawable icon)
          Sets an icon that will be drawn to the left of the actor.
 void setObject(java.lang.Object object)
          Sets an application specific object for this node.
 void setSelectable(boolean selectable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tree.Node

public Tree.Node(Actor actor)
Method Detail

setExpanded

public void setExpanded(boolean expanded)

addToTree

protected void addToTree(Tree tree)
Called to add the actor to the tree when the node's parent is expanded.


removeFromTree

protected void removeFromTree(Tree tree)
Called to remove the actor from the tree when the node's parent is collapsed.


add

public void add(Tree.Node node)

addAll

public void addAll(Array<Tree.Node> nodes)

insert

public void insert(int index,
                   Tree.Node node)

remove

public void remove()

remove

public void remove(Tree.Node node)

removeAll

public void removeAll()

getTree

public Tree getTree()
Returns the tree this node is currently in, or null.


getActor

public Actor getActor()

isExpanded

public boolean isExpanded()

getChildren

public Array<Tree.Node> getChildren()

getParent

public Tree.Node getParent()

setIcon

public void setIcon(Drawable icon)
Sets an icon that will be drawn to the left of the actor.


getObject

public java.lang.Object getObject()

setObject

public void setObject(java.lang.Object object)
Sets an application specific object for this node.


getIcon

public Drawable getIcon()

findNode

public Tree.Node findNode(java.lang.Object object)
Returns this node or the child node with the specified object, or null.


collapseAll

public void collapseAll()
Collapses all nodes under and including this node.


expandAll

public void expandAll()
Expands all nodes under and including this node.


expandTo

public void expandTo()
Expands all parent nodes of this node.


isSelectable

public boolean isSelectable()

setSelectable

public void setSelectable(boolean selectable)

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)