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

Windows LAF: ActiveWindowsIcon should not be greedy with fallback icon

XMLWordPrintable

    • b01
    • generic
    • generic
    • Not verified

        Windows LAF initDefault() contains following code:

                    "Tree.openIcon", new ActiveWindowsIcon("win.icon.shellIconBPP", "shell32Icon 5",
        (Icon)table.get("Tree.openIcon")),
                    "Tree.closedIcon", new ActiveWindowsIcon("win.icon.shellIconBPP", "shell32Icon 4",
        (Icon)table.get("Tree.closedIcon")),

        It is lazy trying to fetch system icon from the native library but it is greedy creating icon object for fallback.

        This is just 2 tiny icons. Their creation do not waste much resources per se.
        But this also cause extra request to open resources.jar file and retrieve couple of entries from it. And this is much more expensive.

              peterz Peter Zhelezniakov
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: