mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-04 12:17:41 +08:00
Ability to override filter fts shortcut listener #PL-5940
This commit is contained in:
parent
e152fc774d
commit
b75f01b9e5
@ -309,12 +309,7 @@ public class FilterDelegateImpl implements FilterDelegate {
|
||||
ftsSearchCriteriaField.setWidth(theme.get("cuba.gui.filter.ftsSearchCriteriaField.width"));
|
||||
ftsSearchCriteriaField.setInputPrompt(getMessage("Filter.enterSearchPhrase"));
|
||||
ftsSearchCriteriaField.requestFocus();
|
||||
filterHelper.addShortcutListener(ftsSearchCriteriaField, new FilterHelper.ShortcutListener("ftsSearch", new KeyCombination(KeyCombination.Key.ENTER, null)) {
|
||||
@Override
|
||||
public void handleShortcutPressed() {
|
||||
applyFts();
|
||||
}
|
||||
});
|
||||
filterHelper.addShortcutListener(ftsSearchCriteriaField, createFtsSearchShortcutListener());
|
||||
controlsLayout.add(ftsSearchCriteriaField);
|
||||
|
||||
searchBtn = componentsFactory.createComponent(Button.class);
|
||||
@ -342,6 +337,15 @@ public class FilterDelegateImpl implements FilterDelegate {
|
||||
controlsLayout.add(ftsSwitch);
|
||||
}
|
||||
|
||||
protected FilterHelper.ShortcutListener createFtsSearchShortcutListener() {
|
||||
return new FilterHelper.ShortcutListener("ftsSearch", new KeyCombination(KeyCombination.Key.ENTER, null)) {
|
||||
@Override
|
||||
public void handleShortcutPressed() {
|
||||
applyFts();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
protected void createFtsSwitch() {
|
||||
ftsSwitch = componentsFactory.createComponent(CheckBox.class);
|
||||
ftsSwitch.setCaption(getMessage("Filter.ftsSwitch"));
|
||||
|
Loading…
Reference in New Issue
Block a user