[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Wed Mar 21 16:24:42 UTC 2007


gordonp
Wed Mar 21 12:24:42 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv15783/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobyContentGUI.java 
Log Message:
Changed default startup page to 3 simple instructions for beginners
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobyContentGUI.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentGUI.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentGUI.java	2007/02/08 16:59:57	1.4
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobyContentGUI.java	2007/03/21 16:24:42	1.5
@@ -47,6 +47,7 @@
 
     public final static String DEFAULT_STATUS_MSG = "Click hyperlink to explore MOBY Web services";
     public final static String RESOURCE_SYSTEM_PROPERTY = "seahawk.stylesheet";
+    public final static String DEFAULT_STARTUP_PAGE_RESOURCE = "ca/ucalgary/seahawk/resources/startup.html";
     public final static String DEFAULT_XSLT_CONVERTER_URL = "ca/ucalgary/seahawk/resources/moby2HTML.xsl";
     public final static int MAX_TAB_NAME_LENGTH = 25;
     public final static String CLOSE_TAB_OPTION = "Close This Tab";
@@ -880,12 +881,19 @@
 	    }
 	}
 	else{
-	    gui.showHelpTab();
+	    URL startURL = gui.getClass().getClassLoader().getResource(DEFAULT_STARTUP_PAGE_RESOURCE);
+	    if(startURL == null){
+		logger.error("Could not load "+DEFAULT_STARTUP_PAGE_RESOURCE+" - loading help file instead");
+		gui.showHelpTab();
+	    }
+	    else{
+		gui.loadPaneFromURL(startURL, true);
+	    }
 	}
     }
 
     /**
-     * Method to be called when an applet is decommissioning.
+     * Method to be called when an applet is being decommissioned.
      */
     public static void destroy(){
 	ca.ucalgary.seahawk.util.MobyUtils.destroyMobyGUI();




More information about the MOBY-guts mailing list