use of jgnash.util.function.TransactionAgePredicate in project jgnash by ccavanaugh.
the class RegisterTableController method handleFilterChange.
private void handleFilterChange() {
Predicate<Transaction> predicate = new ReconciledPredicate(account.get(), reconciledStateFilterComboBox.valueProperty().get().getReconciledState()).and(new TransactionAgePredicate(transactionAgeFilterComboBox.valueProperty().get().getChronoUnit(), transactionAgeFilterComboBox.valueProperty().get().getAge()));
if (memoFilterTextField != null) {
predicate = predicate.and(new MemoPredicate(memoFilterTextField.getText(), Options.regexForFiltersProperty().get()));
}
if (payeeFilterTextField != null) {
predicate = predicate.and(new PayeePredicate(payeeFilterTextField.getText(), Options.regexForFiltersProperty().get()));
}
filteredTransactionList.setPredicate(predicate);
}
Aggregations