Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.ide.explorer
Class TreeExplorer

java.lang.Object
  extended by oracle.ide.view.View
      extended by oracle.ide.explorer.Explorer
          extended by oracle.ide.explorer.TreeExplorer

All Implemented Interfaces:
ControllerProvider, IconOverlayConsumer, Helpable

public abstract class TreeExplorer
extends Explorer
implements IconOverlayConsumer

The TreeExplorer interface defines the API for managing the nodes in the navigator and explorer trees.


Field Summary
static java.lang.String DELETE_TNODE_CMD
           

 

Fields inherited from class oracle.ide.explorer.Explorer
CLOSED, defaultNode, defaultProject, defaultWorkspace, HIDDEN, SHOWN

 

Fields inherited from class oracle.ide.view.View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP

 

Constructor Summary
TreeExplorer()
           

 

Method Summary
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)
          Associate the specified node and filter.
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)
          Factory method for creating a TNode that will represent the specified Element in this TreeExplorer.
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)
          Find the ChildFilter associated with the specified node.
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)
          Lod the filters for the view identified by the viewId from the specified layout.
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)
          Save the filters for the view identified by the viewId in the specified layout.
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.

 

Methods inherited from class oracle.ide.explorer.Explorer
getContextMenu, getController, getTitle, setContext, setOwner, stateChanged

 

Methods inherited from class oracle.ide.view.View
activate, 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, updateVisibleActions

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.ide.explorer.IconOverlayConsumer
getElement, getOverlayCache, setOverlayCache

 

Field Detail

DELETE_TNODE_CMD

public static final java.lang.String DELETE_TNODE_CMD
See Also:
Constant Field Values

Constructor Detail

TreeExplorer

public TreeExplorer()

Method Detail

createTNode

public abstract TNode createTNode(Element element)
Factory method for creating a TNode that will represent the specified Element in this TreeExplorer.

findTNode

public abstract TNode findTNode(Element element,
                                TNode root)
Find the 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.

findTNode

public TNode findTNode(Element element,
                       TNode root,
                       Context context)
Find the 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.

findTNodeBreadthFirst

public abstract TNode findTNodeBreadthFirst(Element element,
                                            TNode root)
Find the 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.

searchTNode

public abstract TNode searchTNode(Element element,
                                  TNode root)
Search for the 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.


searchTNode

public TNode searchTNode(Element element,
                         TNode root,
                         Context context)
Search for the 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.


searchTNodeBreadthFirst

public abstract TNode searchTNodeBreadthFirst(Element element,
                                              TNode root)
Search for the 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.


findCacheFilter

public abstract ChildFilter findCacheFilter(TNode node)
Find the ChildFilter associated with the specified node. Returns null if no filter is found.

cacheFilter

public abstract void cacheFilter(TNode node,
                                 ChildFilter filter)
Associate the specified node and filter.

saveFilters

public abstract void saveFilters(PropertyAccess layout)
Save the filters for the view identified by the viewId in the specified layout.

openFilters

public abstract void openFilters(PropertyAccess layout)
Lod the filters for the view identified by the viewId from the specified layout.

addChildren

public abstract void addChildren(TNode root)
Add the children to the specified root TNode. If a ChildFilter is found for root, this method gets the children from the filter.

addChild

public abstract TNode addChild(Element element,
                               TNode parent,
                               javax.swing.tree.DefaultTreeModel model)
Add the specified element to the model as a child of parent. Returns the TNode encapsulating the Element.

removeChild

public abstract TNode removeChild(TNode child,
                                  javax.swing.tree.DefaultTreeModel model)
Remove the specified child from the model. Returns the TNode closest to the removed child.

open

public abstract boolean open(TNode node)
Add the children of the specified node. If the node is already opened this method returns immediately. Reloads the tree model once the children are added to the node.

nodeChanged

public abstract void nodeChanged(TNode tnode)
Call this method when you want to repaint the cell associated with the specified tnode. The TNode should not be null.

refresh

public abstract void refresh(TNode tnode)
Drops all children of the specified tnode and immediately collects them again.

refresh

public 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.
Parameters:
node - The target node.
cls - The class of the data object contained by the ancestor of tnode that should be refreshed.

canRefresh

public 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.
Parameters:
node - The target node.
cls - The class of the data object contained by the ancestor of tnode that should be refreshed.

expand

public abstract void expand(TNode tnode,
                            boolean all)
Expand the specified 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.

expand

public abstract void expand(TNode tnode,
                            boolean all,
                            boolean select)
Expand the specified 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.

collapse

public abstract void collapse(TNode tnode,
                              boolean drop)
Collapse the specified tnode. If drop is set to true, it drops all children.

setSelected

public abstract void setSelected(TNode tnode)
Select the given tnode in the tree.

setSelected

public abstract void setSelected(TNode[] tnodes)
Select the given tnodes in the tree.

getTreeModel

public abstract javax.swing.tree.DefaultTreeModel getTreeModel()
Returns the tree model associated with this TreeExplorer.

getComparator

public abstract java.util.Comparator getComparator()
Get the Comparator that is used to sort the children of this node.

setComparator

public abstract void setComparator(java.util.Comparator comparator)
Set the 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.
Parameters:
comparator - The Comparator used for sorting the children of this node; if null, the children are not sorted.

getRoot

public abstract TNode getRoot()
Returns the root TNode in the tree.

getJTree

public abstract javax.swing.JTree getJTree()
Returns the JTree.
Specified by:
getJTree in interface IconOverlayConsumer

getGUI

public abstract java.awt.Component getGUI()
Returns the component managing the tree. It is this component that should be added to the user interface hosting the tree explorer.
Specified by:
getGUI in class View
Returns:
the root graphical user interface component.

getCellRendererAttributes

public abstract Attributes getCellRendererAttributes()
Renderer attribute control how nodes should be rendered. For example, setting the ALWAYS_BOLD_ACTIVE_NODE attribute will cause the tree to show active nodes in bold characters even when the tree does not have the focus.

isSelectAddedChild

protected static boolean isSelectAddedChild(UpdateMessage message,
                                            boolean defaultValue)

setSelectAddedChild

public static void setSelectAddedChild(UpdateMessage message,
                                       boolean selectAddedChild)

setRoot

protected void setRoot(Element e)
Sets the root element of the tree. This implementation does nothing.
Parameters:
e - the root element of the tree
Since:
11.0

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


Copyright © 1997, 2013, Oracle. All rights reserved.