Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117899

[TreeView] Ctrl + Shift + PgDown doesn't work as specified.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: javafx
    • Environment:

      jdk 1.8.0-ea-b58

      Description

      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();
          }
      }

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jgiles Jonathan Giles
              Reporter:
              dzinkevi Dmitry Zinkevich (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: