use of org.jdesktop.swingx.JXSearchField in project com.revolsys.open by revolsys.
the class FieldFilterPanel method removeListeners.
@SuppressWarnings("rawtypes")
private void removeListeners(final JComponent component) {
if (component instanceof AbstractRecordQueryField) {
final AbstractRecordQueryField queryField = (AbstractRecordQueryField) component;
queryField.removePropertyChangeListener("selectedRecord", this);
} else if (component instanceof JXSearchField) {
final JXSearchField searchTextField = (JXSearchField) component;
searchTextField.removeActionListener(this);
} else if (component instanceof JComboBox) {
final JComboBox comboField = (JComboBox) component;
comboField.removeActionListener(this);
} else if (component instanceof DateField) {
final DateField dateField = (DateField) component;
dateField.removeActionListener(this);
}
if (component instanceof Field) {
final Field field = (Field) component;
final String fieldName = field.getFieldName();
Property.removeListener(field, fieldName, this);
}
}
use of org.jdesktop.swingx.JXSearchField in project com.revolsys.open by revolsys.
the class FieldFilterPanel method addListeners.
private void addListeners(final JComponent component) {
if (component instanceof AbstractRecordQueryField) {
final AbstractRecordQueryField queryField = (AbstractRecordQueryField) component;
queryField.addPropertyChangeListener("selectedRecord", this);
} else if (component instanceof JXSearchField) {
final JXSearchField searchTextField = (JXSearchField) component;
searchTextField.addActionListener(this);
} else if (component instanceof JTextComponent) {
final JTextComponent searchTextField = (JTextComponent) component;
searchTextField.getDocument().addDocumentListener(this);
} else if (component instanceof DateField) {
final DateField dateField = (DateField) component;
dateField.addActionListener(this);
}
if (component instanceof Field) {
final Field field = (Field) component;
final String fieldName = field.getFieldName();
Property.addListener(field, fieldName, this);
}
}
Aggregations