com.BobCo.FileExplorer
Class BobCoFileExplorerTreeNode

java.lang.Object
  |
  +--javax.swing.tree.DefaultMutableTreeNode
        |
        +--com.BobCo.FileExplorer.BobCoFileExplorerTreeNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class BobCoFileExplorerTreeNode
extends javax.swing.tree.DefaultMutableTreeNode

This class extends DefaultMutableTreeNode and provides dynamic update of the tree by issuing commands to the client as branches are expanded.

See Also:
Serialized Form

Field Summary
static int DIRECTORY
           
static int DRIVE
           
static int FILE
           
static int ROOT_MO
           
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Method Summary
 void directoryContentsCommandComplete(ConsoleRequestDirectoryContentsCommand cmd)
          Command completion processing code for a directory contents query command.
 boolean getAllowsChildren()
          Override getAllowsChildren() so that it returns false only for file nodes.
 int getChildCount()
          Override getChildCount() so that it calls loadChildren() the first time a drive or directory node is opened.
 com.tivoli.twg.engine.TWGConManagedObject getConManagedObject()
          Get the console managed object that this node is for.
 java.lang.String getName()
          Get the name of this node for display.
 int getType()
          Returns the type of this node.
 java.lang.Object getUserObject()
          Overrides get user object in order to allow this object to be used properly by the cell renderer
protected  void loadChildren()
          Based on the node type, send an asynchronous command to the client to get the list of drives or the contents or a drive or directory to populate the children of a managed object, drive or directory node.
 void localFixedDrivesCommandComplete(ConsoleRequestLocalFixedDrivesCommand cmd)
          Command completion processing code for a fixed drive query command.
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getChildAfter, getChildAt, getChildBefore, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, 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

ROOT_MO

public static final int ROOT_MO

DRIVE

public static final int DRIVE

DIRECTORY

public static final int DIRECTORY

FILE

public static final int FILE
Method Detail

getAllowsChildren

public boolean getAllowsChildren()
Override getAllowsChildren() so that it returns false only for file nodes.
Overrides:
getAllowsChildren in class javax.swing.tree.DefaultMutableTreeNode

getChildCount

public int getChildCount()
Override getChildCount() so that it calls loadChildren() the first time a drive or directory node is opened.
Overrides:
getChildCount in class javax.swing.tree.DefaultMutableTreeNode

loadChildren

protected void loadChildren()
Based on the node type, send an asynchronous command to the client to get the list of drives or the contents or a drive or directory to populate the children of a managed object, drive or directory node.

getUserObject

public java.lang.Object getUserObject()
Overrides get user object in order to allow this object to be used properly by the cell renderer
Overrides:
getUserObject in class javax.swing.tree.DefaultMutableTreeNode

getType

public int getType()
Returns the type of this node.

getName

public java.lang.String getName()
Get the name of this node for display.

getConManagedObject

public com.tivoli.twg.engine.TWGConManagedObject getConManagedObject()
Get the console managed object that this node is for.

localFixedDrivesCommandComplete

public void localFixedDrivesCommandComplete(ConsoleRequestLocalFixedDrivesCommand cmd)
Command completion processing code for a fixed drive query command. It loops through the output parameters of the command an adds a new drive node to the tree for each one.

directoryContentsCommandComplete

public void directoryContentsCommandComplete(ConsoleRequestDirectoryContentsCommand cmd)
Command completion processing code for a directory contents query command. It loops through the output parameters of the command an adds a new directory or file node to the tree for each one.