net.openai.ai.nn.gui.widgets
Class AITreeNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--net.openai.ai.nn.gui.widgets.AITreeNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class AITreeNode
extends javax.swing.tree.DefaultMutableTreeNode

Comfortable TreeNode with a tag and a icon. A user-component can be used also.

Version:
$Id: AITreeNode.java,v 1.3 2002/02/21 21:11:57 tweber Exp $ History:
$Log: AITreeNode.java,v $
Revision 1.3 2002/02/21 21:11:57 tweber
- no DataObject is needed anymore
- search-method for child-ID's implemented

Revision 1.2 2002/02/14 23:24:09 gleo
Jindent run through.

Revision 1.1 2002/02/13 09:18:19 tweber
Initial release
Author:
Thomas Weber
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
AITreeNode()
          Contructs a empty AITreeNode
AITreeNode(java.lang.String strName)
          Constructs a node and sets the name
AITreeNode(java.lang.String strName, long lID)
          Constructs a node, sets the name and id
 
Method Summary
 AITreeNode getChildFromID(long lID)
          looks up a childnode with the given ID
 java.awt.Component getComponent()
          Returns the renderer component
 javax.swing.ImageIcon getIcon()
          Returns the icon
 long getID()
          Returns the actual ID
 java.lang.String getName()
          Returns the actual nodename
 void setComponent(java.awt.Component c)
          Sets a custom component
 void setIcon(javax.swing.ImageIcon pIcon)
          Bind a icon to this node
 void setIcon(java.lang.String name)
          Loads and binds a icon
 void setID(long lID)
          Changes the ID of this node
 void setName(java.lang.String strName)
          Changes the name of this node
 java.lang.String toString()
          Overwrites the object.toString() to return the nodename
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AITreeNode

public AITreeNode()
Contructs a empty AITreeNode


AITreeNode

public AITreeNode(java.lang.String strName)
Constructs a node and sets the name


AITreeNode

public AITreeNode(java.lang.String strName,
                  long lID)
Constructs a node, sets the name and id

Method Detail

setName

public void setName(java.lang.String strName)
Changes the name of this node


getName

public java.lang.String getName()
Returns the actual nodename


setID

public void setID(long lID)
Changes the ID of this node


getID

public long getID()
Returns the actual ID


setIcon

public void setIcon(javax.swing.ImageIcon pIcon)
Bind a icon to this node


setIcon

public void setIcon(java.lang.String name)
Loads and binds a icon


getIcon

public javax.swing.ImageIcon getIcon()
Returns the icon


toString

public java.lang.String toString()
Overwrites the object.toString() to return the nodename

Overrides:
toString in class javax.swing.tree.DefaultMutableTreeNode

setComponent

public void setComponent(java.awt.Component c)
Sets a custom component


getComponent

public java.awt.Component getComponent()
Returns the renderer component


getChildFromID

public AITreeNode getChildFromID(long lID)
looks up a childnode with the given ID

Parameters:
lID - Children's ID
Returns:
Children with given ID, null if not found


Copyright - 2001 OpenAI Labs. All Rights Reserved.