public abstract class TreeExplorer extends Explorer implements IconOverlayConsumer
TreeExplorer interface defines the API for managing the nodes in the navigator and explorer trees.| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
DELETE_TNODE_CMD  | 
CLOSED, defaultNode, defaultProject, defaultWorkspace, HIDDEN, SHOWNEMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP| Constructor and Description | 
|---|
TreeExplorer()  | 
| Modifier and Type | Method and Description | 
|---|---|
abstract TNode | 
addChild(Element element, TNode parent, javax.swing.tree.DefaultTreeModel model)
Add the specified  
element to the model as a child of parent. | 
abstract void | 
addChildren(TNode root)
Add the children to the specified  
root TNode. | 
abstract void | 
cacheFilter(TNode node, ChildFilter filter)
Deprecated. 
 
no replacement 
 | 
abstract boolean | 
canRefresh(TNode tnode, java.lang.Class cls)
Check if the ancestor of the specified  
tnode whose data object class is an instance of the specified cls can be refreshed. | 
abstract void | 
collapse(TNode tnode, boolean drop)
Collapse the specified tnode. 
 | 
abstract TNode | 
createTNode(Element element)
 | 
abstract void | 
expand(TNode tnode, boolean all)
Expand the specified  
tnode. | 
abstract void | 
expand(TNode tnode, boolean all, boolean select)
Expand the specified  
tnode. | 
abstract ChildFilter | 
findCacheFilter(TNode node)
Deprecated. 
 
use just  
TNode.getChildFilter() | 
abstract TNode | 
findTNode(Element element, TNode root)
Find the  
TNode encapsulating the specified element. | 
TNode | 
findTNode(Element element, TNode root, Context context)
Find the  
TNode encapsulating the specified element. | 
abstract TNode | 
findTNodeBreadthFirst(Element element, TNode root)
Find the  
TNode encapsulating the specified element. | 
abstract Attributes | 
getCellRendererAttributes()
Renderer attribute control how nodes should be rendered. 
 | 
abstract java.util.Comparator | 
getComparator()
Get the  
Comparator that is used to sort the children of this node. | 
abstract java.awt.Component | 
getGUI()
Returns the component managing the tree. 
 | 
abstract javax.swing.JTree | 
getJTree()
Returns the  
JTree. | 
abstract TNode | 
getRoot()
Returns the root  
TNode in the tree. | 
abstract javax.swing.tree.DefaultTreeModel | 
getTreeModel()
Returns the tree model associated with this  
TreeExplorer. | 
protected static boolean | 
isSelectAddedChild(UpdateMessage message, boolean defaultValue)  | 
abstract void | 
nodeChanged(TNode tnode)
Call this method when you want to repaint the cell associated with the specified tnode. 
 | 
abstract boolean | 
open(TNode node)
Add the children of the specified  
node. | 
abstract void | 
openFilters(PropertyAccess layout)
Deprecated. 
 
no replacement 
 | 
abstract void | 
refresh(TNode tnode)
Drops all children of the specified  
tnode and immediately collects them again. | 
abstract void | 
refresh(TNode tnode, java.lang.Class cls)
Refresh the ancestor of the specified  
tnode whose data object class is an instance of the specified cls. | 
abstract TNode | 
removeChild(TNode child, javax.swing.tree.DefaultTreeModel model)
Remove the specified  
child from the model. | 
abstract void | 
saveFilters(PropertyAccess layout)
Deprecated. 
 
no replacement 
 | 
abstract TNode | 
searchTNode(Element element, TNode root)
Search for the  
TNode encapsulating the specified element. | 
TNode | 
searchTNode(Element element, TNode root, Context context)
Search for the  
TNode encapsulating the specified element. | 
abstract TNode | 
searchTNodeBreadthFirst(Element element, TNode root)
Search for the  
TNode encapsulating the specified element. | 
abstract void | 
setComparator(java.util.Comparator comparator)
Set the  
Comparator that is used to sort the children of this node. | 
protected void | 
setRoot(Element e)
Sets the root element of the tree. 
 | 
static void | 
setSelectAddedChild(UpdateMessage message, boolean selectAddedChild)  | 
abstract void | 
setSelected(TNode tnode)
Select the given  
tnode in the tree. | 
abstract void | 
setSelected(TNode[] tnodes)
Select the given  
tnodes in the tree. | 
getContextMenu, getController, getTitle, setContext, setOwner, stateChangedactivate, addViewListener, addViewSelectionListener, addViewStateListener, close, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getContext, getHelpInfo, getId, getSelection, getSelectionFromUI, getTabName, getToolbar, getViewWithoutDecoration, isVisible, loadLayout, loadManifestToolbar, loadManifestToolbar, newId, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, saveLayout, scheduleUpdateSelection, setId, setToolbarVisible, show, toString, updateSelection, updateSelectionImpl, updateTitle, updateToolbarActions, updateVisibleActions, updateVisibleActionsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetElement, getOverlayCache, setOverlayCachepublic static final java.lang.String DELETE_TNODE_CMD
public abstract TNode findTNode(Element element, TNode root)
TNode encapsulating the specified element. Start looking recursively depth first from the given root node. Unlike searchTNode(Element, TNode), this routine will open unopened child container nodes during the search in order to find the specified element. Since this type of search is potentially costly, searchTNode(Element, TNode) is preferred in most cases.public TNode findTNode(Element element, TNode root, Context context)
TNode encapsulating the specified element. Start looking recursively depth first from the given root node. Unlike searchTNode(Element, TNode), this routine will open unopened child container nodes during the search in order to find the specified element. Since this type of search is potentially costly, searchTNode(Element, TNode) is preferred in most cases.public abstract TNode findTNodeBreadthFirst(Element element, TNode root)
TNode encapsulating the specified element. Start looking recursively breadth first from the given root node. The search does not descend into unopened child container nodes. Unlike searchTNode(Element, TNode), this routine will open unopened child container nodes during the search in order to find the specified element. Since this type of search is potentially costly, searchTNode(Element, TNode) is preferred in most cases.public abstract TNode searchTNode(Element element, TNode root)
TNode encapsulating the specified element. Start looking recursively depth first from the given root node.
The search does not descend into unopened child container nodes.
public TNode searchTNode(Element element, TNode root, Context context)
TNode encapsulating the specified element. Start looking recursively depth first from the given root node.
The search does not descend into unopened child container nodes.
public abstract TNode searchTNodeBreadthFirst(Element element, TNode root)
TNode encapsulating the specified element. Start looking recursively breadth first from the given root node.
The search does not descend into unopened child container nodes.
@Deprecated public abstract ChildFilter findCacheFilter(TNode node)
TNode.getChildFilter()ChildFilter associated with the specified node. Returns null if no filter is found.@Deprecated public abstract void cacheFilter(TNode node, ChildFilter filter)
node and filter.@Deprecated public abstract void saveFilters(PropertyAccess layout)
viewId in the specified layout.@Deprecated public abstract void openFilters(PropertyAccess layout)
viewId from the specified layout.public abstract void addChildren(TNode root)
root TNode. If a ChildFilter is found for root, this method gets the children from the filter.public abstract TNode addChild(Element element, TNode parent, javax.swing.tree.DefaultTreeModel model)
public abstract boolean open(TNode node)
node. If the node is already opened this method returns immediately. Reloads the tree model once the children are added to the node.public abstract void nodeChanged(TNode tnode)
TNode should not be null.public abstract void refresh(TNode tnode)
tnode and immediately collects them again.public abstract void refresh(TNode tnode, java.lang.Class cls)
tnode whose data object class is an instance of the specified cls.node - The target node.cls - The class of the data object contained by the ancestor of tnode that should be refreshed.public abstract boolean canRefresh(TNode tnode, java.lang.Class cls)
tnode whose data object class is an instance of the specified cls can be refreshed.node - The target node.cls - The class of the data object contained by the ancestor of tnode that should be refreshed.public abstract void expand(TNode tnode, boolean all)
tnode. If all is set to true, it recursively expands container children. This form of expand also sets the current selection to each node as it is expanded.public abstract void expand(TNode tnode, boolean all, boolean select)
tnode. If all is set to true, it recursively expands container children. If select is set to true, the current selection is set to each node as it is expanded.public abstract void collapse(TNode tnode, boolean drop)
public abstract void setSelected(TNode tnode)
tnode in the tree.public abstract void setSelected(TNode[] tnodes)
tnodes in the tree.public abstract javax.swing.tree.DefaultTreeModel getTreeModel()
TreeExplorer.public abstract java.util.Comparator getComparator()
Comparator that is used to sort the children of this node.public abstract void setComparator(java.util.Comparator comparator)
Comparator that is used to sort the children of this node. Calling this method has no effect if the node is not a container node. If the comparator has changed, then the child nodes are re-ordered.comparator - The Comparator used for sorting the children of this node; if null, the children are not sorted.public abstract TNode getRoot()
TNode in the tree.public abstract javax.swing.JTree getJTree()
JTree.getJTree in interface IconOverlayConsumerpublic abstract java.awt.Component getGUI()
public abstract Attributes getCellRendererAttributes()
protected static boolean isSelectAddedChild(UpdateMessage message, boolean defaultValue)
public static void setSelectAddedChild(UpdateMessage message, boolean selectAddedChild)
protected void setRoot(Element e)
e - the root element of the tree