private void configureListeners() {
    if (isNativeSearchField()) {
      searchField.removePropertyChangeListener(getHandler());
    } else {
      searchField.addPropertyChangeListener(getHandler());
    }

    // add support for instant search mode in any case.
    searchField.getDocument().addDocumentListener(getHandler());
  }
  /**
   * Removes all installed listeners, the layout and resets the search field original border and
   * removes all children.
   */
  public void uninstallUI(JComponent c) {
    super.uninstallUI(c);

    searchField.removePropertyChangeListener(getHandler());
    searchField.getDocument().removeDocumentListener(getHandler());

    searchField.setLayout(null);
    searchField.removeAll();
    searchField = null;
  }
 private boolean hasText() {
   return searchField.getText() != null && searchField.getText().length() > 0;
 }
 /**
  * Convienence method.
  *
  * @see CdInputSearchText#getFindButton()
  * @return the search button
  */
 protected final JButton searchButton() {
   return searchField.getFindButton();
 }