com.metamatrix.toolbox.ui.widget.util
Class BrowserControl

java.lang.Object
  extended by com.metamatrix.toolbox.ui.widget.util.BrowserControl

public class BrowserControl
extends java.lang.Object

BrowserControl is a static class that enables code to invoke the default web browser on the user's machine, either Windows or Unix. Examples:

     BrowserControl.displayURL("http://www.meta-matrix.com");

     BrowserControl.displayURL("file:///c:/myfile.html");


Constructor Summary
BrowserControl()
           
 
Method Summary
static void displayURL(java.lang.String url)
          Display a file in the system browser.
static boolean isWindowsPlatform()
          Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property.
 
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

displayURL

public static void displayURL(java.lang.String url)
Display a file in the system browser. If you want to display a file, you must include the absolute path name.

Parameters:
url - the file's url (the url must start with either "http://" or "file://").

isWindowsPlatform

public static boolean isWindowsPlatform()
Try to determine whether this application is running under Windows or some other platform by examing the "os.name" property.

Returns:
true if this application is running under a Windows OS


Copyright © 2009. All Rights Reserved.