de.factoryfx.javafx.data.widget.dataview.UpdatableDataView Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javafxDataEditing Show documentation
Show all versions of javafxDataEditing Show documentation
factoryfx dependency injection framework
The newest version!
package de.factoryfx.javafx.data.widget.dataview;
import java.util.List;
import java.util.function.Supplier;
import de.factoryfx.data.Data;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class UpdatableDataView implements DataView {
private final ObservableList dataList= FXCollections.observableArrayList();
private final Supplier> listSupplier;
public UpdatableDataView(Supplier> listSupplier) {
this.listSupplier = listSupplier;
}
public void update(){
dataList.setAll(listSupplier.get());
}
@Override
public ObservableList dataList(){
update();
return dataList;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy