ch.elca.dependency.view
Class MyTreeNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--ch.elca.dependency.view.MyTreeNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class MyTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

Adds the icon stuff to the DefaultMutableTreeNode.

Version:
1.0-beta
Author:
Christoph Trutmann
See Also:
Serialized Form

Field Summary
static java.lang.String CYCLE_ICON_TYPE
          Type string for the cycle icon.
static java.lang.String EXTERN_ICON_TYPE
          Type string for the extern package icon.
 java.lang.String iconType
          String specifying the type of the icon.
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
MyTreeNode()
          Creates a tree node that has no parent and no children, but which allows children.
MyTreeNode(java.lang.Object userObject)
          Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.
MyTreeNode(java.lang.Object userObject, boolean allowsChildren)
          Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.
 
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, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CYCLE_ICON_TYPE

public static final java.lang.String CYCLE_ICON_TYPE
Type string for the cycle icon.

See Also:
Constant Field Values

EXTERN_ICON_TYPE

public static final java.lang.String EXTERN_ICON_TYPE
Type string for the extern package icon.

See Also:
Constant Field Values

iconType

public java.lang.String iconType
String specifying the type of the icon. This allows to change the icon during runtime. For example if a node leads to a cycle.

Constructor Detail

MyTreeNode

public MyTreeNode()
Creates a tree node that has no parent and no children, but which allows children.


MyTreeNode

public MyTreeNode(java.lang.Object userObject)
Creates a tree node with no parent, no children, but which allows children, and initializes it with the specified user object.

Parameters:
userObject - an Object provided by the user that constitutes the node's data

MyTreeNode

public MyTreeNode(java.lang.Object userObject,
                  boolean allowsChildren)
Creates a tree node with no parent, no children, initialized with the specified user object, and that allows children only if specified.

Parameters:
userObject - an Object provided by the user that constitutes the node's data
allowsChildren - if true, the node is allowed to have child nodes -- otherwise, it is always a leaf node


Copyright © 2003 ELCA Informatique SA. All Rights Reserved.