|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
symantec.itools.awt.TreeView
wt.clients.beans.classbrowser.ClassBrowser
This class has been designed for presenting a tree view of the hierarchy
of class in Windchill.
It is implementing a ClassTreeModel
for manipulating
the data.
There is several way to use it :
import fd.wt.clients.beans.classbrowser.ClassBrowser;
import fd.wt.clients.beans.classbrowser.ClassTreeModel;
Inside the class :
// Creation of the class browser
ClassBrowser lClassBrowser = new ClassBrowser();
add( lClassBrowser );
import fd.wt.clients.beans.classbrowser.ClassBrowser;
import fd.wt.clients.beans.classbrowser.ClassTreeModel;
// Use any operation that retrieve a ClassTreeModel
ClassTreeModel lModel = XXXX.getClassModel();
// Create the display by specifying the model and add the display to the
main panel
ClassBrowser lClassBrowser = new ClassBrowser( lModel);
add( lClassBrowser );
Nested Class Summary | |
protected class |
ClassBrowser.TreeModelHandler
Listens to the model and updates the tree as needed |
Nested classes inherited from class symantec.itools.awt.TreeView |
|
Nested classes inherited from class java.awt.Panel |
Panel.AccessibleAWTPanel |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
private boolean |
repaintOnShowModeChange
Set if the tree should be updated each time that a value is changed. |
private ClassTreeModel |
treeModel
The model of the class browser |
private TreeModelListener |
treeModelListener
|
Fields inherited from class symantec.itools.awt.TreeView |
actionListener, adjustment, CHILD, count, e, errors, fm, focus, g1, horizontalScrollBar, im1, isSun1_1, itemListener, key, LAST, mouse, needResetVector, newWidth, NEXT, NODE_COLLAPSED, NODE_EXPANDED, NODE_TOGGLED, redrawTriggered, rootNode, sbHLineIncrement, sbHShow, sbHSize, sbVShow, SEL_CHANGED, selectedNode, topVisibleNode, v, verticalScrollBar, viewCount, viewHeight, viewWidest, viewWidth |
Fields inherited from class java.awt.Panel |
|
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ClassBrowser()
Construct a new ClassBrowser creating a default class browser model |
|
ClassBrowser(ClassTreeModel pModel)
Construct a new class browser using pModel as the model. |
|
ClassBrowser(String pRootClass)
Construct a new class browser using pRootClass as the root class of the tree |
|
ClassBrowser(String pRootClass,
String pLabelForRootNode)
Construct a new class browser using pRootClass as the root class of the tree
and pLabelForRootNode as the label for the root node. |
|
ClassBrowser(String pRootClass,
String pLabelForRootNode,
String pClassForRootNode)
Construct a new class browser using pRootClass as the root class of the tree,
pLabelForRootNode as the label for the root node,
and pClassForRootNode as the class name for the root node. |
Method Summary | |
protected TreeModelListener |
createTreeModelListener()
Creates and returns an instance of TreeModelHandler. |
void |
fillTree()
This operation is (re)creating the tree based on the model attached. |
private void |
fillTree(symantec.itools.awt.TreeNode pLastNode,
ClassTreeNode pModelRootNode)
Add a node ( pModelRootNode ) to the tree (to pLastNode )
and ask for attaching its children |
protected static ClassTreeModel |
getDefaultClassTreeModel()
Create a default model for the class tree |
ClassTreeModel |
getModel()
Answer the class tree model currently active |
String |
getRootClassname()
Invoke that method to retrieve the name of the root class. The return value could be different than the one set with setRootClass if a classForRootNode has been specified ! |
String |
getSelectedClassname()
Invoke that method to retrieve the name of the class that has been selected in the tree |
void |
setModel(ClassTreeModel pModel)
Set the class tree model to pModel. |
Methods inherited from class symantec.itools.awt.TreeView |
addActionListener, addChild, addItemListener, addNotify, addSibling, addSibling, append, changeSelection, clear, compWidth, debugVector, drawDotLine, drawNodeText, drawNodeToggle, drawTree, exists, exists, findLastPreSpace, getBgHilite, getCount, getFgHilite, getMinimumSize, getPreferredSize, getRootNode, getSelectedNode, getSelectedObjects, getSelectedText, getTreeStructure, getViewCount, handleAdjustmentEvent, handleFocusGained, handleFocusLost, handleKeyPressed, handleMousePressed, handleMouseReleased, insert, isFocusTraversable, minimumSize, newTreeNode, paint, parseTreeStructure, preferredSize, printTree, printTree, recount, redraw, redraw, remove, remove, removeActionListener, removeItemListener, removeNotify, removeSelected, repaint, resetVector, sendActionEvent, setLayout, setSelectedNode, setTreeStructure, traverse, triggerRedraw, update, vectorize |
Methods inherited from class java.awt.Panel |
getAccessibleContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private ClassTreeModel treeModel
private boolean repaintOnShowModeChange
true
.
private TreeModelListener treeModelListener
Constructor Detail |
public ClassBrowser()
public ClassBrowser(ClassTreeModel pModel)
pModel
- the model used for the displaypublic ClassBrowser(String pRootClass)
pRootClass
as the root class of the tree
pRootClass
- the fully qualified class name for the root of the treepublic ClassBrowser(String pRootClass, String pLabelForRootNode)
pRootClass
as the root class of the tree
and pLabelForRootNode
as the label for the root node.
pRootClass
- the fully qualified class name for the root of the treepLabelForRootNode
- the label for the root nodepublic ClassBrowser(String pRootClass, String pLabelForRootNode, String pClassForRootNode)
pRootClass
as the root class of the tree,
pLabelForRootNode
as the label for the root node,
and pClassForRootNode
as the class name for the root node.
pRootClass
- the fully qualified class name for the root of the treepLabelForRootNode
- the label for the root nodepClassForRootNode
- the fully qualified class name for the root nodeMethod Detail |
protected static ClassTreeModel getDefaultClassTreeModel()
public void setModel(ClassTreeModel pModel)
pModel
- the class tree model to usepublic ClassTreeModel getModel()
public String getRootClassname()
public String getSelectedClassname()
public void fillTree()
getModel()
private void fillTree(symantec.itools.awt.TreeNode pLastNode, ClassTreeNode pModelRootNode)
pModelRootNode
) to the tree (to pLastNode
)
and ask for attaching its children
pLastNode
- the last node that has been attached to the treepModelRootNode
- the node that should be addedprotected TreeModelListener createTreeModelListener()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |