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

upper left corner of VBox bounds are not at 0,0

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • fx1.2
    • None
    • javafx
    • Windows XP

      Moved from bug # 6694107

      Text node has negative bounds by default and brokes the behavior of VBox node.
      It is inconvenient to draw the text over the rectangle.

      Consider attached test case (with picture).
      1.
      Group {content: [
        Rectangle {width: 350 height: 100 stroke: fill},
        Text {content: "JavaFX" font: font fill: fill},
      ]}
      EXPECTED: the text over the rectangle
      ACTUAL: the text above the rectangle
      2.
      Group {content: [
        Rectangle {width: 100 height: 100 fill: fill},
        Text {content: "language" font: font fill: fill},
        Rectangle {width: 100 height: 100 fill: fill},
      ]}
      EXPECTED: the text between the squares
      ACTUAL: the text between the squares, but above then squares.

      Note, VBox and HBox layout does not support negative bounds.
      Whole circle should be visible.
      Text from the last group should not be over the previous group.

      --------------Submitted by sergey.malenkov [2008-04-25 13:47]


      I think that height of the Text node should be the font height.
      It helps to align different Text nodes using HBox...

      --------------Comments from sergey.malenkov [2008-04-25 14:09]

        1. Test.fx
          1 kB
        2. Test.PNG
          Test.PNG
          19 kB

            amfowler Anne Fowler (Inactive)
            gramachasunw Girish Ramachandran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: