## groovy.ui.text
Class FindReplaceUtility

author:
  Evan "Hippy" Slatis

Field Summary
`JPanel` | `BUTTON_PANEL`
`JPanel` | `CHECK_BOX_PANEL`
`Action` | `CLOSE_ACTION`
`String` | `CLOSE_ACTION_COMMAND`
`JButton` | `CLOSE_BUTTON`
`JPanel` | `ENTRY_PANEL`
`EventListenerList` | `EVENT_LISTENER_LIST`
`Action` | `FIND_ACTION`
`String` | `FIND_ACTION_COMMAND`
`JButton` | `FIND_BUTTON`
`JComboBox` | `FIND_FIELD`
`JLabel` | `FIND_LABEL`
`JPanel` | `FIND_PANEL`
`JDialog` | `FIND_REPLACE_DIALOG`
`JCheckBox` | `IS_BACKWARDS_CHECKBOX`
`JCheckBox` | `MATCH_CASE_CHECKBOX`
`Action` | `REPLACE_ACTION`
`String` | `REPLACE_ACTION_COMMAND`
`String` | `REPLACE_ALL_ACTION_COMMAND`
`JButton` | `REPLACE_ALL_BUTTON`
`JButton` | `REPLACE_BUTTON`
`JComboBox` | `REPLACE_FIELD`
`JLabel` | `REPLACE_LABEL`
`JPanel` | `REPLACE_PANEL`
`Segment` | `SEGMENT`
`JPanel` | `TEXT_FIELD_PANEL`
`FocusAdapter` | `TEXT_FOCUS_LISTENER`
`JCheckBox` | `WRAP_SEARCH_CHECKBOX`
`AttributeSet` | `attributeSet`
`int` | `findReplaceCount`
`String` | `lastAction`
`JTextComponent` | `textComponent`

Constructor Summary
`FindReplaceUtility()`

Method Summary
`static void` | `addTextListener(TextListener tl)`
`static int` | `findNext(boolean reverse, int pos)` Find and select the next searchable matching text.
`static void` | `fireTextEvent()`
`static String` | `getLastAction()`
`static int` | `getReplacementCount()`
`static String` | `getSearchText()`
`static void` | `registerTextComponent(JTextComponent textComponent)`
`static void` | `removeTextListener(TextListener tl)`
`static void` | `setListStrings()`
`static void` | `showDialog()`
`static void` | `showDialog(boolean isReplace)`
`static void` | `unregisterTextComponent(JTextComponent textComponent)`

Constructor Detail

### FindReplaceUtility

    FindReplaceUtility()

Method Detail

### addTextListener

    public static void addTextListener(TextListener tl)

### findNext

    static int findNext(boolean reverse, int pos)

  Find and select the next searchable matching text.
  param:
    reverse look forwards or backwards
  param:
    pos the starting index to start finding from
  return:
    the location of the next selected, or -1 if not found

### fireTextEvent

    static void fireTextEvent()

### getLastAction

    public static String getLastAction()

  return:
    the last action

### getReplacementCount

    public static int getReplacementCount()

  return:
    the replacement count

### getSearchText

    public static String getSearchText()

  return:
    the search text

### registerTextComponent

    public static void registerTextComponent(JTextComponent textComponent)

  param:
    textComponent the text component to listen to

### removeTextListener

    public static void removeTextListener(TextListener tl)

### setListStrings

    static void setListStrings()

### showDialog

    public static void showDialog()

### showDialog

    public static void showDialog(boolean isReplace)

  param:
    isReplace show a replace dialog rather than a find dialog if true

### unregisterTextComponent

    public static void unregisterTextComponent(JTextComponent textComponent)

  param:
    textComponent the text component to stop listening to