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

Investigate using less precise but faster min, pref, max size computations for controls

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 8
    • 8
    • javafx

      We try to be very accurate in our min / pref / max size computations for many of the controls. For example, to determine the preferred size of a string of text, we actually use the TextHelper, set the text & font, ask for the layout bounds, etc. Perhaps instead we could take the width of a single "W" in the given font and multiply by the number of characters for the preferred width -- much like we do for TextField. This will lead to Labels and Buttons being wider than necessary by default, especially if the label has a lot of text in it, so this might not be a good idea. However making these computations faster, though rougher, could be a significant boost in layout performance.

            kwwong Kinsley Wong (Inactive)
            rbair Richard Bair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: