本文整理汇总了Java中javafx.collections.FXCollections.emptyObservableList方法的典型用法代码示例。如果您正苦于以下问题:Java FXCollections.emptyObservableList方法的具体用法?Java FXCollections.emptyObservableList怎么用?Java FXCollections.emptyObservableList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.collections.FXCollections
的用法示例。
在下文中一共展示了FXCollections.emptyObservableList方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildChildren
import javafx.collections.FXCollections; //导入方法依赖的package包/类
@SneakyThrows(IOException.class)
private ObservableList<TreeItem<Path>> buildChildren() {
if (Files.isDirectory(getValue())) {
return Files.list(getValue())
.map(e -> {
WatcherStructure watcherStructure = null;
if (Files.isDirectory(e)) {
watcherStructure = new WatcherStructure(e, project, tabUpdater, treeUpdater);
}
CustomTreeItem item = new CustomTreeItem(e, watcherStructure, project, tabUpdater, treeUpdater);
CustomIcons customIcons = new CustomIcons();
item.setGraphic(new ImageView(item.isDirectory() ? customIcons.getFolderCollapseImage() : customIcons.getFileImage()));
if (isDirectory()) {
item.expandedProperty().addListener(treeUpdater.expanderListener());
}
return item;
})
.collect(Collectors.toCollection(FXCollections::observableArrayList));
}
return FXCollections.emptyObservableList();
}
示例2: getVars
import javafx.collections.FXCollections; //导入方法依赖的package包/类
public ObservableList<Var> getVars() {
if (backend.getStepDefs() == null) {
return FXCollections.emptyObservableList();
}
ScriptValueMap map = backend.getStepDefs().getContext().getVars();
List<Var> list = new ArrayList(map.size());
for (Map.Entry<String, ScriptValue> entry : map.entrySet()) {
list.add(new Var(entry.getKey(), entry.getValue()));
}
return FXCollections.observableList(list);
}
示例3: getRecentInstances
import javafx.collections.FXCollections; //导入方法依赖的package包/类
public static ObservableList<Instance> getRecentInstances() {
loadRecent();
if (getInstances().isEmpty())
return FXCollections.emptyObservableList();
List<Instance> recent = Lists.newArrayList();
for (String name : RECENT_INSTANCES) {
if (INSTANCES_MAP.containsKey(name))
recent.add(INSTANCES_MAP.get(name));
}
if (recent.isEmpty()) {
int size = getInstances().size();
return FXCollections.observableArrayList(getInstances().subList(0, Math.min(size, MAX_RECENT)));
}
return FXCollections.observableArrayList(recent);
}
示例4: getAvailableSourceUris
import javafx.collections.FXCollections; //导入方法依赖的package包/类
/**
* Gets a list of the URIs of all available sources of this type.
*/
public ObservableList<String> getAvailableSourceUris() {
return FXCollections.emptyObservableList();
}
示例5: CalendarPropertySheet
import javafx.collections.FXCollections; //导入方法依赖的package包/类
public CalendarPropertySheet() {
this(FXCollections.emptyObservableList());
}