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

RFE: java.awt.Desktop API changes

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6
    • Fix Version/s: 6-pool
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      J2SE Version (please include all output from java -version flag):
        java version "1.6.0-rc"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-rc-b65)
        Java HotSpot(TM) Client VM (build 1.6.0-rc-b65, mixed mode, sharing)

      RFE: suggestions for some Desktop API changes

        We have been waiting for this for a long time, and it is working well for the
        few tests I have done so far, and so even without the following changes we will
        still use it as soon as 1.6 is released.

        In addition to RFE: 6345777 I think the following java.awt.Desktop API changes
        might also be a good idea:

        * getDesktop() should return a Desktop even when Desktop is not supported.
          This returned Desktop can return false to isSupported for every action.
          Currently we have to always check isDesktopSupported() before calling getDesktop()
          whenever we want to use it or else an UnsupportedOperationException might be thrown.

        * The isSupported(Action action) method should also take in a URI or a File in
          order to find out if the Action is supported for a particular URI or File.
          This would allow for us to disable context sensitive actions that wont work anyway.

        * Browse to a file URI and opening a File (for example an HTML file) seem to be very
          similar. Maybe browse could be renamed to open and open(File) and open(URI) would
          do the same thing when the URI refers to a File. Maybe I just need to read the
          Documentation a little harder in order to work out what the difference is.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tyao Ting-Yun Ingrid Yao (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: