com.threerings.util
Class BrowserUtil

java.lang.Object
  extended by com.threerings.util.BrowserUtil

public class BrowserUtil
extends Object

Encapsulates a bunch of hackery needed to invoke an external web browser from within a Java application.


Nested Class Summary
protected static class BrowserUtil.BrowserTracker
           
 
Constructor Summary
BrowserUtil()
           
 
Method Summary
static void browseURL(URL url, ResultListener<Void> listener)
          Opens the user's web browser with the specified URL.
static void browseURL(URL url, ResultListener<Void> listener, String genagent)
          Opens the user's web browser with the specified URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserUtil

public BrowserUtil()
Method Detail

browseURL

public static void browseURL(URL url,
                             ResultListener<Void> listener)
Opens the user's web browser with the specified URL.

Parameters:
url - the URL to display in an external browser.
listener - a listener to be notified if we failed to launch the browser. Note: it will not be notified of success.

browseURL

public static void browseURL(URL url,
                             ResultListener<Void> listener,
                             String genagent)
Opens the user's web browser with the specified URL.

Parameters:
url - the URL to display in an external browser.
listener - a listener to be notified if we failed to launch the browser. Note: it will not be notified of success.
genagent - the path to the browser to execute on non-Windows, non-MacOS.