hades.manager.tree
Class SimObjectTreeNode

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byhades.manager.tree.SortedTreeNode
          extended byhades.manager.tree.SimObjectTreeNode
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public class SimObjectTreeNode
extends SortedTreeNode

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
(package private) static javax.swing.ImageIcon _icon
           
(package private)  ComponentInfo clb
           
(package private)  java.lang.String name
           
 
Fields inherited from class hades.manager.tree.SortedTreeNode
__url, debug
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
SimObjectTreeNode()
           
 
Method Summary
 javax.swing.ImageIcon getIcon()
          this is a base class without icon: return the "unknown" icon
 void handleDoubleClick(BrowserFrame browser)
          handle a tree double click event on this node in the Colibri tree control.
 void handleTreeSelection(BrowserFrame browser)
          load and set the Icon for this SimObject, load and display the name/author/version/description attributes from a CLB and display in the Browser InfoPanel
 void loadComponentInfo()
          load the ComponentInfo CLB file for this tree node.
 void setUserObject(java.lang.Object o)
          override setUserObject to also set our "name" for display in the tree: we want to strip off any remaining directory pathname, and also to strip off the ".clb" extension, if any.
 java.lang.String toString()
           
 
Methods inherited from class hades.manager.tree.SortedTreeNode
add, getURL, loadIcon, msg, setURL
 
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

clb

ComponentInfo clb

name

java.lang.String name

_icon

static javax.swing.ImageIcon _icon
Constructor Detail

SimObjectTreeNode

public SimObjectTreeNode()
Method Detail

getIcon

public javax.swing.ImageIcon getIcon()
Description copied from class: SortedTreeNode
this is a base class without icon: return the "unknown" icon

Overrides:
getIcon in class SortedTreeNode

loadComponentInfo

public void loadComponentInfo()
load the ComponentInfo CLB file for this tree node. The name of the CLB file is taken from the TreeManager full pathname. For startup performance reasons, the CLB loading is delayed until this tree node is first selected.


handleTreeSelection

public void handleTreeSelection(BrowserFrame browser)
load and set the Icon for this SimObject, load and display the name/author/version/description attributes from a CLB and display in the Browser InfoPanel

Overrides:
handleTreeSelection in class SortedTreeNode

handleDoubleClick

public void handleDoubleClick(BrowserFrame browser)
handle a tree double click event on this node in the Colibri tree control. For a SimObject, we try to create a new component in the current design in the active editor.

Overrides:
handleDoubleClick in class SortedTreeNode

setUserObject

public void setUserObject(java.lang.Object o)
override setUserObject to also set our "name" for display in the tree: we want to strip off any remaining directory pathname, and also to strip off the ".clb" extension, if any. For example, called with the full pathname o="Xor2.clb", this method will set name="Xor2".


toString

public java.lang.String toString()