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

Label returns wrong boundsInParent

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx1.2
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:

      Description

      Label returns wrong bounds in parent when used in the following snippet:

      var g = Group{};
      var l = Label { translateX: 10 translateY: 40 text: "Hellog" };
      insert l into g.content;
      var b = l.boundsInParent;
      var r = Rectangle {x: b.minX y: b.minY width:b.width height:b.height opacity:0.5 };
      insert r into g.content;
      g;

      The rectangle appears to be above the label. When using object literals approach:
      Group {
         content: [
             l = Label { ... }
             Rectangle { x: bind .... }
         ]
      }

      Everything seems to work ok. Still the original approach needs to behave consistently with the object literal approach.

        Attachments

          Activity

            People

            • Assignee:
              amfowler Anne Fowler (Inactive)
              Reporter:
              mbrehovskjfx Martin Brehovsky (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: