|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Main interface to the Browser Launching methods.
Field Summary | |
static String |
BROWSER_DEFAULT
Identifier for the system's default browser. |
static String |
BROWSER_SYSTEM_PROPERTY
Key to system property containing name of users preferred browser. |
static String |
PROP_KEY_BROWSER_PREFIX
prefix used for property file keys that define a browser |
static String |
PROP_KEY_DELIMITER
property file key for delimiter character used in other properties. |
static String |
PROTOCOL_FILE
file protocol |
static String |
PROTOCOL_HTTP
http protocol |
static String |
PROTOCOL_MAILTO
mailto protocol |
Method Summary | |
List |
getBrowserList()
Returns a list of browsers to be used for browser targetting. |
boolean |
getNewWindowPolicy()
Returns the policy used for opening a url in a browser. |
void |
initialize()
Performs any initialization needed for the particular O/S. |
void |
openUrl(List browsers,
String urlString)
Allows user to target several browsers. |
void |
openUrl(String urlString)
Opens the passed url in the system's default browser. |
void |
openUrl(String browser,
String urlString)
Allows user to target a specific browser. |
void |
setNewWindowPolicy(boolean forceNewWindow)
Sets the policy used for opening a url in a browser. |
Field Detail |
public static final String BROWSER_SYSTEM_PROPERTY
public static final String PROP_KEY_DELIMITER
public static final String PROP_KEY_BROWSER_PREFIX
public static final String PROTOCOL_HTTP
public static final String PROTOCOL_FILE
public static final String PROTOCOL_MAILTO
public static final String BROWSER_DEFAULT
Method Detail |
public void initialize() throws BrowserLaunchingInitializingException
BrowserLaunchingInitializingException
public void openUrl(String urlString) throws UnsupportedOperatingSystemException, BrowserLaunchingExecutionException, BrowserLaunchingInitializingException
urlString
- String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
public void openUrl(String browser, String urlString) throws UnsupportedOperatingSystemException, BrowserLaunchingExecutionException, BrowserLaunchingInitializingException
getBrowserList
method.
If the call to the requested browser fails, the code will fail over to the default browser.
browser
- StringurlString
- String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
public void openUrl(List browsers, String urlString) throws UnsupportedOperatingSystemException, BrowserLaunchingExecutionException, BrowserLaunchingInitializingException
getBrowserList
method.
The browsers from the list will be tried in order (first to last) until one of the calls succeeds. If all the calls to the requested browsers fail, the code will fail over to the default browser.
browsers
- ListurlString
- String
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException
public List getBrowserList()
BROWSER_DEFAULT
.
public boolean getNewWindowPolicy()
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.
Results will vary based on the O/S and browser being targetted.
public void setNewWindowPolicy(boolean forceNewWindow)
forceNewWindow
- boolean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |