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

E13403-07

oracle.ide.inspector.find
Class ContainerSearch

java.lang.Object
  extended by oracle.ide.inspector.find.ContainerSearch

public class ContainerSearch
extends java.lang.Object

Default search algorithm for findText. To use, embed an instance of ContainerSearch in a component that implements SearchableComponent, and delegate the findText call to it. To customize the search iterator, subclass ContainerSearch and override createSearchIterator.

See Also:
SearchableContainer

Constructor Summary
ContainerSearch(java.awt.Container container)
           
 
Method Summary
 void attachTo(javax.swing.JComponent container)
          Attach this ContainerSearch object to the specified container as a client property.
 java.util.Iterator<java.awt.Component> createSearchIterator(java.awt.Container root, boolean forward)
          Create an iterator for traversing the component containment hierarchy.
 boolean findText(java.lang.String searchText, boolean searchForward, boolean searchRepeat)
          Default findText implementation.
static ContainerSearch fromContainer(javax.swing.JComponent container)
          Return the ContainerSearch object that was previously attached to the specified container.
 void makeFoundComponentVisible(java.awt.Component c)
          Override if necessary to provide custom logic to make the found component visible.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContainerSearch

public ContainerSearch(java.awt.Container container)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

findText

public boolean findText(java.lang.String searchText,
                        boolean searchForward,
                        boolean searchRepeat)
Default findText implementation.

See Also:
SearchableContainer.findText(java.lang.String, boolean, boolean)

createSearchIterator

public java.util.Iterator<java.awt.Component> createSearchIterator(java.awt.Container root,
                                                                   boolean forward)
Create an iterator for traversing the component containment hierarchy. To be overridden by subclasses needing to customize the traversal.

Parameters:
root - the starting point of the iteration
forward - whether to iterate first-to-last
Returns:
the Component Iterator for traversing the component containment hierarchy.
See Also:
SearchIterator

makeFoundComponentVisible

public void makeFoundComponentVisible(java.awt.Component c)
Override if necessary to provide custom logic to make the found component visible. The default implementation does a scrollRectToVisible of the found component.


fromContainer

public static ContainerSearch fromContainer(javax.swing.JComponent container)
Return the ContainerSearch object that was previously attached to the specified container. Returns NULL if no ContainerSearch was attached.

Parameters:
container - the container from which to retrieve the ContainerSearch object
See Also:
attachTo(javax.swing.JComponent)

attachTo

public void attachTo(javax.swing.JComponent container)
Attach this ContainerSearch object to the specified container as a client property. The ContainerSearch can be retrieved later by calling fromContainer.

Parameters:
container - the container to attach to this ContainerSearch object

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.