private ChangeListener<String> setupSearchField(final JFXTreeTableView<TreeTableViewController.Person> tableView) { return (o, oldVal, newVal) -> tableView.setPredicate(personProp -> { final Person person = personProp.getValue(); return person.firstName.get().contains(newVal) || person.lastName.get().contains(newVal) || Integer.toString(person.age.get()).contains(newVal); }); }
public int getThreadCount() { return threadCount.get(); }
public int getCount() { return count.get(); }
public int getQueueSize() { return queueSize.get(); }
public int getSubdivisionLevel() { return subdivisionLevelProperty == null ? 0 : subdivisionLevelProperty.get(); } public SimpleIntegerProperty subdivisionLevelProperty() {
/** * Needed when displayed along side with table to display datas related to this table. */ public OperationData getFirstElement() { SingleTableStructure table = (SingleTableStructure) processedElement(); if (table.elementsCountProperty().get() > 0) { return table.getFirstItem(); } return null; }
private void updateCount(int count) { if (Platform.isFxApplicationThread()) { int val = newElementsCount.get(); if (val < 0) { newElementsCount.set(count); } else { newElementsCount.set(val + count); } } else { Platform.runLater(() -> { int val = newElementsCount.get(); if (val < 0) { newElementsCount.set(count); } else { newElementsCount.set(val + count); } }); } } }