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

[Tooltip] width and height cannot be set or broken after first usage.

    Details

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

      2.2.0b19

      Description

      Application:

          @Override
          public void start(Stage stage) throws Exception {
              VBox vb = new VBox();

              Tooltip tp = new Tooltip();
              tp.setText("text");
              tp.setGraphic(new Rectangle(0, 0, 10, 10));

              Button b = new Button("with tooltip");

              b.setTooltip(tp);

              Slider slider1 = new Slider(0, 100, 50);
              slider1.setShowTickLabels(true);
              slider1.setShowTickMarks(true);

              Slider slider2 = new Slider(0, 100, 50);
              slider2.setShowTickLabels(true);
              slider2.setShowTickMarks(true);

              Slider slider3 = new Slider(0, 100, 50);
              slider3.setShowTickLabels(true);
              slider3.setShowTickMarks(true);

              slider1.valueProperty().bindBidirectional(tp.minWidthProperty());
              slider2.valueProperty().bindBidirectional(tp.prefWidthProperty());
              slider3.valueProperty().bindBidirectional(tp.maxWidthProperty());

              vb.getChildren().addAll(b, new Label("Min width"), slider1, new Label("Pref width"), slider2, new Label("Max width"), slider3);

              Scene scene = new Scene(vb, 300, 300);
              stage.setScene(scene);
              stage.show();
          }

      When I set max Width to 100, min width to 0, and start to change pref width to different values, it doesn't affect.

      Actually, it looks like, only first change affects. For instance, if I set pref width to some value, it affects, and after that, affecting of any of this 3 properties disappear.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: