本文整理了Java中javafx.collections.ObservableList.sorted()
方法的一些代码示例,展示了ObservableList.sorted()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObservableList.sorted()
方法的具体详情如下:
包路径:javafx.collections.ObservableList
类名称:ObservableList
方法名:sorted
暂无
代码示例来源:origin: PhoenicisOrg/phoenicis
private InstallationsSidebar createInstallationsSidebar() {
final SortedList<InstallationCategoryDTO> sortedCategories = this.categories
.sorted(Comparator.comparing(InstallationCategoryDTO::getName));
return new InstallationsSidebar(this.filter, this.javaFxSettingsManager, sortedCategories,
this.activeInstallations);
}
代码示例来源:origin: PhoenicisOrg/phoenicis
private ContainersSidebar createContainersSidebar(CombinedListWidget<ContainerDTO> availableContainers) {
/*
* initialize the container categories by sorting them
*/
final SortedList<ContainerCategoryDTO> sortedCategories = this.categories
.sorted(Comparator.comparing(ContainerCategoryDTO::getName));
return new ContainersSidebar(this.filter, this.javaFxSettingsManager, sortedCategories, availableContainers);
}
代码示例来源:origin: PhoenicisOrg/phoenicis
private LibrarySidebar createLibrarySidebar() {
final SortedList<ShortcutCategoryDTO> sortedCategories = this.categories
.sorted(Comparator.comparing(ShortcutCategoryDTO::getName));
return new LibrarySidebar(this.applicationName, this.filter, this.javaFxSettingsManager, sortedCategories,
this.availableShortcuts);
}
代码示例来源:origin: eu.mihosoft.vrl.jcsg/jcsg
private void cleanUpRepeatingFramesAndValues() {
ObservableList<KeyFrame> timelineKeyFrames = timeline.getKeyFrames().sorted(new KeyFrameComparator());
代码示例来源:origin: eu.mihosoft.vrl.jcsg/jcsg
SortedList<KeyFrame> sortedKeyFrames = timeline.getKeyFrames().sorted(new KeyFrameComparator());
MapOfLists<KeyFrame, KeyValue> toRemove = new MapOfLists<>();
Map<WritableValue, KeyInfo> prevValues = new HashMap<>();
代码示例来源:origin: PhoenicisOrg/phoenicis
private CombinedListWidget<InstallationDTO> createInstallationListWidget() {
final FilteredList<InstallationDTO> filteredInstallations = ConcatenatedList
.create(new MappedList<>(
this.categories.sorted(Comparator.comparing(InstallationCategoryDTO::getName)),
InstallationCategoryDTO::getInstallations))
.filtered(this.filter::filter);
filteredInstallations.predicateProperty().bind(
Bindings.createObjectBinding(() -> this.filter::filter,
this.filter.searchTermProperty(), this.filter.selectedInstallationCategoryProperty()));
final SortedList<InstallationDTO> sortedInstallations = filteredInstallations
.sorted(Comparator.comparing(InstallationDTO::getName));
final ObservableList<ListWidgetElement<InstallationDTO>> listWidgetEntries = new MappedList<>(
sortedInstallations,
ListWidgetElement::create);
final CombinedListWidget<InstallationDTO> combinedListWidget = new CombinedListWidget<>(listWidgetEntries);
combinedListWidget.selectedElementProperty().addListener((observable, oldValue, newValue) -> {
if (newValue != null) {
showInstallationDetails(newValue.getItem());
}
});
return combinedListWidget;
}
代码示例来源:origin: PhoenicisOrg/phoenicis
private CombinedListWidget<ContainerDTO> createContainerListWidget() {
/*
* initialize the container lists by:
* 1. sorting the containers by their name
* 2. filtering the containers
*/
final FilteredList<ContainerDTO> filteredContainers = ConcatenatedList
.create(new MappedList<>(
this.categories.sorted(Comparator.comparing(ContainerCategoryDTO::getName)),
ContainerCategoryDTO::getContainers))
.sorted(Comparator.comparing(ContainerDTO::getName))
.filtered(this.filter::filter);
filteredContainers.predicateProperty().bind(
Bindings.createObjectBinding(() -> this.filter::filter, this.filter.searchTermProperty()));
final ObservableList<ListWidgetElement<ContainerDTO>> listWidgetEntries = new MappedList<>(filteredContainers,
ListWidgetElement::create);
final CombinedListWidget<ContainerDTO> listWidget = new CombinedListWidget<>(listWidgetEntries);
listWidget.selectedElementProperty().addListener((observable, oldValue, newValue) -> {
if (newValue != null) {
showContainerDetails(newValue.getItem());
}
});
return listWidget;
}
代码示例来源:origin: PhoenicisOrg/phoenicis
/**
* Creates a {@link FilteredList} object of the engine versions by applying the {@link EnginesFilter} known to the
* control
*
* @return A filtered list of the engine versions
*/
private ObservableList<EngineVersionDTO> createFilteredEngineVersions() {
final EnginesFilter filter = getControl().getFilter();
final EngineCategoryDTO engineCategory = getControl().getEngineCategory();
final EngineSubCategoryDTO engineSubCategory = getControl().getEngineSubCategory();
final FilteredList<EngineVersionDTO> filteredEngineVersions = FXCollections
.observableArrayList(engineSubCategory.getPackages())
.sorted(EngineSubCategoryDTO.comparator().reversed())
.filtered(filter.createFilter(engineCategory, engineSubCategory));
filteredEngineVersions.predicateProperty().bind(
Bindings.createObjectBinding(() -> filter.createFilter(engineCategory, engineSubCategory),
filter.searchTermProperty(),
filter.selectedEngineCategoryProperty(),
filter.showInstalledProperty(),
filter.showNotInstalledProperty()));
return filteredEngineVersions;
}
代码示例来源:origin: PhoenicisOrg/phoenicis
private CombinedListWidget<ShortcutDTO> createShortcutListWidget() {
final FilteredList<ShortcutDTO> filteredShortcuts = ConcatenatedList
.create(new MappedList<>(
this.categories.sorted(Comparator.comparing(ShortcutCategoryDTO::getName)),
ShortcutCategoryDTO::getShortcuts))
.filtered(this.filter::filter);
内容来源于网络,如有侵权,请联系作者删除!