ej-technologies

org.gjt.jclasslib.browser
Class BrowserTreeNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byorg.gjt.jclasslib.browser.BrowserTreeNode
All Implemented Interfaces:
Cloneable, MutableTreeNode, Serializable, TreeNode

public class BrowserTreeNode
extends DefaultMutableTreeNode

Tree node contained in the tree of the BrowserTreePane and representing a structural element of the class file format.

Version:
$Revision: 1.1 $ $Date: 2003/08/18 08:00:22 $
Author:
Ingo Kegel
See Also:
Serialized Form

Field Summary
static String NODE_ATTRIBUTE
          Node for an attribute entry (AttributeInfo).
static String NODE_CONSTANT_POOL
          Node for a constant pool entry (CPInfo).
static String NODE_FIELD
          Node for a field entry (FieldInfo).
static String NODE_GENERAL
          Node for general information on the class file structure.
static String NODE_INTERFACE
          Node for an interface entry.
static String NODE_METHOD
          Node for a method entry (MethodInfo).
static String NODE_NO_CONTENT
          Node that does not exhibit detail content.
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
BrowserTreeNode(String text)
          Constructor.
BrowserTreeNode(String text, String type)
          Constructor.
BrowserTreeNode(String text, String type, int index)
          Constructor.
 
Method Summary
 int getIndex()
          Get the index of the node among its siblings.
 String getType()
          Get the type of the node as defined by the NODE_ constants.
 
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

NODE_NO_CONTENT

public static final String NODE_NO_CONTENT
Node that does not exhibit detail content.

See Also:
Constant Field Values

NODE_GENERAL

public static final String NODE_GENERAL
Node for general information on the class file structure.

See Also:
Constant Field Values

NODE_CONSTANT_POOL

public static final String NODE_CONSTANT_POOL
Node for a constant pool entry (CPInfo).

See Also:
Constant Field Values

NODE_INTERFACE

public static final String NODE_INTERFACE
Node for an interface entry.

See Also:
Constant Field Values

NODE_FIELD

public static final String NODE_FIELD
Node for a field entry (FieldInfo).

See Also:
Constant Field Values

NODE_METHOD

public static final String NODE_METHOD
Node for a method entry (MethodInfo).

See Also:
Constant Field Values

NODE_ATTRIBUTE

public static final String NODE_ATTRIBUTE
Node for an attribute entry (AttributeInfo).

See Also:
Constant Field Values
Constructor Detail

BrowserTreeNode

public BrowserTreeNode(String text)
Constructor.

Parameters:
text - the display text.

BrowserTreeNode

public BrowserTreeNode(String text,
                       String type)
Constructor.

Parameters:
text - the display text.
type - the node type. One of the NODE_ constants.

BrowserTreeNode

public BrowserTreeNode(String text,
                       String type,
                       int index)
Constructor.

Parameters:
text - the display text.
type - the node type. One of the NODE_ constants.
index - the logical index of this node.
Method Detail

getType

public String getType()
Get the type of the node as defined by the NODE_ constants.

Returns:
the type

getIndex

public int getIndex()
Get the index of the node among its siblings. This information could be retrieved from a tree but is important structural information and should not be left to chance.

Returns:
the index

ej-technologies