wt.clients.beans.explorer
Class WTNode

java.lang.Object
  extended bysymantec.itools.awt.TreeNode
      extended bywt.clients.beans.explorer.WTNode
All Implemented Interfaces:
Serializable

public class WTNode
extends symantec.itools.awt.TreeNode

Windchill Technology Explorer Node Class (WTNode)

This is a tree node used to display a WTObject recursive structure, such as a part uses part hierarchy.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
static String DesktopTYPE
          The desktop node type.
private  boolean myChildrenCache
           
private  Image myCollapsedImage
           
private  Vector myDetail
           
private  boolean myDetailsCache
           
private  Image myExpandedImage
           
private static WTNode myExpandEvent
           
private  Explorable myObj
           
private  symantec.itools.awt.TreeView myTreeView
           
private  String myType
           
static String NodeTYPE
          The generic node type.
static String ProductTYPE
          The product node type.
static String SearchingTYPE
          The searching node type.
 
Fields inherited from class symantec.itools.awt.TreeNode
 
Constructor Summary
WTNode(Explorable aObj)
          Constructs a WTNode contained the given object.
WTNode(String aType)
          Constructs a WTNode of the given type
 
Method Summary
 Explorable addDetail(Explorable aDetail)
          Add the specified object from the details list for the node.
 void clearDetail()
          Clear the details for this node.
 void collapse()
          Sets a flag indicating that this node is not expanded.
 void expand()
          Sets a flag indicating that this node is expanded, if it is expandable.
 WTNode getC()
          Get a child of this node.
 Image getCollapsedImage()
          Gets the collapsed image for this node
 Explorable getDetail(int aIndex)
          Return the object at the specified index in the details list for the node.
 Explorable[] getDetails()
           
 Image getExpandedImage()
          Gets the expanded image for this node
static WTNode getExpandEvent()
           
 String getLabel()
          Gets the current text label for this node.
 Explorable getObj()
          Gets the object contained in this node.
 WTNode getP()
          Get a parent node of this node.
 WTNode getS()
          Get a sibling for this node.
 String getType()
          Gets the type of this node.
 boolean is(String aType)
          Determines whether this node is of a specified type.
 boolean isChildrenCacheValid()
          Determines whether the ChildrenCache is valid for this node.
 boolean isDetailsCacheValid()
          Determines whether the DetailsCache is valid for this node.
 void print(String aPad)
          Print debug information about the node to the system console.
 void printTree(String aPad)
          Print debug information about the node and its children to the system console.
 void refresh(Explorable anObj)
          Refresh the node with the specified object
 void refresh(Explorable obj, Explorable[] details)
           
 Explorable removeDetail(Explorable aDetail)
          Remove the specified object from the details list for the node.
 void setChildrenCache(boolean aValid)
          Sets the value for the Children Cache flag.
 void setCollapsedImage(Image i)
          Sets the image to use for this node when it is not expanded.
 void setDetailsCache(boolean aValid)
          Sets the value for the Details Cache flag.
 void setExpandedImage(Image i)
          Sets the image to use for this node when it is expanded.
static void setExpandEvent(WTNode aNode)
           
 void setLabel(String aName)
          Sets the current text label for this node.
 int totalChildren()
          Return the number of children for this node
 int totalDetails()
          Return the number of objects in the details list for the node.
 int totalParents()
          Return the number of parents for this node
 
Methods inherited from class symantec.itools.awt.TreeNode
getChild, getDataObject, getDepth, getImage, getParent, getSibling, getText, isAChildVisible, isASiblingVisible, isExpandable, isExpanded, isHidden, setDataObject, setHidden, setText, toggle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DesktopTYPE

public static String DesktopTYPE
The desktop node type.


SearchingTYPE

public static String SearchingTYPE
The searching node type.


NodeTYPE

public static String NodeTYPE
The generic node type.


ProductTYPE

public static String ProductTYPE
The product node type.


myExpandEvent

private static WTNode myExpandEvent

myType

private String myType

myObj

private Explorable myObj

myChildrenCache

private boolean myChildrenCache

myDetail

private Vector myDetail

myDetailsCache

private boolean myDetailsCache

myExpandedImage

private Image myExpandedImage

myCollapsedImage

private Image myCollapsedImage

myTreeView

private symantec.itools.awt.TreeView myTreeView
Constructor Detail

WTNode

public WTNode(String aType)
Constructs a WTNode of the given type

Parameters:
aType - the type of node to construct

WTNode

public WTNode(Explorable aObj)
Constructs a WTNode contained the given object.

The new node will invoke getIdentity() on the object to get the display string for the tree node. The getStandardIcon() and getOpenIcon() methods are invoked to get the icons displayed in the treeview for the node.

Parameters:
aObj - the object contained by the node
Method Detail

getLabel

public String getLabel()
Gets the current text label for this node.

Returns:
the current text label for this node
See Also:
setLabel(java.lang.String)

setLabel

public void setLabel(String aName)
Sets the current text label for this node.

Parameters:
aName - the text label for this node
See Also:
getLabel()

getType

public String getType()
Gets the type of this node.

Returns:
the type of this node
See Also:
setLabel(java.lang.String)

is

public boolean is(String aType)
Determines whether this node is of a specified type.

Parameters:
aType - the type to test for equivalence.
Returns:
true if the node is of the specified type

getObj

public Explorable getObj()
Gets the object contained in this node.

Returns:
the type of this node
See Also:
setLabel(java.lang.String)

setChildrenCache

public void setChildrenCache(boolean aValid)
Sets the value for the Children Cache flag.

Parameters:
aValid - new value for the cache indicator

isChildrenCacheValid

public boolean isChildrenCacheValid()
Determines whether the ChildrenCache is valid for this node.

Returns:
true if the children cache is valid

setDetailsCache

public void setDetailsCache(boolean aValid)
Sets the value for the Details Cache flag.

Parameters:
aValid - new value for the cache indicator

isDetailsCacheValid

public boolean isDetailsCacheValid()
Determines whether the DetailsCache is valid for this node.

Returns:
true if the details cache is valid

expand

public void expand()
Sets a flag indicating that this node is expanded, if it is expandable.


collapse

public void collapse()
Sets a flag indicating that this node is not expanded.


setExpandEvent

public static void setExpandEvent(WTNode aNode)

getExpandEvent

public static WTNode getExpandEvent()

getC

public WTNode getC()
Get a child of this node.

Returns:
a child node

getP

public WTNode getP()
Get a parent node of this node.

Returns:
the parent node for this node.

getS

public WTNode getS()
Get a sibling for this node.

Returns:
a sibling for this node.

totalChildren

public int totalChildren()
Return the number of children for this node

Returns:
the number of children for this node

totalParents

public int totalParents()
Return the number of parents for this node

Returns:
the number of parents for this node

addDetail

public Explorable addDetail(Explorable aDetail)
Add the specified object from the details list for the node.

Parameters:
aDetail - the detail to add
Returns:
the added object

removeDetail

public Explorable removeDetail(Explorable aDetail)
Remove the specified object from the details list for the node.

Parameters:
aDetail - the detail to remove
Returns:
the removed object

getDetail

public Explorable getDetail(int aIndex)
Return the object at the specified index in the details list for the node.

Parameters:
aIndex - the index of the requested detail
Returns:
the object at the specified index in the details list for the node

getDetails

public Explorable[] getDetails()

totalDetails

public int totalDetails()
Return the number of objects in the details list for the node.

Returns:
the number of objects in the details list for the node

print

public void print(String aPad)
Print debug information about the node to the system console.

Parameters:
aPad - padding before the output message

printTree

public void printTree(String aPad)
Print debug information about the node and its children to the system console.

Parameters:
aPad - padding before the output message

clearDetail

public void clearDetail()
Clear the details for this node.


refresh

public void refresh(Explorable anObj)
             throws WTException
Refresh the node with the specified object

Refresh will clear the details and invoke getContents on the new object to refresh the details cache.

Parameters:
anObj - the new object the node will contain
Throws:
WTException

getCollapsedImage

public Image getCollapsedImage()
Gets the collapsed image for this node

Returns:
the image for this node in its collapsed state

getExpandedImage

public Image getExpandedImage()
Gets the expanded image for this node

Returns:
the image for this node in its expanded state

setCollapsedImage

public void setCollapsedImage(Image i)
Sets the image to use for this node when it is not expanded.

Parameters:
i - the image to use when this node is collapsed
See Also:
setExpandedImage(java.awt.Image)

setExpandedImage

public void setExpandedImage(Image i)
Sets the image to use for this node when it is expanded.

Parameters:
i - the image to use when this node is expanded
See Also:
setCollapsedImage(java.awt.Image)

refresh

public void refresh(Explorable obj,
                    Explorable[] details)
             throws WTException
Throws:
WTException