Exemplo n.º 1
0
  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());
  }
Exemplo n.º 2
0
  /**
   * 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;
  }
Exemplo n.º 3
0
 private boolean hasText() {
   return searchField.getText() != null && searchField.getText().length() > 0;
 }
Exemplo n.º 4
0
 /**
  * Convienence method.
  *
  * @see CdInputSearchText#getFindButton()
  * @return the search button
  */
 protected final JButton searchButton() {
   return searchField.getFindButton();
 }