-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
8
-
jdk 1.8.0-ea-b58
To reproduce:
1. Select Root node.
2. Push Ctrl + Shift + PgDown.
All visible items are selected.
3. Push Ctrl + Shift + PgDown.
Nothing happens. It must have selected the rest of items.
4. Push Ctrl + Shift + PgDown.
Only now it selects the rest 0f items.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.MultipleSelectionModel;
import javafx.scene.control.SelectionMode;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
public class TreeViewCtrlShiftPgDown extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
Pane root = new Pane();
TreeView<String> treeVeiw = new TreeView<>();
treeVeiw.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
treeVeiw.setPrefWidth(300d);
treeVeiw.setPrefHeight(300d);
TreeItem rootItem = new TreeItem("Root");
rootItem.setExpanded(true);
treeVeiw.setRoot(rootItem);
for (int i = 0; i < 4; i++) {
TreeItem treeItem = new TreeItem("item-" + i);
treeItem.setExpanded(true);
rootItem.getChildren().add(treeItem);
for (int j = 0; j < 4; j++) {
TreeItem childTreeItem = new TreeItem("item-" + i + "-" + j);
treeItem.getChildren().add(childTreeItem);
}
}
root.getChildren().add(treeVeiw);
Scene scene = new Scene(root, 400, 300);
stage.setScene(scene);
stage.show();
}
}
1. Select Root node.
2. Push Ctrl + Shift + PgDown.
All visible items are selected.
3. Push Ctrl + Shift + PgDown.
Nothing happens. It must have selected the rest of items.
4. Push Ctrl + Shift + PgDown.
Only now it selects the rest 0f items.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.MultipleSelectionModel;
import javafx.scene.control.SelectionMode;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
public class TreeViewCtrlShiftPgDown extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
Pane root = new Pane();
TreeView<String> treeVeiw = new TreeView<>();
treeVeiw.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
treeVeiw.setPrefWidth(300d);
treeVeiw.setPrefHeight(300d);
TreeItem rootItem = new TreeItem("Root");
rootItem.setExpanded(true);
treeVeiw.setRoot(rootItem);
for (int i = 0; i < 4; i++) {
TreeItem treeItem = new TreeItem("item-" + i);
treeItem.setExpanded(true);
rootItem.getChildren().add(treeItem);
for (int j = 0; j < 4; j++) {
TreeItem childTreeItem = new TreeItem("item-" + i + "-" + j);
treeItem.getChildren().add(childTreeItem);
}
}
root.getChildren().add(treeVeiw);
Scene scene = new Scene(root, 400, 300);
stage.setScene(scene);
stage.show();
}
}
- relates to
-
JDK-8089636 Keyboard navigation in ListView/TreeView/TableView/TreeTableView
- Open