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

Need a common class to share the logic for querying platform specific information

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: fx1.3
    • Fix Version/s: fx2.1
    • Component/s: javafx
    • Labels:

      Description

      We need a common class to share the logic for querying platform specific information. At present this logic is duplicated, at times different logic, in many places.

      Here is a list of some of the places:

      ./decora-runtime/src/com/sun/scenario/effect/impl/RendererFactory.java: private static boolean tryJOGL = System.getProperty("os.name").startsWith("Mac");
      ./eula/src/com/sun/javafx/eula/EulaDialog.java: String os = System.getProperty("os.name").toLowerCase();
      ./eula/src/com/sun/javafx/eula/EulaImpl.java: String os = System.getProperty("os.name").toLowerCase();
      ./eula/src/com/sun/javafx/eula/Ping.java: StringBuffer osName = new StringBuffer(System.getProperty("os.name"));
      ./eula/src/com/sun/javafx/eula/Ping.java: String osName = System.getProperty("os.name");
      ./javafx-font/src/com/sun/t2k/T2KFontFactory.java: return System.getProperty("os.name", "");
      ./javafx-io/src/com/sun/javafx/io/impl/file/config/Config.java: stmp = System.getProperty("os.name");
      ./javafx-sg-swing/src/com/sun/embeddedswing/EmbeddedGraphics.java: !"Mac OS X".equals(System.getProperty("os.name"));
      ./javafx-sg-swing/src/com/sun/scenario/scenegraph/SGText.java: return System.getProperty("os.name", "").toLowerCase().startsWith("mac");
      ./javafx-ui-desktop/src/com/sun/javafx/util/Platform.java: * @returns boolean true if the System Property os.name is "Mac OS X"
      ./javafx-ui-desktop/src/com/sun/javafx/util/Platform.java: private static String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-desktop/src/gov/nasa/worldwind/Configuration.java: String osName = System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/runtime/DefaultSystemProperties.java: /*"javafx.*/"os.name", "os.name",
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/AmbleMapper.java: String os = System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/AmbleMapper.java: String os = System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/AWTFontLoader.fx: def os = java.lang.System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/AWTFontLoader.fx: def os = java.lang.System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/AWTFontLoader.fx: def os = java.lang.System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/AWTFontUtils.java: osName = System.getProperty("os.name");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/FullScreenFrame.java: if (System.getProperty("os.name").startsWith("Mac")) {
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/FullScreenManager.java: System.getProperty("os.name").startsWith("Windows");
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/WindowImpl.java: return "Mac OS X".equals(System.getProperty("os.name"));
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/WindowImpl.java: return "Linux".equalsIgnoreCase(System.getProperty("os.name"));
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/WindowImpl.java: return "Solaris".equalsIgnoreCase(System.getProperty("os.name"));
      ./javafx-ui-swing/src/com/sun/javafx/tk/swing/WindowImpl.java: if (debug) System.out.println("WindowImpl.setWindowOpacity: not mac: " + opacity + " name: " + System.getProperty("os.name"));
      ./prism-common/src/com/sun/prism/tk/PrismSettings.java: if (System.getProperty("os.name").startsWith("Windows") &&
      ./prism-es2/src/com/sun/prism/es2/ES2ResourceFactory.java: : System.getProperty("os.name").toLowerCase().startsWith("mac os x");
       

        Attachments

          Activity

            People

            • Assignee:
              jgodinez Jennifer Godinez (Inactive)
              Reporter:
              ckyang Chien Yang (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: