Eidola home

org.eidola.test
Class TreeTest

java.lang.Object
  |
  +--org.eidola.test.TreeTest
All Implemented Interfaces:
EventListener, MutableTreeNode, TreeNode

public class TreeTest
extends Object
implements EventListener, MutableTreeNode

Version:
[Development version]
Author:
Paul Cantrell

Constructor Summary
TreeTest(Container cntr)
           
TreeTest(Container cntr, TreeNode parent, DefaultTreeModel treeModel)
           
 
Method Summary
 Enumeration children()
           
 boolean getAllowsChildren()
           
 TreeNode getChildAt(int childIndex)
           
 int getChildCount()
           
 Container getContainer()
           
 int getIndex(TreeNode node)
           
 TreeNode getParent()
           
 void handleEvent(Event e)
          Handles an event.
 void insert(MutableTreeNode child, int index)
           
 boolean isLeaf()
           
static void main(String[] args)
           
 void remove(int index)
           
 void remove(MutableTreeNode child)
           
 void removeFromParent()
           
 void setParent(MutableTreeNode newParent)
           
 void setTreeModel(DefaultTreeModel treeModel)
           
 void setUserObject(Object object)
           
 String toString()
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeTest

public TreeTest(Container cntr)

TreeTest

public TreeTest(Container cntr,
                TreeNode parent,
                DefaultTreeModel treeModel)
Method Detail

setTreeModel

public void setTreeModel(DefaultTreeModel treeModel)

getContainer

public Container getContainer()

handleEvent

public void handleEvent(Event e)
Description copied from interface: EventListener
Handles an event. Implementations typically filter for specific subclasses of Event.
Specified by:
handleEvent in interface EventListener
Following copied from interface: org.eidola.kernel.event.EventListener
Parameters:
event - The event to handle.

update

public void update()

children

public Enumeration children()
Specified by:
children in interface TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface TreeNode

getChildAt

public TreeNode getChildAt(int childIndex)
Specified by:
getChildAt in interface TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface TreeNode

getIndex

public int getIndex(TreeNode node)
Specified by:
getIndex in interface TreeNode

getParent

public TreeNode getParent()
Specified by:
getParent in interface TreeNode

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface TreeNode

insert

public void insert(MutableTreeNode child,
                   int index)
Specified by:
insert in interface MutableTreeNode

remove

public void remove(int index)
Specified by:
remove in interface MutableTreeNode

remove

public void remove(MutableTreeNode child)
Specified by:
remove in interface MutableTreeNode

removeFromParent

public void removeFromParent()
Specified by:
removeFromParent in interface MutableTreeNode

setParent

public void setParent(MutableTreeNode newParent)
Specified by:
setParent in interface MutableTreeNode

setUserObject

public void setUserObject(Object object)
Specified by:
setUserObject in interface MutableTreeNode

toString

public String toString()
Overrides:
toString in class Object

main

public static void main(String[] args)
                 throws Exception

Eidola home