edu.stanford.ejalbert.launching.macos
Class MacOsBrowserLaunching

java.lang.Object
  extended byedu.stanford.ejalbert.launching.macos.MacOsBrowserLaunching
All Implemented Interfaces:
IBrowserLaunching
Direct Known Subclasses:
MacOs2_0BrowserLaunching, MacOs2_1BrowserLaunching, MacOs3_0BrowserLaunching, MacOs3_1BrowserLaunching

public abstract class MacOsBrowserLaunching
extends Object
implements IBrowserLaunching

Author:
Markus Gebhard

Field Summary
protected static String FINDER_CREATOR
          The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the application.
 
Fields inherited from interface edu.stanford.ejalbert.launching.IBrowserLaunching
BROWSER_DEFAULT, BROWSER_SYSTEM_PROPERTY, PROP_KEY_BROWSER_PREFIX, PROP_KEY_DELIMITER, PROTOCOL_FILE, PROTOCOL_HTTP, PROTOCOL_MAILTO
 
Constructor Summary
MacOsBrowserLaunching()
           
 
Method Summary
 boolean getNewWindowPolicy()
          Returns the policy used for opening a url in a browser.
 void openUrl(List browsers, String urlString)
          Falls through to non-targetted openUrl method.
 void openUrl(String browser, String urlString)
          Falls through to non-targetted openUrl method.
 void setNewWindowPolicy(boolean forceNewWindow)
          Sets the policy used for opening a url in a browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.stanford.ejalbert.launching.IBrowserLaunching
getBrowserList, initialize, openUrl
 

Field Detail

FINDER_CREATOR

protected static final String FINDER_CREATOR
The creator code of the Finder on a Macintosh, which is needed to send AppleEvents to the application.

See Also:
Constant Field Values
Constructor Detail

MacOsBrowserLaunching

public MacOsBrowserLaunching()
Method Detail

openUrl

public void openUrl(String browser,
                    String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
Falls through to non-targetted openUrl method. Browser targetting has not been implemented for the Mac.

Specified by:
openUrl in interface IBrowserLaunching
Parameters:
browser - String
urlString - String
Throws:
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException

openUrl

public void openUrl(List browsers,
                    String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
Falls through to non-targetted openUrl method. Browser targetting has not been implemented for the Mac.

Specified by:
openUrl in interface IBrowserLaunching
Parameters:
browsers - List
urlString - String
Throws:
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException

getNewWindowPolicy

public boolean getNewWindowPolicy()
Returns the policy used for opening a url in a browser.

If the policy is true, an attempt will be made to force the url to be opened in a new instance (window) of the browser.

If the policy is false, the url may open in a new window or a new tab.

This is not supported on the Mac OS.

Specified by:
getNewWindowPolicy in interface IBrowserLaunching
Returns:
boolean

setNewWindowPolicy

public void setNewWindowPolicy(boolean forceNewWindow)
Sets the policy used for opening a url in a browser. This is not supported on the Mac OS.

Specified by:
setNewWindowPolicy in interface IBrowserLaunching
Parameters:
forceNewWindow - boolean