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

[ListView] selection using shift+pageUp/down is broken.

    XMLWordPrintable

    Details

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

      2.1.0b18

      Description

      Run attached code:

      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.ListView;
      import javafx.scene.control.SelectionMode;
      import javafx.stage.Stage;

      public class Main extends Application {

          @Override
          public void start(Stage stage) {
              ListView LV = new ListView();
              LV.setPrefHeight(100);
              LV.setPrefWidth(50);
              LV.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
              
              for (int i = 0; i < 20; i++) {
                  LV.getItems().add(i, i);
              }
              
              Group root = new Group();
              
              root.getChildren().addAll(LV);
              stage.setScene(new Scene(root, 300, 300));
              stage.show();
          }
          
          public static void main(String[] args) {
              launch(Main.class, args);
          }
      }

      1) Select the first item
      2) press shift+pageDown 2 times.
      3) preff shift+pageUp 1 time.
      See, selection is the first item only, but I expect 4-5 items to be selected.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jgiles Jonathan Giles
              Reporter:
              akirov Alexander Kirov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported: