public final class FindReplaceUtility
extends Object
Shared find/replace dialog support for text components used by the console.
| Modifiers | Name | Description |
|---|---|---|
static String |
CLOSE_ACTION_COMMAND |
Action command for closing the dialog. |
static Action |
FIND_ACTION |
Shared action that repeats a find against the active text component. |
static String |
FIND_ACTION_COMMAND |
Action command for find operations. |
static String |
REPLACE_ACTION_COMMAND |
Action command for single replace operations. |
static String |
REPLACE_ALL_ACTION_COMMAND |
Action command for replace-all operations. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static void |
addTextListener(TextListener tl)Registers a listener for dialog text events. |
|
public static void |
dispose()Disposes of the shared find/replace dialog. |
|
public static String |
getLastAction()
|
|
public static int |
getReplacementCount()
|
|
public static String |
getSearchText()
|
|
public static void |
registerTextComponent(JTextComponent textComponent)Starts tracking the supplied text component for find/replace actions. |
|
public static void |
removeTextListener(TextListener tl)Removes a listener for dialog text events. |
|
public static void |
showDialog()Shows the find dialog for the active text component. |
|
public static void |
showDialog(boolean isReplace)Shows either the find or replace dialog for the active text component. |
|
public static void |
unregisterTextComponent(JTextComponent textComponent)Stops tracking the supplied text component for find/replace actions. |
Action command for closing the dialog.
Shared action that repeats a find against the active text component.
Action command for find operations.
Action command for single replace operations.
Action command for replace-all operations.
Registers a listener for dialog text events.
tl - the listener to addDisposes of the shared find/replace dialog.
Starts tracking the supplied text component for find/replace actions.
textComponent - the text component to listen toRemoves a listener for dialog text events.
tl - the listener to removeShows the find dialog for the active text component.
Shows either the find or replace dialog for the active text component.
isReplace - show a replace dialog rather than a find dialog if trueStops tracking the supplied text component for find/replace actions.
textComponent - the text component to stop listening to