List of usage examples for javafx.collections ObservableList sorted
public default SortedList<E> sorted(Comparator<E> comparator)
From source file:ninja.eivind.hotsreplayuploader.window.nodes.UploaderNode.java
private void bindList() { final ObservableList<ReplayFile> files = uploaderService.getFiles(); newReplaysCount.setText(String.valueOf(files.size())); files.addListener(//from ww w. j a v a2s . c o m (ListChangeListener<ReplayFile>) c -> newReplaysCount.setText(String.valueOf(files.size()))); newReplaysView.setItems(files.sorted(new ReplayFileComparator())); newReplaysView.setCellFactory(new CustomListCellFactory(uploaderService)); uploadedReplays.textProperty().bind(uploaderService.getUploadedCount()); }