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

Provide easy access to platform-specific icons



      Most platforms have system-provided icons which can sensibly be reused to by third-party JavaFX apps to provide the user with a recognizable and easy-to-use native experience. There are at least two issues for application developers:

      1) access to the icons may require obscure code (e.g. JNI or similar);
      2) the icons may be stored in a place which the average developer is not aware of.

      To make it easier to access such icons, I propose the introduction of static method

          java.io.InputStream getPlatformIcon(String name)

      for use with the constructor of javafx.scene.image.Image

          new Image(getPlatformIcon("..."))

      I do not have a suggestion for which class this method should belong to.

      I do not believe that it would be possible to enumerate all the possible platform icons because

      1) the set varies from platform to platform;
      2) the names vary from platform to platform.

      I do believe that this is a crucial feature for providing a complete native experience in desktop/tablet/handheld applications and that the omission of such features in the past has lead to the Steve Jobs Effect: "I'm not having that software on my platform". We can't change the past, but we can learn from it.




            • Assignee:
              jasper Jasper Potts
              swinnalljfx Stephen Winnall (Inactive)
            • Votes:
              1 Vote for this issue
              3 Start watching this issue


              • Created: