public class FormSearchField extends AbstractFormTextField<java.lang.String>
Adapted from some example code by Elliott Hughes.
Copyright 2012 Partner Software, Inc.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
armed
True if the cancel button is currently armed.
|
protected static java.awt.Color |
GRAY
Color used when cancel button is not armed.
|
protected boolean |
sendsNotificationForEachKeystroke
True if search is set up to provide incremental behavior
by notifying on each keystroke.
|
protected boolean |
showingPlaceholderText
True if the placeholder text is currently shown.
|
gui| Constructor and Description |
|---|
FormSearchField()
Create a new FormSearchField with the placeholder text "Search".
|
FormSearchField(java.lang.String placeholderText)
Create a new FormSearchField with the given placeholder text.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the search and clears the field.
|
protected void |
maybeNotify()
Notify if field is not blank.
|
void |
setSendsNotificationForEachKeystroke(boolean eachKeystroke)
True if search is set up to provide incremental behavior
by notifying on each keystroke.
|
down, getJTextField, getValue, grabFocus, keyPressed, keyReleased, keyTyped, left, right, selectAll, selectNone, setDisabled, setValue, setValueSafely, upaddFieldListener, createPopup, doAction, fireActionRequested, fireValueChanged, getGui, getToolTipText, isDisabled, removeFieldListener, setToolTipText, toString, valueChangedprotected static final java.awt.Color GRAY
protected boolean sendsNotificationForEachKeystroke
protected boolean showingPlaceholderText
protected boolean armed
public FormSearchField(java.lang.String placeholderText)
placeholderText - text shown when field value is blankpublic FormSearchField()
public void cancel()
protected void maybeNotify()
public void setSendsNotificationForEachKeystroke(boolean eachKeystroke)
eachKeystroke - true if incremental