edu.northwestern.at.utils.sys
Class BrowserControl

java.lang.Object
  extended by edu.northwestern.at.utils.sys.BrowserControl

public class BrowserControl
extends java.lang.Object

BrowserControl.

BrowserControl provides interface to native methods for controlling a web browser.

The native code implements three procedures.

On most platforms some form of the Netscape API can be used to control most browsers. On Windows, the native library uses DDE (Dynamic Data Exchange) to start and control the default system web browser using the Netscape API. The partner windows native library is called "BrowserControl.dll".


Constructor Summary
BrowserControl()
           
 
Method Summary
static java.lang.String getURL()
          Retrieve URL of web page currently being displayed in web browser.
static java.lang.String getURLTitle()
          Retrieve title of web page currently being displayed in web browser.
static void openURL(java.lang.String URL)
          Open a URL in a web browser.
static void openURL(java.lang.String URL, boolean useNewBrowserWindow)
          Open a URL in a web browser and optionally use a new browser window.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserControl

public BrowserControl()
Method Detail

getURL

public static java.lang.String getURL()
Retrieve URL of web page currently being displayed in web browser.

Returns:
The URL.

getURLTitle

public static java.lang.String getURLTitle()
Retrieve title of web page currently being displayed in web browser.

Returns:
The page title.

openURL

public static void openURL(java.lang.String URL,
                           boolean useNewBrowserWindow)
Open a URL in a web browser and optionally use a new browser window.

Parameters:
URL - The URL of the web page to open.
useNewBrowserWindow - True to open URL in a new browser window.

The web browser will be started if it isn't running already.


openURL

public static void openURL(java.lang.String URL)
Open a URL in a web browser.

Parameters:
URL - The URL of the web page to open.

The URL will be opened in the current browser window, or a new window if the browser isn't started.