Search in sources :

Example 1 with TagPredicate

use of jgnash.util.function.TagPredicate 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()));
    }
    predicate = predicate.and(new TagPredicate(tagPane.getSelectedTags()));
    filteredTransactionList.setPredicate(predicate);
}
Also used : ReconciledPredicate(jgnash.util.function.ReconciledPredicate) Transaction(jgnash.engine.Transaction) InvestmentTransaction(jgnash.engine.InvestmentTransaction) TransactionAgePredicate(jgnash.util.function.TransactionAgePredicate) PayeePredicate(jgnash.util.function.PayeePredicate) TagPredicate(jgnash.util.function.TagPredicate) MemoPredicate(jgnash.util.function.MemoPredicate)

Aggregations

InvestmentTransaction (jgnash.engine.InvestmentTransaction)1 Transaction (jgnash.engine.Transaction)1 MemoPredicate (jgnash.util.function.MemoPredicate)1 PayeePredicate (jgnash.util.function.PayeePredicate)1 ReconciledPredicate (jgnash.util.function.ReconciledPredicate)1 TagPredicate (jgnash.util.function.TagPredicate)1 TransactionAgePredicate (jgnash.util.function.TransactionAgePredicate)1