| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.panels.MetaTraversable
oracle.ide.panels.Navigable
public class Navigable
Each instance of the Navigable class represents a
  single tree node.  Clicking on that tree node brings up the
  UI corresponding to the associated Traversable.
  A Navigable instance is responsible for building
  part of the tree structure through its createTreeNode(NavigableContext) method.  This allows a
  particular Navigable implementation to provide for more
  complex ways of determining the structure of its subtree.
  Subclasses with additional member fields will also need to override
  the copyTo(Object) and copyToImpl(Navigable)
  methods in order to maintain correct copying behavior.  Without
  the right copying behavior, a Navigable subclass will
  not cooperate properly with a NavigableRegistry.
| Nested Class Summary | |
|---|---|
| static class | Navigable.NavigableComparatorComparatorimplementation used for sorting childNavigableinstances by label. | 
| Field Summary | |
|---|---|
| static int | BOLD | 
| static java.lang.String | DEFAULT_CHILD_COMPARATOR_KEYThe key to use for looking up the default Navigable.NavigableComparatorin aNavigableContext; theComparatoris used for
  sortingNavigablechildren during a call tocreateTreeNode(NavigableContext). | 
| static int | ITALIC | 
| static java.util.Comparator | NAVIGABLE_COMPARATORA standard Navigable.NavigableComparatorthat sortsNavigableinstances
  by the short label. | 
| static int | PLAIN | 
| Constructor Summary | |
|---|---|
| protected  | Navigable()Should only be used by copyTo(Object). | 
| protected  | Navigable(java.lang.String shortLabel)Creates a new Navigablewith the specified
  label. | 
|   | Navigable(java.lang.String shortLabel,
          java.lang.Class traversableClass)Creates a new Navigablewith the specified
  label andTraversableclass. | 
|   | Navigable(java.lang.String shortLabel,
          java.lang.Class traversableClass,
          java.lang.Class[] constructorArgTypes,
          java.lang.Object[] constructorArgs,
          Navigable[] childNavigables) | 
|   | Navigable(java.lang.String shortLabel,
          java.lang.Class traversableClass,
          Navigable[] childNavigables)Creates a new Navigablewith the specified label,Traversableclass, and array of childNavigables. | 
| Method Summary | |
|---|---|
|  void | addChildNavigable(Navigable childNavigable)Adds a new Navigableto the array of child
  Navigables. | 
| protected  void | appendChildNavigables(javax.swing.tree.DefaultMutableTreeNode parent,
                      NavigableContext nc)This method calls getChildNavigables()to get the list of
  childNavigableobjects. | 
| protected  void | appendChildNodes(javax.swing.tree.DefaultMutableTreeNode parent,
                 Navigable[] children,
                 NavigableContext nc)This method invokes createTreeNode(NavigableContext)on eachNavigablespecified inchildrenand adds
  the resultingDefaultMutableTreeNode(if it is notnull) to theparent. | 
| protected  void | appendDetailNavigables(javax.swing.tree.DefaultMutableTreeNode parent,
                       NavigableContext nc)This method calls getDetailNavigables()to get the list
  of detailNavigableobjects. | 
|  java.lang.Object | copyTo(java.lang.Object target)Subclasses must override this method if new member fields are introduced. | 
| protected  void | copyToImpl(Navigable copy)Subclasses must implement an appropriate variant of this method if new member fields are introduced. | 
|  javax.swing.tree.DefaultMutableTreeNode | createDetailRootNode(NavigableContext nc)When the Navigableis used to show detail nodes in a
  separate tree, this method is used to construct the detail tree,
  using the returned tree node as the root of the detail tree; in
  general, onlyNavigableUIContainerimplementations should
  call this method directly. | 
|  javax.swing.tree.DefaultMutableTreeNode | createTreeNode(NavigableContext nc)This method constructs a DefaultMutableTreeNodethat is
  to represent theNavigablein the tree; in general,
  onlyNavigableUIContainerimplementations should call this
  method directly. | 
| protected  javax.swing.tree.DefaultMutableTreeNode | createTreeNodeImpl(NavigableContext nc)This method is the essential method in which a tree node that represents a Navigableis created. | 
| protected  java.util.Comparator | getChildComparator()Fetch the comparator to use for sorting the child navigables. | 
| protected  Navigable[] | getChildNavigables()By default, this returns the child Navigables that were
  set when thisDefaultNavigablewas constructed. | 
|  Navigable[] | getChildren() | 
| protected  Navigable[] | getDetailNavigables()Returns nullby default. | 
|  int | getDisplayStyle() | 
|  javax.swing.Icon | getIcon()This implementation always returns null. | 
|  java.lang.String | getLongLabel()This implementation simply invokes return getShortLabel(). | 
|  java.lang.String | getRawShortLabel()This method returns the entire short label string, including any occurrance of the mnemonic character, &. | 
|  java.lang.String | getShortLabel()This implementation returns the short label that was specified when this Navigablewas created. | 
|  java.lang.String | getToolTipText()This implementation always returns null. | 
|  boolean | includeInDefault() | 
| protected  boolean | mayHaveChildren(NavigableContext nc)Overridable method to determine whether a Navigablemay have
 children such that a + may be shown next to it in the tree. | 
|  void | setChildComparator(java.util.Comparator customComparator)Sets whether the child navigables are sorted or not. | 
| protected  void | setChildNavigables(Navigable[] childNavigables)Accessor for the private data member that stores the current child Navigables. | 
| protected  void | setDataScope(Namespace dataScope)Sets the specified Namespaceas the data scope for thisNavigable. | 
|  void | setDisplayStyle(int displayStyle) | 
|  void | setShortLabel(java.lang.String shortLabel) | 
| protected static Navigable[] | sortNavigables(Navigable[] navigables,
               java.util.Comparator comparator)Sorts the specified Navigablearray using the specifiedNavigable.NavigableComparator, and returns a sorted version of the array. | 
|  java.lang.String | toString() | 
| Methods inherited from class oracle.ide.panels.MetaTraversable | 
|---|
| copyToImpl, findHelpID, getTraversableClass, isUsingTraversableDefaultConstructor, newTraversable, newTraversable, setHelpID, setNameLink | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final int PLAIN
public static final int BOLD
public static final int ITALIC
public static final java.lang.String DEFAULT_CHILD_COMPARATOR_KEY
Navigable.NavigableComparator in a
  NavigableContext; the Comparator is used for
  sorting Navigable children during a call to createTreeNode(NavigableContext).
public static final java.util.Comparator NAVIGABLE_COMPARATOR
Navigable.NavigableComparator that sorts Navigable instances
  by the short label.
| Constructor Detail | 
|---|
protected Navigable(java.lang.String shortLabel)
Navigable with the specified
  label.  There is no associated Traversable class, and the
  Navigable has no children.  In general, this
  constructor will be called by a subclass that overrides MetaTraversable.newTraversable(ApplyNotifier), getChildNavigables(), and/or getDetailNavigables().
shortLabel - The short label to display when rendering the
  UI for the Navigable.
public Navigable(java.lang.String shortLabel,
                 java.lang.Class traversableClass)
Navigable with the specified
  label and Traversable class.  The Navigable
  has no children unless a subclass implementation provides them.
shortLabel - The short label to display when rendering the
  UI for the Navigable.traversableClass - The Class of the Traversable associated with this Navigable.  Since
  many usages of Navigable do not require any
  parameters when instantiating the Traversable, this is
  provided as a convenience.  Note that if the Traversable
  class implements the ApplyListener interface, instances will
  be added as an ApplyListener to the ApplyNotifier linked
  to the NavigableUIContainer.#newTraversable(ApplyNotifier)}.
public Navigable(java.lang.String shortLabel,
                 java.lang.Class traversableClass,
                 Navigable[] childNavigables)
Navigable with the specified label,
  Traversable class, and array of child
  Navigables.
shortLabel - The short label to display when rendering the
  UI for the Navigable.traversableClass - The Class of the Traversable associated with this Navigable.  Since
  many usages of Navigable do not require any
  parameters when instantiating the Traversable, this is
  provided as a convenience.  See MetaTraversable.newTraversable(ApplyNotifier).childNavigables - An array of the children of this
  Navigable.  This parameter may be null
  if there are no children.
public Navigable(java.lang.String shortLabel,
                 java.lang.Class traversableClass,
                 java.lang.Class[] constructorArgTypes,
                 java.lang.Object[] constructorArgs,
                 Navigable[] childNavigables)
protected Navigable()
copyTo(Object).
| Method Detail | 
|---|
public java.lang.Object copyTo(java.lang.Object target)
Copyable for
  details.
copyTo in interface CopyablecopyTo in class MetaTraversabletarget - The target object to which the state of
  this object should be copied.  If target
  is null, then the copyTo method will
  return a new instance of this class.
this
  object was copied.  If the target was
  non-null, then the return value is the same as the
  target object that was passed in; otherwise, the
  return value is a new instance of this class.Copyable.copyTo(Object)protected final void copyToImpl(Navigable copy)
      protected final void copyToImpl(  copy );
   
      super.copyToImpl( copy );
  copyTo(Object) method instantiates
  the correct class when the target is null and also
  provides an extendable way of implementing copying behavior.
copy - The Navigable to which this
  Navigable's state should be copied.public java.lang.String getShortLabel()
Navigable was created. If the mnemonic character
  & was present in the short label, this implementation will strip
  that character out of the returned string.
public java.lang.String getRawShortLabel()
public java.lang.String getLongLabel()
return getShortLabel().
public javax.swing.Icon getIcon()
null.
public java.lang.String getToolTipText()
null.
public java.lang.String toString()
toString in class java.lang.Objectpublic int getDisplayStyle()
public void setDisplayStyle(int displayStyle)
public void setShortLabel(java.lang.String shortLabel)
public void setChildComparator(java.util.Comparator customComparator)
Navigable instance.
customComparator - comparator to use for sorting, null to
         disable sortingprotected java.util.Comparator getChildComparator()
public Navigable[] getChildren()
public javax.swing.tree.DefaultMutableTreeNode createTreeNode(NavigableContext nc)
DefaultMutableTreeNode that is
  to represent the Navigable in the tree; in general,
  only NavigableUIContainer implementations should call this
  method directly.  Subclasses may, of course, override the
  behavior.
  The user object of the returned tree node (and all its descendant
  nodes) must be an instance of Navigable.
  If the return value is null, the
  Navigable is omitted from the tree.
Note: this method returns DefaultMutableTreeNode instead of just MutableTreeNode because the getUserObject(...) method is not specified by MutableTreeNode.
nc - The NavigableContext in which this
  Navigable should render the tree node.
Navigable.public javax.swing.tree.DefaultMutableTreeNode createDetailRootNode(NavigableContext nc)
Navigable is used to show detail nodes in a
  separate tree, this method is used to construct the detail tree,
  using the returned tree node as the root of the detail tree; in
  general, only NavigableUIContainer implementations should
  call this method directly.  Subclasses may, of course, override
  the behavior.
  The root is not actually displayed in the detail tree, so the
  user object associated with the root is not important.  However,
  all descendants of the returned root must also be instances of
  DefaultMutableTreeNode whose user objects are instances
  of Navigable.
  It is important that this method return a non-null
  value, even if there are no detail root nodes.
nc - The NavigableContext in which this
  Navigable should render the tree node.
Navigable has no detail nodes, then
  this method must return an empty tree node.public void addChildNavigable(Navigable childNavigable)
Navigable to the array of child
  Navigables.
The - child Navigable to add.public boolean includeInDefault()
protected void setDataScope(Namespace dataScope)
Namespace as the data scope for this
  Navigable.  This method must be called at some point
  before a Navigable is used in a UI container.
  This is a transient property, so it will not be copied in the
  copyTo(Object) or copyToImpl(Navigable) method.
dataScope - The Namespace that represents the data
  scope for this Navigable.protected Navigable[] getChildNavigables()
Navigables that were
  set when this DefaultNavigable was constructed.
  Subclasses can override this method to specify a custom list of
  children.  The result of this method is used by
  appendChildNavigables(...) to append
  child nodes.
Navigables of this
  Navigable.protected void setChildNavigables(Navigable[] childNavigables)
Navigables.
The - child Navigables to associate with this
  Navigable.protected Navigable[] getDetailNavigables()
null by default.  Subclasses should override
  this method in order to specify a list of detail Navigables.  The result of this method is used by appendDetailNavigables(DefaultMutableTreeNode,
  NavigableContext) to append detail nodes.
Navigables representing the
  detail for this Navigable.  Detail nodes are
  uncommonly used, so in order to specify detail nodes, a subclass
  must override this method's implementation in order to provide
  a return value other than null.protected javax.swing.tree.DefaultMutableTreeNode createTreeNodeImpl(NavigableContext nc)
Navigable is created.  It is called from
  createTreeNode(NavigableContext).  This
  implementation has been separated to express a specific step in
  the Template Method design pattern for creating a
  Navigable tree node.
nc - The NavigableContext in which this
  Navigable should render the tree node.
Navigable has no detail nodes, then
  this method must return an empty tree node.
protected void appendChildNavigables(javax.swing.tree.DefaultMutableTreeNode parent,
                                     NavigableContext nc)
getChildNavigables() to get the list of
  child Navigable objects.  Then this method calls
  appendChildNodes to append the child
  Navigables to the specified parent.
parent - The node to which the child nodes will be added.nc - The NavigableContext in which this
  Navigable should render the child tree nodes.
protected void appendChildNodes(javax.swing.tree.DefaultMutableTreeNode parent,
                                Navigable[] children,
                                NavigableContext nc)
createTreeNode(NavigableContext) on each
  Navigable specified in children and adds
  the resulting DefaultMutableTreeNode (if it is not
  null) to the parent.
parent - The node to which the child nodes will be added.children - The child Navigables whose
  DefaultMutableTreeNode representations are to be added to
  the parent.nc - The NavigableContext in which this
  Navigable should render its tree nodes.
protected void appendDetailNavigables(javax.swing.tree.DefaultMutableTreeNode parent,
                                      NavigableContext nc)
getDetailNavigables() to get the list
  of detail Navigable objects.  Then this method calls
  appendChildNodes to append the detail
  Navigables to the specified parent.
parent - The node to which the detail nodes will be added.nc - The NavigableContext in which this
  Navigable should render its tree nodes.
protected static Navigable[] sortNavigables(Navigable[] navigables,
                                            java.util.Comparator comparator)
Navigable array using the specified
  Navigable.NavigableComparator, and returns a sorted version of the array.  The
  input array is never modified; if the array might need sorting, a
  copy of the array is sorted and returned instead.
protected boolean mayHaveChildren(NavigableContext nc)
Navigable may have
 children such that a + may be shown next to it in the tree.
 Implementations can override this when the result is known a priori and a
 call to getChildNavigables() could be expensive. The test
 should include detail Navigable instances as well if the
 NavigableContext specifies that detail nodes should be shown
 as children
nc - The NavigableContext used to determine the
  context of the check
| 
 | Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.4.0) E17493-05 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||