harmonic.mz.gui
Class NodeTreeBox

java.lang.Object
  |
  +--HWPanel
        |
        +--harmonic.mz.gui.NodeTreeBox
All Implemented Interfaces:
java.util.EventListener, java.awt.event.ItemListener, NodeListener

public class NodeTreeBox
extends HWPanel
implements java.awt.event.ItemListener, NodeListener

This is a special tree interface that automatically handles the conversion of DataNode's to user interface tree.

See Also:
Serialized Form

Field Summary
 boolean bOnlyObjectInfo
           
 boolean bOnlyObjects
           
 boolean bShowCount
          Show child count
 boolean bShowOnSelect
          Show ShapeDef's when selected
 boolean bShowSerialNo
          Show serial number
 boolean bShowTypeNames
          Show type names
 boolean bShowUpdates
          Show collaboration update information
 java.awt.Color textColor
           
 java.awt.Color textShadowColor
           
 java.awt.Color valueColor
           
 
Constructor Summary
NodeTreeBox()
          Constructs a NodeTreeBox
NodeTreeBox(java.lang.Object l, java.lang.String cb)
          Constructs a NodeTreeBox
 
Method Summary
 void addFreeNode(DataNode node, DataNode parent, java.lang.String altName)
          Fakes in a node under the given parent.
 void expandChildren(DataNode node)
          Expand all children of 'node'.
 void expandNode(DataNode node)
          Expand the node.
 void expandPath(DataNode node)
          Expand all parents of node to make this node visible.
 void format(int w, int h)
           
 DataNode[] getSelection()
          Return selected DataNodes.
 DataNode getSingleSelection()
          Return selected DataNode.
 boolean isExpanded(DataNode node)
          Return whether node is expanded.
 boolean isInExpandedPath(DataNode node)
          Return whether node is in expanded path.
 void itemStateChanged(java.awt.event.ItemEvent _event)
           
static java.lang.String listString(DataNode jvnode, boolean bShowTypeNames, boolean bShowSerialNo, boolean bOnlyObjectInfo)
           
 void makeVisible(DataNode node)
          Make node visible in tree box.
 void nodeChanged(NodeEvent event)
          Node has changed
 void rebuildTree()
          Rebuild the tree, cleaning up any extra structures.
 void setRoot(DataNode node)
          Set root node of tree drawing.
 void startRename(DataNode jvnode)
          Start renaming function on the node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bShowOnSelect

public boolean bShowOnSelect
Show ShapeDef's when selected


bShowTypeNames

public boolean bShowTypeNames
Show type names


bShowSerialNo

public boolean bShowSerialNo
Show serial number


bShowCount

public boolean bShowCount
Show child count


bShowUpdates

public boolean bShowUpdates
Show collaboration update information


bOnlyObjects

public boolean bOnlyObjects

bOnlyObjectInfo

public boolean bOnlyObjectInfo

textColor

public java.awt.Color textColor

textShadowColor

public java.awt.Color textShadowColor

valueColor

public java.awt.Color valueColor
Constructor Detail

NodeTreeBox

public NodeTreeBox()
Constructs a NodeTreeBox


NodeTreeBox

public NodeTreeBox(java.lang.Object l,
                   java.lang.String cb)
Constructs a NodeTreeBox

Method Detail

format

public void format(int w,
                   int h)

getSingleSelection

public DataNode getSingleSelection()
Return selected DataNode.


getSelection

public DataNode[] getSelection()
Return selected DataNodes.


rebuildTree

public void rebuildTree()
Rebuild the tree, cleaning up any extra structures. This is using a general tree widget that builds a second tree of its own, that could have pointers to the database tree elements. Rebuilding avoids memory leaks.


setRoot

public void setRoot(DataNode node)
Set root node of tree drawing. Nodes in tree interface are automatically computed by assuming the tree will follow the DataNode's tree structure


addFreeNode

public void addFreeNode(DataNode node,
                        DataNode parent,
                        java.lang.String altName)
Fakes in a node under the given parent. This makes it possible to present the tree in a way other than it actually exists in database.


expandChildren

public void expandChildren(DataNode node)
Expand all children of 'node'.


expandPath

public void expandPath(DataNode node)
Expand all parents of node to make this node visible.


expandNode

public void expandNode(DataNode node)
Expand the node.


isInExpandedPath

public boolean isInExpandedPath(DataNode node)
Return whether node is in expanded path.


isExpanded

public boolean isExpanded(DataNode node)
Return whether node is expanded.


makeVisible

public void makeVisible(DataNode node)
Make node visible in tree box.


startRename

public void startRename(DataNode jvnode)
Start renaming function on the node


itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent _event)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

nodeChanged

public void nodeChanged(NodeEvent event)
Description copied from interface: NodeListener
Node has changed

Specified by:
nodeChanged in interface NodeListener

listString

public static java.lang.String listString(DataNode jvnode,
                                          boolean bShowTypeNames,
                                          boolean bShowSerialNo,
                                          boolean bOnlyObjectInfo)