use of javafx.beans.value.ObservableNumberValue in project VocabHunter by VocabHunter.
the class AbstractFilterModel method bindValues.
protected void bindValues() {
ObservableNumberValue count = countValue();
StringBinding countText = Bindings.createStringBinding(() -> formatTotalWords(count), count);
StringBinding filenameText = Bindings.createStringBinding(() -> filename(file.get()), file);
error.bind(Bindings.equal(count, 0));
countDescription.bind(Bindings.when(error).then(ERROR).otherwise(countText));
filename.bind(filenameText);
}
Aggregations