[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Tue Jun 9 22:20:54 UTC 2009


gordonp
Tue Jun  9 18:20:54 EDT 2009
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv22530/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobyContentPane.java 
Log Message:
Changes to use JDIC instead of java.awt.Desktop (which is JavaSE 6+ only)
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentPane.java,1.18,1.19
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java	2009/06/09 19:29:11	1.18
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentPane.java	2009/06/09 22:20:54	1.19
@@ -324,17 +324,12 @@
     private void launchInWebBrowser(URL u){
 	// Launch the browser with the form the servlet hosts
 	try{
-	    Desktop desktop = Desktop.getDesktop();
-	    if(!desktop.isSupported(Desktop.Action.BROWSE)) {
-		editorPane.setText("Your Java does not support external browser launch.  " +
-				   "Please manually launch a browser and go to the URL " +
-				   u);
-	    }
-	    desktop.browse(u.toURI());
-	} catch (java.net.URISyntaxException urise){
-	    logger.error("Could not create URI from URL ("+u+"): " + urise);
-	} catch (java.io.IOException ioe){
-	    logger.error("Could not launch browser for form (" + u + "): " + ioe);
+	    org.jdesktop.jdic.desktop.Desktop.browse(u);
+	} catch (Exception e){
+	    logger.error("Could not launch browser for form (" + u + "): " + e);
+	    editorPane.setText("Your Java does not support external browser launch.  " +
+			       "Please manually launch a browser and go to the URL " +
+			       u);
 	}
     }
 




More information about the MOBY-guts mailing list