org.fhcrc.cpl.toolbox
Class BrowserController

java.lang.Object
  extended by org.fhcrc.cpl.toolbox.BrowserController

public class BrowserController
extends java.lang.Object

This class exists to make it easier to open browser windows, and to provide various kinds of URL construction


Constructor Summary
BrowserController()
           
 
Method Summary
static void navigate(java.io.File file)
           
static void navigate(java.lang.String urlString)
          throws IOException
static void navigate(java.net.URL url)
           
static void navigateOrPanelTempFileWithContents(java.lang.String contents, java.lang.String tempFileName, java.lang.Object caller)
          Attempts to point the browser to a temp file filled with "contents".
static void openTempFileWithContents(java.lang.String contents, java.lang.String tempFileName, java.lang.Object caller)
          Write the specified contents to a temp file and point the browser at it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserController

public BrowserController()
Method Detail

navigate

public static void navigate(java.net.URL url)
                     throws java.io.IOException
Parameters:
url -
Throws:
java.io.IOException - if the attempt to open the browser fails

navigate

public static void navigate(java.lang.String urlString)
                     throws java.io.IOException
throws IOException

Parameters:
urlString -
Throws:
java.io.IOException - if the attempt to open the browser fails

navigate

public static void navigate(java.io.File file)
                     throws java.io.IOException
Parameters:
file -
Throws:
java.io.IOException - if the attempt to open the browser fails

openTempFileWithContents

public static void openTempFileWithContents(java.lang.String contents,
                                            java.lang.String tempFileName,
                                            java.lang.Object caller)
                                     throws java.io.IOException
Write the specified contents to a temp file and point the browser at it. Needs an object to tie the temp file to, so we know when to clean it up

Parameters:
contents -
caller -
Throws:
java.io.IOException

navigateOrPanelTempFileWithContents

public static void navigateOrPanelTempFileWithContents(java.lang.String contents,
                                                       java.lang.String tempFileName,
                                                       java.lang.Object caller)
                                                throws java.io.IOException
Attempts to point the browser to a temp file filled with "contents". If that fails, opens an HtmlViewerPanel on the file, with title tempFileName. Output a warning if browser failed

Parameters:
contents -
tempFileName -
caller -
Throws:
java.io.IOException - only if we can't write the temp file


Fred Hutchinson Cancer Research Center