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

Refactor scaled border rendering

XMLWordPrintable

    • 20
    • b07

        There are several issues which deal with border rendering. The first one was JDK-8279614, it dealt with EtchedBorder.

        The next one is JDK-8015739. It uses the same approach. Now that two borders are fixed, it is time to refactor the approach to avoid duplicate code.

        I propose adding a utility method to SwingUtilities3:

        1. Reset the transform;
        2. Call the passed interface* to render the unscaled border;
        3. Restore the transform.

        It will unify border rendering. Other border types will use the utility method.

        * The method which renders the border with unscaled Graphics could be a private method in the calling class, method reference could be passed to the utility method.

              honkar Harshitha Onkar
              aivanov Alexey Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: