Extension SDK 10.1.2

oracle.ide.explorer
Class ExplorerContextUtil

java.lang.Object
  extended byoracle.ide.explorer.ExplorerContextUtil

public final class ExplorerContextUtil
extends java.lang.Object

The ExplorerContextUtil 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 ExplorerContextUtil.ExpandInfo
          The ExpandInfo class stores the tree path of a node is string form.
 
Constructor Summary
ExplorerContextUtil()
           
 
Method Summary
static TNode[] getAllTNodes(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 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 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplorerContextUtil

public ExplorerContextUtil()
Method Detail

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.


getAllTNodes

public static TNode[] getAllTNodes(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.


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 ExplorerContextUtil.ExpandInfo.


restoreExpansionState

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

Extension SDK

 

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