SEBSERV-247

This commit is contained in:
anhefti 2022-01-24 09:24:14 +01:00
parent 2f8f8296d7
commit 7a71839124
2 changed files with 24 additions and 0 deletions

View file

@ -44,6 +44,7 @@ public final class Constants {
public static final int DAY_IN_MIN = 60 * 24;
public static final Character ENTER = '\r';
public static final Character CARRIAGE_RETURN = '\n';
public static final Character CURLY_BRACE_OPEN = '{';
public static final Character CURLY_BRACE_CLOSE = '}';

View file

@ -331,6 +331,11 @@ public class TableFilter<ROW> {
getAriaLabel());
this.textInput.setLayoutData(gridData);
this.textInput.addListener(SWT.KeyUp, event -> {
if (event.keyCode == Constants.ENTER.hashCode()) {
TableFilter.this.entityTable.applyFilter();
}
});
return this;
}
@ -387,6 +392,9 @@ public class TableFilter<ROW> {
this.selector
.adaptToControl()
.setLayoutData(gridData);
this.selector.setSelectionListener(event -> {
TableFilter.this.entityTable.applyFilter();
});
return this;
}
@ -439,6 +447,9 @@ public class TableFilter<ROW> {
this.selector = TableFilter.this.entityTable.widgetFactory.dateSelector(
innerComposite,
getAriaLabel());
this.selector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
return this;
}
@ -532,14 +543,26 @@ public class TableFilter<ROW> {
final WidgetFactory wf = TableFilter.this.entityTable.widgetFactory;
wf.labelLocalized(this.innerComposite, DATE_FROM_TEXT);
this.fromDateSelector = wf.dateSelector(this.innerComposite, getAriaLabel());
this.fromDateSelector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
if (this.withTime) {
this.fromTimeSelector = wf.timeSelector(this.innerComposite, getAriaLabel());
this.fromTimeSelector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
}
wf.labelLocalized(this.innerComposite, DATE_TO_TEXT);
this.toDateSelector = wf.dateSelector(this.innerComposite, getAriaLabel());
this.toDateSelector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
if (this.withTime) {
this.toTimeSelector = wf.timeSelector(this.innerComposite, getAriaLabel());
this.toTimeSelector.addListener(SWT.Selection, event -> {
TableFilter.this.entityTable.applyFilter();
});
}
return this;