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

E13403-08

oracle.javatools.ui.search
Class TextComponentSearchSupport

java.lang.Object
  extended by oracle.javatools.ui.search.TextComponentSearchSupport

public final class TextComponentSearchSupport
extends java.lang.Object

Add the ability to do a find within a text component. The 'find' will search the text in a specified direction and highlight text as it finds it. The search can either be triggered manually via search(...), or by a bringing up a mini search dialog via showSearchPrompt()


Constructor Summary
TextComponentSearchSupport(javax.swing.text.JTextComponent component)
           
 
Method Summary
 void clearHighlighting()
          remove any highlighting previously added to the editor via a find
 MiniSearchDialog getMiniSearchDialog()
          This is provided as a way to set a help topic id on the MiniSearchDialog The way this can be coded is as follows: HelpSystem.getHelpSystem().registerTopic(searchSupport.getMiniSearchDialog().getBasePanel(), "f1_idedsearchmessages_html"); //NOTRANS Ideally we'd have a call like MiniSearchDialog.setHelpID(String helpId) but that would mean uic module would have a dependency on ide module which would be a circular dependency.
 void removeSearchSupport()
          Remove the search ability for a text component
 void search(SearchEvent.Direction direction, java.lang.String text)
          Search for the given text in the given direction
 void setEndOfBufferMessage(java.lang.String endOfBufferMessage)
           
 void setNotFoundMessage(java.lang.String notFoundMessage)
           
 void setSearchBackwardsTitle(java.lang.String title)
           
 void setSearchForwardsTitle(java.lang.String title)
           
 void setStartOfBufferMessage(java.lang.String startOfBufferMessage)
           
 void setWrappedMessage(java.lang.String wrappedMessage)
           
 void showSearchPrompt()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextComponentSearchSupport

public TextComponentSearchSupport(javax.swing.text.JTextComponent component)
Method Detail

removeSearchSupport

public void removeSearchSupport()
Remove the search ability for a text component


setSearchForwardsTitle

public void setSearchForwardsTitle(java.lang.String title)

setSearchBackwardsTitle

public void setSearchBackwardsTitle(java.lang.String title)

setNotFoundMessage

public void setNotFoundMessage(java.lang.String notFoundMessage)

setWrappedMessage

public void setWrappedMessage(java.lang.String wrappedMessage)

setStartOfBufferMessage

public void setStartOfBufferMessage(java.lang.String startOfBufferMessage)

setEndOfBufferMessage

public void setEndOfBufferMessage(java.lang.String endOfBufferMessage)

getMiniSearchDialog

public MiniSearchDialog getMiniSearchDialog()
This is provided as a way to set a help topic id on the MiniSearchDialog The way this can be coded is as follows: HelpSystem.getHelpSystem().registerTopic(searchSupport.getMiniSearchDialog().getBasePanel(), "f1_idedsearchmessages_html"); //NOTRANS Ideally we'd have a call like MiniSearchDialog.setHelpID(String helpId) but that would mean uic module would have a dependency on ide module which would be a circular dependency.

Returns:
the mini search dialog the text component search support will display

showSearchPrompt

public void showSearchPrompt()

search

public void search(SearchEvent.Direction direction,
                   java.lang.String text)
Search for the given text in the given direction

Parameters:
direction -
text -

clearHighlighting

public void clearHighlighting()
remove any highlighting previously added to the editor via a find


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

E13403-08

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