Class OpenBrowser


  • public final class OpenBrowser
    extends java.lang.Object
    Helper to open platform web browser on different platforms This now delegates the real work to a platform specific class.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private OpenBrowser()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String displayUrl​(java.lang.String url)
      Displays an external URL using platform associated software.
      static java.lang.String displayUrl​(java.net.URI uri)
      Displays an external URI using platform associated software.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • displayUrl

        public static java.lang.String displayUrl​(java.net.URI uri)
        Displays an external URI using platform associated software. A web resource will launch platform's browser, an audio file URI will launch audio player, etc.
        Parameters:
        uri - The URI to display
        Returns:
        null for success or a string in case of an error.
        Throws:
        java.lang.IllegalStateException - if no platform is set to which opening the URL can be dispatched, PlatformManager.getPlatform()
      • displayUrl

        public static java.lang.String displayUrl​(java.lang.String url)
        Displays an external URL using platform associated software. A web resource will launch platform's browser, an audio file URL will launch audio player, etc.
        Parameters:
        url - The URL to display
        Returns:
        null for success or a string in case of an error.
        Throws:
        java.lang.IllegalStateException - if no platform is set to which opening the URL can be dispatched, PlatformManager.getPlatform()