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

E13403-07

oracle.ide.explorer
Class ExplorerContext

java.lang.Object
  extended by oracle.ide.explorer.ExplorerContext

public final class ExplorerContext
extends java.lang.Object

The ExplorerContext class is a utility class that can be used to get at the extra data the ExplorerWindow stores in the the Context.

This class also contains helpful methods to store and restore the expansion state of nodes in a tree explorer.


Nested Class Summary
static class ExplorerContext.ExpandInfo
          The ExpandInfo class stores the tree path of a node is string form.
 
Method Summary
static TNode findDescendentWithLongLabel(TNode node, java.lang.String longLabel)
          Deprecated. since 11.1.1 with no replacement.
static javax.swing.tree.TreePath findNewPath(TNode currentRoot, javax.swing.tree.TreePath oldPath, boolean matchFullPath)
           
static java.lang.Class getExplorerType(Context context)
          Returns the explorer type set in the context, if any.
static TNode getFirstTNode(Context context)
          Returns the first selected TNode from the specified Context if there is at least one Element selected in the Context and that Element has a corresponding TNode.
static TNode getSingleTNode(Context context)
          Returns the selected TNode from the specified Context if there is only one Element selected in the Context and that Element has a corresponding TNode.
static TNode[] getTNodes(Context context)
          Returns the array of selected TNode objects from the specified Context if there are one or more Element objects selected in the Context and those Element objects have corresponding TNode objects.
static boolean hasNonSiblingTNodes(Context context)
          Asks whether the specified Context has a selection that represents non-sibling TNode objects.
static void restoreExpansionState(TNode tnode, TreeExplorer explorer, java.util.List expandDataList)
           
static void restoreSelectionState(TreeExplorer explorer, java.util.List selectionData)
          Attempts to restore the tree node selections represented by a list of TreePaths previously obtained by calling storeSelectionState.
static void setExplorerType(Context context, java.lang.Class explorerType)
          Sets the explorer type set in the context.
static void setTNodes(Context context, TNode[] tnodes)
          Sets the specified array of TNodes into the specified Context.
static java.util.List storeExpansionState(TNode root, TreeExplorer explorer)
          Returns a list containing the paths of all expanded nodes that are descendant of the specified root node.
static java.util.List storeSelectionState(TreeExplorer explorer)
          Returns a list containing the paths of all selected nodes in the explorer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTNodes

public static TNode[] getTNodes(Context context)
Returns the array of selected TNode objects from the specified Context if there are one or more Element objects selected in the Context and those Element objects have corresponding TNode objects.


setTNodes

public static void setTNodes(Context context,
                             TNode[] tnodes)
Sets the specified array of TNodes into the specified Context.


getExplorerType

public static java.lang.Class getExplorerType(Context context)
Returns the explorer type set in the context, if any.


setExplorerType

public static void setExplorerType(Context context,
                                   java.lang.Class explorerType)
Sets the explorer type set in the context.


getSingleTNode

public static TNode getSingleTNode(Context context)
Returns the selected TNode from the specified Context if there is only one Element selected in the Context and that Element has a corresponding TNode.


getFirstTNode

public static TNode getFirstTNode(Context context)
Returns the first selected TNode from the specified Context if there is at least one Element selected in the Context and that Element has a corresponding TNode.


hasNonSiblingTNodes

public static boolean hasNonSiblingTNodes(Context context)
Asks whether the specified Context has a selection that represents non-sibling TNode objects.


storeExpansionState

public static java.util.List storeExpansionState(TNode root,
                                                 TreeExplorer explorer)
Returns a list containing the paths of all expanded nodes that are descendant of the specified root node. The list contains objects of type ExplorerContext.ExpandInfo.


restoreExpansionState

public static void restoreExpansionState(TNode tnode,
                                         TreeExplorer explorer,
                                         java.util.List expandDataList)

storeSelectionState

public static java.util.List storeSelectionState(TreeExplorer explorer)
Returns a list containing the paths of all selected nodes in the explorer. The returned list contains objects of type TreePath.


restoreSelectionState

public static void restoreSelectionState(TreeExplorer explorer,
                                         java.util.List selectionData)
Attempts to restore the tree node selections represented by a list of TreePaths previously obtained by calling storeSelectionState.


findNewPath

public static javax.swing.tree.TreePath findNewPath(TNode currentRoot,
                                                    javax.swing.tree.TreePath oldPath,
                                                    boolean matchFullPath)

findDescendentWithLongLabel

public static TNode findDescendentWithLongLabel(TNode node,
                                                java.lang.String longLabel)
Deprecated. since 11.1.1 with no replacement.


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

E13403-07

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