本文整理了Java中javafx.scene.control.ListView.setPlaceholder()
方法的一些代码示例,展示了ListView.setPlaceholder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setPlaceholder()
方法的具体详情如下:
包路径:javafx.scene.control.ListView
类名称:ListView
方法名:setPlaceholder
暂无
代码示例来源:origin: pmd/pmd
@Override
protected void beforeParentInit() {
xpathAttributesListView.setPlaceholder(new Label("No available attributes"));
EventStreams.valuesOf(scopeHierarchyTreeView.getSelectionModel().selectedItemProperty())
.filter(Objects::nonNull)
.map(TreeItem::getValue)
.filterMap(o -> o instanceof NameDeclaration, o -> (NameDeclaration) o)
.filter(nd -> !Objects.equals(nd.getNode(), selectedNode))
.subscribe(declaration -> Platform.runLater(() -> parent.onNodeItemSelected(declaration.getNode(), true)));
scopeHierarchyTreeView.setCellFactory(view -> new ScopeHierarchyTreeCell());
hideCommonAttributesProperty()
.values()
.distinct()
.subscribe(show -> displayAttributes(selectedNode));
}
代码示例来源:origin: org.controlsfx/controlsfx
public TaskProgressViewSkin(TaskProgressView<T> monitor) {
super(monitor);
BorderPane borderPane = new BorderPane();
borderPane.getStyleClass().add("box");
// list view
ListView<T> listView = new ListView<>();
listView.setPrefSize(500, 400);
listView.setPlaceholder(new Label("No tasks running"));
listView.setCellFactory(param -> new TaskCell());
listView.setFocusTraversable(false);
Bindings.bindContent(listView.getItems(), monitor.getTasks());
borderPane.setCenter(listView);
getChildren().add(listView);
}
内容来源于网络,如有侵权,请联系作者删除!