本文整理了Java中javafx.scene.control.ListView.setPrefWidth()
方法的一些代码示例,展示了ListView.setPrefWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListView.setPrefWidth()
方法的具体详情如下:
包路径:javafx.scene.control.ListView
类名称:ListView
方法名:setPrefWidth
暂无
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.dialogs
v.setPrefWidth(120);
v.setPrefHeight(250);
container.getChildren().add(v);
v.setPrefHeight(250);
v.setPrefWidth(120);
v.setPrefWidth(80);
v.setPrefHeight(250);
container.getChildren().add(v);
代码示例来源:origin: com.aquafx-project/aquafx
ObservableList<String> listItems = FXCollections.observableArrayList("Item 1", "Item 2", "Item 3", "Item 4");
list.setItems(listItems);
list.setPrefWidth(150);
list.setPrefHeight(70);
listContainer.getChildren().add(list);
ListView<String> horizontalList = new ListView<String>();
horizontalList.setItems(listItems);
horizontalList.setPrefWidth(250);
horizontalList.setPrefHeight(50);
horizontalList.setOrientation(Orientation.HORIZONTAL);
代码示例来源:origin: com.aquafx-project/aquafx
static ListView<String> createListView(int numOfItems, boolean multipleSelection, boolean disable, boolean horiz) {
ListView<String> listView = new ListView<String>();
if (horiz) listView.setOrientation(Orientation.HORIZONTAL);
listView.setPrefHeight((24*7)+4);
listView.setPrefWidth(horiz ? 200 : 140);
listView.getItems().addAll(sampleItems(numOfItems));
listView.setDisable(disable);
if (multipleSelection) {
listView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
listView.getSelectionModel().selectRange(1, 5);
} else {
listView.getSelectionModel().select(1);
}
return listView;
}
代码示例来源:origin: PhoenicisOrg/phoenicis
container.getStyleClass().addAll("listWidget", "detailsListWidget");
container.setPrefWidth(0);
container.setPrefHeight(0);
代码示例来源:origin: PhoenicisOrg/phoenicis
container.getStyleClass().addAll("listWidget", "compactListWidget");
container.setPrefWidth(0);
container.setPrefHeight(0);
代码示例来源:origin: com.aquafx-project/aquafx
ObservableList<String> listItems = FXCollections.observableArrayList("Item 1", "Item 2", "Item 3", "Item 4");
list.setItems(listItems);
list.setPrefWidth(150);
list.setPrefHeight(70);
listContainer.getChildren().add(list);
ListView<String> horizontalList = new ListView<String>();
horizontalList.setItems(listItems);
horizontalList.setPrefWidth(150);
horizontalList.setPrefHeight(50);
horizontalList.setOrientation(Orientation.HORIZONTAL);
代码示例来源:origin: com.aquafx-project/aquafx
ObservableList<String> listItems = FXCollections.observableArrayList("WLAN", "Bluetooth-PAN");
list.setItems(listItems);
list.setPrefWidth(200);
内容来源于网络,如有侵权,请联系作者删除!