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 Object


Constructor Summary
Tree.Node(Actor actor)
           
 
Method Summary
 void add(Tree.Node node)
           
 void addAll(Array<Tree.Node> nodes)
           
 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.
 void findExpandedObjects(Array objects)
           
 Tree.Node findNode(Object object)
          Returns this node or the child node with the specified object, or null.
 Actor getActor()
           
 Array<Tree.Node> getChildren()
          If the children order is changed, updateChildren() must be called.
 Drawable getIcon()
           
 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()
           
 void restoreExpandedObjects(Array objects)
           
 void setExpanded(boolean expanded)
           
 void setIcon(Drawable icon)
          Sets an icon that will be drawn to the left of the actor.
 void setObject(Object object)
          Sets an application specific object for this node.
 void setSelectable(boolean selectable)
           
 void updateChildren()
           
 
Methods inherited from class java.lang.Object
equals, 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)

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()
If the children order is changed, updateChildren() must be called.


updateChildren

public void updateChildren()

getParent

public Tree.Node getParent()
Returns:
May be null.

setIcon

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


getObject

public Object getObject()

setObject

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


getIcon

public Drawable getIcon()

findNode

public Tree.Node findNode(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)

findExpandedObjects

public void findExpandedObjects(Array objects)

restoreExpandedObjects

public void restoreExpandedObjects(Array objects)


Copyright © 2013. All Rights Reserved.