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

A Labeled graphic node bounds can extend outside the bounds of the labeled control

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: fx2.0
    • Fix Version/s: 9
    • Component/s: javafx

      Description

      In some cases (I don't know all possible cases) setting max or preferable sizes of control don't make any effect:

      Text tx = new Text();
      tx.setText("fgggggggggggggggggggggggggggggggggggggggggggggggggg");
      Label label = new Label("ee", tx);
      label.setMaxWidth(40);
      label.setPrefWidth(40);

      HBox hb = new HBox();
      hb.setMaxWidth(50);
      hb.setPrefWidth(50);
      hb.getChildren().add(label);

      root.getChildren().add(hb);
      ...

      text "fgg...." will be as wide as it need. Text "ee" will not be printed at all. That doesn't seem a proper behavior

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msladecek Martin Sládeček
                Reporter:
                akirov Alexander Kirov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: