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

SplitPane in JFXPanel: Mouse cursor not changed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u9
    • Fix Version/s: 8u20
    • Component/s: javafx
    • Labels:
    • Environment:

      Win7, 64bit

      Description

      When showing a small scene (see following code) with SplitPanes into a JFXPanel, the mouse cursor is not updated to resize cursor on hovering the splitpane dividers.

      {code:java}
      public class Splitters extends Application
      {
          public static void main(String[] args)
          {
              Application.launch(args);
          }

          @Override
          public void start(Stage primaryStage)
          {
              primaryStage.setTitle("Split Views");
              Group root = new Group();
              Scene scene = new Scene(root, 350, 250, Color.WHITE);

              SplitPane splitPane = new SplitPane();
              splitPane.prefWidthProperty().bind(scene.widthProperty());
              splitPane.prefHeightProperty().bind(scene.heightProperty());

              VBox leftArea = new VBox(10);
              HBox rowBox = new HBox(20);
              final Text leftText = TextBuilder.create().text("Left ").translateX(20).fill(Color.RED).font(Font.font(null, FontWeight.BOLD, 20)).build();

              rowBox.getChildren().add(leftText);
              leftArea.getChildren().add(rowBox);

              leftArea.setAlignment(Pos.CENTER);

              SplitPane splitPane2 = new SplitPane();
              splitPane2.setOrientation(Orientation.VERTICAL);
              splitPane2.prefWidthProperty().bind(scene.widthProperty());
              splitPane2.prefHeightProperty().bind(scene.heightProperty());

              HBox centerArea = new HBox();

              final Text upperRight = TextBuilder.create().text("Text").x(100).y(50).fill(Color.RED).font(Font.font(null, FontWeight.BOLD, 35)).translateY(50).build();
              centerArea.getChildren().add(upperRight);

              HBox rightArea = new HBox();

              final Text lowerRight = TextBuilder.create().text("Lower Right").x(100).y(50).fill(Color.RED).font(Font.font(null, FontWeight.BOLD, 35)).translateY(50).build();
              rightArea.getChildren().add(lowerRight);

              splitPane2.getItems().add(centerArea);
              splitPane2.getItems().add(rightArea);

              splitPane.getItems().add(leftArea);

              splitPane.getItems().add(splitPane2);

              ObservableList<SplitPane.Divider> dividers = splitPane.getDividers();
              for (int i = 0; i < dividers.size(); i++)
              {
                  dividers.get(i).setPosition((i + 1.0) / 3);
              }
              HBox hbox = new HBox();
              hbox.getChildren().add(splitPane);
              root.getChildren().add(hbox);

              primaryStage.setScene(scene);
              primaryStage.show();
          }
      }
      {code}

        Attachments

          Activity

            People

            • Assignee:
              anthony Anthony Petrov (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: