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

Label inside scroll pane displays ellipses sometimes rather than full content

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.0.2
    • fx2.0
    • javafx
    • JavaFX 2.0GA, Win7. Nvidia 460 GPU

      Expected behavior of attached program is to display some text without ellipsis.
      However, as you re-size the scene, sometimes the text is shown with ellipsis and sometimes it is shown without.

      Test case consists of a Label with wrapped text inside a StackPane with padding insets inside a ScrollPane fit to width.

      To reproduce, run the attached program, scroll to the bottom of the text, then resize the scene to see the ellipses show and disappear.

        1. LabelEllipseTest.java
          2 kB
          John Smith
        2. LabelEllipseTest.png
          51 kB
          John Smith

          [JDK-8128502] Label inside scroll pane displays ellipses sometimes rather than full content

          Verified on 2.0.2b07.

          Alexander Kirov (Inactive) added a comment - Verified on 2.0.2b07.

          The StackPane class was not subtracting its own padding from available width/height when calculating children's preferred height/width. This affects wrapping text controls in particular, since their preferred height directly depends on the width.

          Leif Samuelsson (Inactive) added a comment - The StackPane class was not subtracting its own padding from available width/height when calculating children's preferred height/width. This affects wrapping text controls in particular, since their preferred height directly depends on the width.

            leifs Leif Samuelsson (Inactive)
            josmithjfx John Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: