To reproduce:
1. Click on Root item.
2. Push Ctrl + PgDown (and other mentioned combinations) several times.
Notice that when you push the combination for the first tine it works.
But if you push the combination again nothing happens,
and according to spec focus should move down one information pane.
But now, selection or focused is not changing after the first time.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
public class TreeViewCtrlPgDown 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.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. Click on Root item.
2. Push Ctrl + PgDown (and other mentioned combinations) several times.
Notice that when you push the combination for the first tine it works.
But if you push the combination again nothing happens,
and according to spec focus should move down one information pane.
But now, selection or focused is not changing after the first time.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
public class TreeViewCtrlPgDown 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.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