1. Ted Liefeld
  2. Combined

Commits

liefeld  committed efc18bf

updating gsui to use mock atm to start preparing the ui for launching tools

  • Participants
  • Parent commits b627d09
  • Branches default

Comments (0)

Files changed (18)

File ui/lib/atm-messages.jar

Binary file modified.

File ui/lib/dm-messages.jar

Binary file modified.

File ui/lib/genomespace-cdk.jar

Binary file modified.

File ui/src/org/genomespace/gsui/message/ChangeViewMessage.java

View file
 public class ChangeViewMessage extends AbstractTypedGPGEMessage {
 	
 	public static int GETTING_STARTED_SHOWN = 0;
-	public static int RUN_TASK_SHOWN = 1;
-	public static int EDIT_PIPELINE_SHOWN = 2;
-	public static int VIEW_PIPELINE_SHOWN = 3;
-	public static int EDIT_SUITE_SHOWN = 4;
+	public static int TOOL_ANALYSES_SHOWN = 1;
+	public static int TOOL_LIST_SHOWN = 2;
+	public static int TOOL_ANALYSES_LAUNCH_SHOWN = 3;
+	public static int TOOL_ANALYSES_LAUNCH_COMPLETE_SHOWN = 4;
+	
+	
+	
 	
 	private Component component;
 	

File ui/src/org/genomespace/gsui/message/ChangeViewMessageRequest.java

View file
 
 public class ChangeViewMessageRequest extends AbstractTypedGPGEMessage {
 	
-	public static final int SHOW_RUN_TASK_REQUEST = 0;
-	public static final int SHOW_EDIT_PIPELINE_REQUEST = 1;
-	public static final int SHOW_VIEW_PIPELINE_REQUEST = 2;
+	public static final int SHOW_TOOL_ANALYSES_REQUEST = 0;
+	public static final int SHOW_TOOL_ANALYSES_LAUNCH_REQUEST = 2;
+	public static final int SHOW_TOOL_LIST_REQUEST = 1;
 	public static final int SHOW_GETTING_STARTED_REQUEST = 3;
-	public static final int SHOW_EDIT_SUITE_REQUEST = 4;
+	public static final int SHOW_TOOL_LAUNCH_COMPLETE = 4;
+	
+	
 	
 	private Object objToDisplay;
 	
 		this.objToDisplay = objToDisplay;
 	}
 
+	public Object getObjToDisplay() {
+		return objToDisplay;
+	}
+
+	public void setObjToDisplay(Object objToDisplay) {
+		this.objToDisplay = objToDisplay;
+	}
+ 
 	
 
 }

File ui/src/org/genomespace/gsui/mock/MockATMClient.java

View file
 	}
 	
 	
+//	public WebToolDescriptor(String name,
+//			String id,
+//			String version,
+//			String author,
+//			String description,
+//			URI help,
+//			List<ToolParameter> params,
+//			Set<String> tags,
+//			Map<String,String> metadata,
+//			String baseUrl) {
+//		super (name, id, version, author, description, help, params, tags, metadata);
+//		this.baseUrl = baseUrl;
+//	protected ToolParameter(String name,
+//            String variable,
+//            String description,
+//            boolean required,
+//            String defaultValue,
+//            String syntax,
+//            String validator)
+//	}
 	
+	public List<WebToolDescriptor> getWebToolAnalysess(String toolName){
+		ArrayList<WebToolDescriptor> analyses = new ArrayList<WebToolDescriptor>();
+		if (!toolName.equals("GenePattern")) return analyses;
+		try {
+			List<ToolParameter> params  = new ArrayList<ToolParameter>();
+			ToolParameter module = new DataSourceParameter("lsid", "String", "module LSID", true, "ConvertLineEndings", "String", "", null);
+			ToolParameter inputFilename = new DataSinkParameter("input.filename", "File", "module LSID", true, "http://www.yahoo.com", "String", "", null);
+			params.add(module);
+			params.add(inputFilename);
+			
+			WebToolDescriptor gp1 = 
+				new WebToolDescriptor("GenePattern: ConvertLineEndings",
+						"Genepattern:ConvertLineEndings","3.3.1","many","1 Converts a file to the local line ending convention",
+						new URI("http://www.genepattern.org"), params,null,null,
+						"http://50.16.214.133:8080/gp/pages/index.jsf");
+		
+			WebToolDescriptor gp2 = 
+				new WebToolDescriptor("GenePattern: ConvertLineEndings2",
+						"Genepattern:ConvertLineEndings","3.3.1","many","2 Converts a file to the local line ending convention",
+						new URI("http://www.genepattern.org"), params,null,null,
+						"http://50.16.214.133:8080/gp/pages/index.jsf");
+		
+			WebToolDescriptor gp3 = 
+				new WebToolDescriptor("GenePattern: ConvertLineEndings3",
+						"Genepattern:ConvertLineEndings","3.3.1","many","3 Converts a file to the local line ending convention",
+						new URI("http://www.genepattern.org"), params,null,null,
+						"http://50.16.214.133:8080/gp/pages/index.jsf");
+		
 	
+			analyses.add(gp1);
+			analyses.add(gp2);
+			analyses.add(gp3);
+			
+		} catch (Exception e){
+			e.printStackTrace();
+		}
+		return analyses;
+	}
+	
+	
+	
+	public List<ToolParameter> getAnalysisParams(WebToolDescriptor tool){
+		List<ToolParameter> params  = new ArrayList<ToolParameter>();
+		ToolParameter module = new DataSourceParameter("lsid", "String", "module LSID", true, "ConvertLineEndings", "String", "", null);
+		ToolParameter inputFilename = new DataSinkParameter("input.filename", "File", "module LSID", true, "http://www.yahoo.com", "String", "", null);
+		params.add(module);
+		params.add(inputFilename);
+		return params;
+	
+	}
+	//http://50.16.214.133:8080/gp/pages/index.jsf?lsid=PreprocessDataset&input.filename=ftp://ftp.broadinstitute.org/pub/genepattern/datasets/all_aml/all_aml_test.gct
+	public String getLaunchUrl(WebToolDescriptor tool, HashMap<String,String> paramValues){
+		String baseUrl = tool.getBaseUrl();
+		StringBuffer buff = new StringBuffer(baseUrl);
+		if (!baseUrl.endsWith("?")) buff.append("?");
+		List<ToolParameter> defaults = getAnalysisParams( tool);
+		int i=0;
+		int end=defaults.size()-1;
+		for (ToolParameter param: defaults){
+			buff.append(param.getParameterName());
+			buff.append("=");
+			String val = paramValues.get(param.getParameterName());
+			if (val == null) val = param.getDefaultValue();
+			buff.append(val);
+			if (i != end) buff.append("&");
+			i++;
+		}
+		
+		return buff.toString();
+	}
 }

File ui/src/org/genomespace/gsui/resources/Galaxy.jpg

Old
Old image
New
New image

File ui/src/org/genomespace/gsui/resources/GenePattern.jpg

Old
Old image
New
New image

File ui/src/org/genomespace/gsui/resources/Genomica.jpg

Old
Old image
New
New image

File ui/src/org/genomespace/gsui/resources/IGV.jpg

Old
Old image
New
New image

File ui/src/org/genomespace/gsui/resources/defaultTool.jpg

Added
New image

File ui/src/org/genomespace/gsui/ui/maindisplay/GenomeSpaceUI.java

View file
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.*;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import org.genomespace.gsui.ui.project.ProjectDirectoryListener;
 import org.genomespace.gsui.ui.project.ProjectEvent;
 import org.genomespace.gsui.ui.project.GSProjectDirModel.*;
-import org.genomespace.gsui.ui.tasks.FileInfoComponent;
+import org.genomespace.gsui.ui.tasks.*;
 import org.genomespace.gsui.ui.treetable.SortableTreeTable;
 import org.genomespace.gsui.ui.util.GUIUtil;
 import org.genomespace.gsui.util.BuildProperties;
-import org.genomespace.model.descriptors.tool.WebToolDescriptor;
+import org.genomespace.model.descriptors.tool.*;
 
 
 
        
         CLThread changeStatusThread = new CLThread() {
             public void run() {
-                frame.setTitle("GenomeSpace Desktop Client, Not logged in.");
+                frame.setTitle("GenomeSpace Desktop, Not logged in.");
 
             }
         };
 
         MessageManager.addGPGEMessageListener(new GPGEMessageListener() {
             public void receiveMessage(GPGEMessage message) {
-                System.out.println("TODO: What happens here?");
+                System.out.println("TODO: What happens here? " + message + "  " + message.getSource());
+                
+                if (message instanceof ChangeViewMessage){
+                	System.out.println("Changed view to " + message);
+                } 
+                
+                
             }
 
             
         MessageManager.addGPGEMessageListener(new GPGEMessageListener() {
 
             public void receiveMessage(GPGEMessage message) {
-                if (!(message instanceof ChangeViewMessage)) {
+             	System.out.println("ChangeViewMessage handler received " + message + " " + message.getSource());
+                   if (!(message instanceof ChangeViewMessage)) {
+                	
+                	   System.out.println("NOT ChangeView  " + message + " " );
+                	
+                	
                     return;
                 }
 
         leftPanel.add(leftPane, BorderLayout.CENTER);
         leftPanel.add(fileSummaryComponent, BorderLayout.SOUTH);
 
-        JPanel rightBackPanel = new JPanel(new BorderLayout());
-        rightBackPanel.setBackground(Color.gray);
         
-        JPanel rightPanel = new RoundedPanel(new BorderLayout(), 25);
-        rightPanel.setMinimumSize(new Dimension(200, 200));
-        
-        JPanel rightTopPanel = new RoundedPanel(new BorderLayout(), 25);
-        rightTopPanel.setBackground(Color.white);
-        
-        JPanel rightToolPanel = new RoundedPanel(new BorderLayout(), 25);
-        rightToolPanel.setBackground(Color.white);
-     
-            
-        final java.net.URL url = GSUILauncher.class.getResource("/org/genomespace/gsui/resources/genomespacelogo.png");
-        final ImageIcon icon = new ImageIcon(url);
-        rightTopPanel.add(new JLabel(icon), BorderLayout.CENTER);
-        rightTopPanel.setBackground(Color.white);
-        rightPanel.add(rightTopPanel, BorderLayout.NORTH);
-        
-         
-        JLabel lr2 = new JLabel("Tools", JLabel.CENTER);
-        lr2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
-        lr2.setForeground(Color.darkGray);
-        rightToolPanel.add(lr2, BorderLayout.NORTH);
-  
-        rightToolContainerPanel = new JPanel(new FlowLayout(10));
-        rightToolContainerPanel.setBackground(Color.white);
-        rightToolPanel.add(rightToolContainerPanel, BorderLayout.CENTER);
-        
-        
-        rightPanel.add(rightToolPanel, BorderLayout.CENTER);
-        
-        
-        rightBackPanel.add(rightPanel);
-        
-        final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, rightBackPanel);
+        final JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, new GettingStartedDisplay());
         new ViewManager(splitPane);
         MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
                 ChangeViewMessageRequest.SHOW_GETTING_STARTED_REQUEST));
     
     JPanel rightToolContainerPanel;
     
-    public JPanel addToolChooser(WebToolDescriptor tool){
-      	 JPanel toolPanel = new RoundedPanel(new BorderLayout(), 25);
-      	 JPanel buttonPanel = new RoundedPanel(new FlowLayout(5), 25);
-      	 final WebToolDescriptor aTool = tool;
-     	
-      	 toolPanel.setPreferredSize(new Dimension(180,140));
-     //	 toolPanel.setBackground(Color.lightGray);
-     	 JButton launchButton = new JButton("launch");
-     	 launchButton.setPreferredSize(new Dimension(70,30));
-     	 launchButton.setMaximumSize(new Dimension(70,30));
-    	 
-     	 launchButton.addActionListener(new ActionListener(){
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				try {
-				BrowserLauncher.openURL(aTool.getBaseUrl());
-				} catch (Exception exc){
-					exc.printStackTrace();
-				}
-			}
-     		 
-     	 });
-     	 
-     	JButton analysesButton = new JButton("Analyses");
-     	analysesButton.setPreferredSize(new Dimension(90,30));
-     	analysesButton.setMaximumSize(new Dimension(90,30));
-   	 
-     	analysesButton.addActionListener(new ActionListener(){
-
-			@Override
-			public void actionPerformed(ActionEvent e) {
-				try {
-				BrowserLauncher.openURL(aTool.getBaseUrl());
-				} catch (Exception exc){
-					exc.printStackTrace();
-				}
-			}
-    		 
-    	 });
-     	 
-     	java.net.URL defaultUrl = GSUILauncher.class.getResource("/org/genomespace/gsui/resources/GPGE_small.jpg");
-        java.net.URL url = GSUILauncher.class.getResource("/org/genomespace/gsui/resources/"+tool.getToolName()+".jpg");
-        if (url == null) url = defaultUrl;
-        final ImageIcon icon = new ImageIcon(url);
-        
-     	 
-     	 
-     	 JLabel lr = new JLabel(tool.getToolName(), JLabel.CENTER);
-     	 toolPanel.add(lr, BorderLayout.NORTH);
-     	 toolPanel.add(new JLabel(icon), BorderLayout.CENTER);
-     	 toolPanel.add(buttonPanel, BorderLayout.SOUTH);
-    	 
-     	 buttonPanel.add(launchButton);
-     	 buttonPanel.add(analysesButton);
-     	
-     	
-       	rightToolContainerPanel.add(toolPanel);
-     	return toolPanel;
+  
+    
+    public URL getImageURL(String toolName){
+    	java.net.URL defaultUrl = GSUILauncher.class.getResource("/org/genomespace/gsui/resources/defaultTool.jpg");
+        java.net.URL url = GSUILauncher.class.getResource("/org/genomespace/gsui/resources/"+toolName+".jpg");
+        if (url == null) url = defaultUrl;	
+        return url;
     }
     
     
 		if ((this.gsSession != null) && (this.gsSession.isLoggedIn())){
 		
         try {
-        	// List<WebToolDescriptor> atmtools = gsSession.getAnalysisToolManagerClient().getWebTools();
-        	List<WebToolDescriptor> atmtools = new MockATMClient().getWebTools();
         	
-        	System.out.println("\n\n ATM RETURNED " + atmtools.size());
+        	MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
+				    ChangeViewMessageRequest.SHOW_TOOL_LIST_REQUEST, this));
         	
-        	 tools = new Object[atmtools.size()];
-             for (int i=0; i< atmtools.size(); i++){
-               	final WebToolDescriptor aTool = atmtools.get(i);
-               	addToolChooser(aTool);
-       	        tools[i] = new MenuItemAction(aTool.getToolName(), null) {
-       	            public void actionPerformed(ActionEvent e) {
-       	                try {
-       						BrowserLauncher.openURL(aTool.getBaseUrl());
-       					} catch (IOException e1) {
-       						// TODO Auto-generated catch block
-       						e1.printStackTrace();
-       					}
-       	            }
-       	        };
-               }
         } catch (Exception e){
         	e.printStackTrace();
         }
         
        
+		} else {
+			MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
+				    ChangeViewMessageRequest.SHOW_GETTING_STARTED_REQUEST, this));
 		}
         if (toolsMenu != null){
         	menuBar.remove(toolsMenu);
         }
-        toolsMenuAction = new MenuAction("Tools", tools);
-        toolsMenu = toolsMenuAction.createMenu();
-        menuBar.add(toolsMenu, 2);
-       
-        toolsMenuAction.setEnabled(false);
+//        toolsMenuAction = new MenuAction("Tools", tools);
+//        toolsMenu = toolsMenuAction.createMenu();
+//        menuBar.add(toolsMenu, 2);
+//       
+//        toolsMenuAction.setEnabled(false);
 	}
 
    
 		        		gpge.setGsUser(gsUser);
 		        		
 		        	
-		        		GenomeSpaceUI.getInstance().getFrame().setTitle("GenomeSpace Desktop Client, " + gsUser.getUsername());
+		        		GenomeSpaceUI.getInstance().getFrame().setTitle("GenomeSpace Desktop, " + gsUser.getUsername());
 		        		GenomeSpaceUI.getInstance().loginMenuItem.setEnabled(false);
 		        		GenomeSpaceUI.getInstance().populateTools();
-		        		GenomeSpaceUI.getInstance().toolsMenuAction.setEnabled(true);
+		        		//GenomeSpaceUI.getInstance().toolsMenuAction.setEnabled(true);
 		        		
 		        		gpge.getGSProjectDirectoryModel().populateGSUserDir();
 	        		} else {
     public GSProjectDirModel getGSProjectDirectoryModel() {
         return gsProjectDirModel;
     }
-    
+
+    /**
+     * create items on the GS Projects send to menu to send the files URL to each of the parameters
+     * 
+     * @param params
+     * @param panel
+     */
+	public void setupGSSendToMenu(List<ToolParameter> params,
+			final ToolAnalysesLaunchDisplay panel) {
+		// TODO Auto-generated method stub
+		projectGSFileSendToMenu.removeAll();
+
+		for (ToolParameter param: params){
+			
+			 final ToolParameter p = param;
+			 if (p.getVariableName().equals("File")){
+			 
+			 MenuItemAction paramMenuItem = new MenuItemAction(param.getParameterName()) {
+	                public void actionPerformed(ActionEvent e) {
+	                    GSProjectDirModel.GSFileNode fn = (GSProjectDirModel.GSFileNode) selectedGsFileNode;
+	                    System.out.println("send to req for " + p.getParameterName() + " with file "+ fn);
+	                    ProjectDirModel.ProjectDirNode parent = null;
+	                    GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+	                    
+	    				boolean projectNodeSelected = gsui.selectedProjectDirNode instanceof ProjectDirModel.ProjectDirNode;
+						boolean projectFileSelected = gsui.selectedProjectDirNode instanceof ProjectDirModel.FileNode;
+	            
+						if (projectFileSelected){
+							ProjectDirModel.FileNode node = (ProjectDirModel.FileNode) selectedProjectDirNode;
+							parent = (ProjectDirModel.ProjectDirNode) node.getParent();
+
+						} else if (projectNodeSelected){
+							parent = (ProjectDirModel.ProjectDirNode) GenomeSpaceUI.getInstance().selectedProjectDirNode;
+						} else {
+							// no local file or dir selected, just grab the first dir to save it into
+							
+							 parent = (ProjectDirModel.ProjectDirNode)gsui.projectDirModel.getChild(gsui.projectDirModel.getRoot(), 0);
+						}
+								 
+						
+						
+						URL url = gsSession.getDataManagerClient().getDownloadUrl(fn.gsFile);
+						JTextField field = panel.getInputParameterFields().get(p.getParameterName());
+						if (field != null){
+							field.setText(URLEncoder.encode(url.toString()));
+						}
+						
+						
+	                    
+	                }
+	            };
+	            projectGSFileSendToMenu.add(paramMenuItem);
+			 }
+		}
+		
+		projectGSFileSendToMenu.setEnabled(true);
+	}
+	public void clearGSSendToMenu(){
+		projectGSFileSendToMenu.removeAll();
+		projectGSFileSendToMenu.setEnabled(false);
+
+	}
 }

File ui/src/org/genomespace/gsui/ui/maindisplay/ViewManager.java

View file
 
 import java.awt.Component;
 import java.awt.Dimension;
+import java.util.List;
 
-import javax.swing.JSplitPane;
+import javax.swing.*;
 
 import org.genomespace.gsui.GSUILauncher;
 import org.genomespace.gsui.message.ChangeViewMessage;
 import org.genomespace.gsui.message.GPGEMessage;
 import org.genomespace.gsui.message.GPGEMessageListener;
 import org.genomespace.gsui.message.MessageManager;
+import org.genomespace.gsui.mock.MockATMClient;
+import org.genomespace.gsui.ui.tasks.*;
+import org.genomespace.model.descriptors.tool.*;
 
 
 public class ViewManager {
 		MessageManager.addGPGEMessageListener(new GPGEMessageListener() {
 
 			public void receiveMessage(GPGEMessage message) {
-				if (message instanceof ChangeViewMessageRequest) {
-					ChangeViewMessageRequest asm = (ChangeViewMessageRequest) message;
-					if (asm.getType() == ChangeViewMessageRequest.SHOW_GETTING_STARTED_REQUEST) {
-						
-						
-					} else {
-						System.err.println("Unknown type:" + asm.getType());
+				
+					 if (message instanceof ChangeViewMessageRequest){
+		                	ChangeViewMessageRequest req = (ChangeViewMessageRequest)message;
+		                	
+		                	if (req.getType() == ChangeViewMessageRequest.SHOW_TOOL_ANALYSES_REQUEST){
+		                		System.out.println("show Analyses for tool");
+                            	WebToolDescriptor tool = (WebToolDescriptor)req.getObjToDisplay();
+		                	 	JPanel panel = new ToolAnalysesListDisplay(tool);
+		                	 	setComponent(panel);
+                                MessageManager.notifyListeners(new ChangeViewMessage(
+                                                 message.getSource(),
+                                                 ChangeViewMessage.TOOL_ANALYSES_SHOWN,
+                                                 panel));
+                            } else if (req.getType() == ChangeViewMessageRequest.SHOW_GETTING_STARTED_REQUEST){
+                            	System.out.println("show Getting started");
+                            	JPanel panel = new GettingStartedDisplay();
+		                	 	setComponent(panel);
+                                MessageManager.notifyListeners(new ChangeViewMessage(
+                                                 message.getSource(),
+                                                 ChangeViewMessage.GETTING_STARTED_SHOWN,
+                                                 panel));
+                            } else if (req.getType() == ChangeViewMessageRequest.SHOW_TOOL_LIST_REQUEST){
+                            	System.out.println("show tool list");
+                            	JPanel panel = new ToolListDisplay();
+		                	 	setComponent(panel);
+                                MessageManager.notifyListeners(new ChangeViewMessage(
+                                                 message.getSource(),
+                                                 ChangeViewMessage.TOOL_LIST_SHOWN,
+                                                 panel));
+                                
+                            }  else if (req.getType() == ChangeViewMessageRequest.SHOW_TOOL_ANALYSES_LAUNCH_REQUEST){
+                            	prepareForAnalysisLaunch(message, req);
+                                
+                                //SHOW_TOOL_ANALYSES_LAUNCH_REQUEST
+                                
+                            }  else if (req.getType() == ChangeViewMessageRequest.SHOW_TOOL_LAUNCH_COMPLETE){
+                            	showLaunchComplete(message, req);
+                                
+                                //SHOW_TOOL_ANALYSES_LAUNCH_REQUEST
+                                
+                            } else {
+						System.err.println("Unknown type:" + req.getType());
 					}
-				}
+				 }
 			}
+
+			/**
+			 * @param message
+			 * @param req
+			 */
+			private void prepareForAnalysisLaunch(GPGEMessage message,
+					ChangeViewMessageRequest req) {
+				System.out.println("show tool launch display");
+				
+				// set up the display panel for the analysis launch
+				WebToolDescriptor tool = (WebToolDescriptor)req.getObjToDisplay();
+				MockATMClient atm = new MockATMClient();
+				List<ToolParameter> params = atm.getAnalysisParams(tool);
+				ToolAnalysesLaunchDisplay panel = new ToolAnalysesLaunchDisplay(tool);
+				setComponent(panel);
+				
+				// update the 'send to' menu for the GS files
+				GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+				gsui.setupGSSendToMenu(params, panel);
+				
+				MessageManager.notifyListeners(new ChangeViewMessage(
+				                 message.getSource(),
+				                 ChangeViewMessage.TOOL_ANALYSES_LAUNCH_SHOWN,
+				                 panel));
+			}
+			
+			
+			private void showLaunchComplete(GPGEMessage message,
+					ChangeViewMessageRequest req) {
+				System.out.println("show tool launch complete");
+				
+				// set up the display panel for the analysis launch
+				ToolAnalysesLaunchDisplay launchPanel = (ToolAnalysesLaunchDisplay)req.getObjToDisplay();
+				
+				ToolAnalysesLaunchComplete panel = new ToolAnalysesLaunchComplete(launchPanel);
+				setComponent(panel);
+				
+				// update the 'send to' menu for the GS files
+				GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+				gsui.clearGSSendToMenu();
+				
+				MessageManager.notifyListeners(new ChangeViewMessage(
+				                 message.getSource(),
+				                 ChangeViewMessage.TOOL_ANALYSES_LAUNCH_COMPLETE_SHOWN,
+				                 panel));
+			}
+			
 		});
 
 	}

File ui/src/org/genomespace/gsui/ui/tasks/GettingStartedDisplay.java

View file
+package org.genomespace.gsui.ui.tasks;
+
+import java.awt.*;
+import java.awt.event.*;
+
+import javax.swing.*;
+
+import org.genomespace.gsui.GSUILauncher;
+import org.genomespace.gsui.message.*;
+import org.genomespace.gsui.ui.maindisplay.*;
+import org.genomespace.model.descriptors.tool.WebToolDescriptor;
+
+public class GettingStartedDisplay extends JPanel {
+
+	
+	public GettingStartedDisplay(){
+		setup();
+	}
+	
+	/**
+     * bring up a panel showing the sub analyses available for this tool
+     * @param gsui
+     * @param tool
+     */
+    public JPanel setup(){
+    	
+          this.setLayout(new BorderLayout());
+          java.net.URL url = GSUILauncher.class.getResource("/org/genomespace/gsui/resources/genomespacelogo.png");
+         
+          final ImageIcon icon = new ImageIcon(url);
+          this.add(new JLabel(icon), BorderLayout.NORTH);
+          JLabel helpText = new JLabel("Welcome to GenomeSpace.  Sign in (or register) to see available tools and data files.", JLabel.CENTER);
+          helpText.setForeground(Color.darkGray);
+          this.add(helpText, BorderLayout.CENTER);
+    
+          this.setBackground(Color.white);
+    
+          GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+          if (gsui.getGsSession() != null){
+          if (gsui.getGsSession().isLoggedIn()){
+	          JButton backToTools = new JButton("Back to tool list");
+	          backToTools.setPreferredSize(new Dimension(90,30));
+	          backToTools.setMaximumSize(new Dimension(90,30));
+	    	 
+	          backToTools.addActionListener(new ActionListener(){
+	
+	  			@Override
+	  			public void actionPerformed(ActionEvent e) {
+	  				try {
+	  					
+	  				    MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
+	  						    ChangeViewMessageRequest.SHOW_TOOL_LIST_REQUEST, this));
+	  				
+	  				} catch (Exception exc){
+	  					exc.printStackTrace();
+	  				}
+	  			}
+	     		 
+	     	 });
+	          this.add(backToTools, BorderLayout.SOUTH);
+          }
+          }
+          return this;
+    	
+    }
+	
+	
+	
+}

File ui/src/org/genomespace/gsui/ui/tasks/ToolAnalysesLaunchComplete.java

View file
+package org.genomespace.gsui.ui.tasks;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import java.util.List;
+
+import javax.swing.*;
+
+import org.genepattern.gui.BrowserLauncher;
+import org.genomespace.gsui.message.*;
+import org.genomespace.gsui.mock.MockATMClient;
+import org.genomespace.gsui.ui.maindisplay.*;
+import org.genomespace.model.descriptors.tool.*;
+
+/**
+ * Display a page to the user indicating their analysis should have been launched
+ * @author liefeld
+ *
+ */
+public class ToolAnalysesLaunchComplete extends JPanel {
+
+	WebToolDescriptor tool;
+	ToolAnalysesLaunchDisplay launchDisplay;
+	
+	public ToolAnalysesLaunchComplete(ToolAnalysesLaunchDisplay launchDisplay){
+		this.tool = launchDisplay.getTool();
+		this.launchDisplay = launchDisplay;
+		setupForTool();
+	}
+	
+	public WebToolDescriptor getTool() {
+		return tool;
+	}
+
+	public void setTool(WebToolDescriptor tool) {
+		this.tool = tool;
+	}
+
+
+	/**
+     * bring up a panel showing the sub analyses available for this tool
+     * @param gsui
+     * @param tool
+     */
+    public JPanel setupForTool(){
+    	  this.setLayout(new BorderLayout());
+          
+    	  JPanel rightTopPanel = new RoundedPanel(new BorderLayout(), 25);
+          rightTopPanel.setBackground(Color.white);
+          
+          JPanel rightAnalysesPanel = new RoundedPanel(new BorderLayout(), 25);
+          rightAnalysesPanel.setBackground(Color.white);
+           
+          GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();    
+          final java.net.URL url = gsui.getImageURL(tool.getToolName());
+         
+          JPanel titlePanel = new RoundedPanel(new FlowLayout(), 25);
+          titlePanel.setBackground(Color.white);
+          final ImageIcon icon = new ImageIcon(url);
+          titlePanel.add(new JLabel(icon));
+          JLabel lblToolName = new JLabel(tool.getToolName(), JLabel.CENTER);
+          lblToolName.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
+          lblToolName.setForeground(Color.darkGray);
+        
+          titlePanel.add(lblToolName);
+          
+          JLabel lblToolDescrip = new JLabel(tool.getDescription(), JLabel.CENTER);
+          lblToolDescrip.setForeground(Color.darkGray);
+          titlePanel.add(lblToolDescrip);
+          
+          this.add(titlePanel, BorderLayout.NORTH);
+          
+           
+          JLabel lr2 = new JLabel("Analyses", JLabel.CENTER);
+          lr2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
+          lr2.setForeground(Color.darkGray);
+          rightAnalysesPanel.add(lr2, BorderLayout.NORTH);
+    
+          JPanel rightAnalysesContainerPanel = new JPanel(new FlowLayout(10));
+          rightAnalysesContainerPanel.setBackground(Color.white);
+          rightAnalysesPanel.add(rightAnalysesContainerPanel, BorderLayout.CENTER);
+          
+          
+          // ADD THE PARAMETERS FOR THE SELECTED TOOL HERE in the rightAnalysesContainerPanel
+          
+          addAnalysesDisplay(rightAnalysesPanel, tool);
+          // TODO
+          
+          
+          this.add(rightAnalysesPanel, BorderLayout.CENTER);
+          
+          
+          JButton backToTools = new JButton("Back to tool list");
+          backToTools.setPreferredSize(new Dimension(90,30));
+          backToTools.setMaximumSize(new Dimension(90,30));
+    	 
+          backToTools.addActionListener(new ActionListener(){
+
+  			@Override
+  			public void actionPerformed(ActionEvent e) {
+  				try {
+  					
+  				    MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
+  						    ChangeViewMessageRequest.SHOW_TOOL_LIST_REQUEST, this));
+  				
+  				} catch (Exception exc){
+  					exc.printStackTrace();
+  				}
+  			}
+     		 
+     	 });
+          this.add(backToTools, BorderLayout.SOUTH);
+          
+          
+    	return this;
+    	
+    }
+
+    // add the display of a sub-analyses for a tool (e.g. a Genepattern module
+	private void addAnalysesDisplay(JPanel rightAnalysesPanel,
+			WebToolDescriptor d) {
+		GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+		
+		final WebToolDescriptor aTool = d;
+
+		
+		JLabel lr = new JLabel(d.getToolName(), JLabel.CENTER);
+		rightAnalysesPanel.add(lr, BorderLayout.NORTH);
+
+		// add the parameters in the middle
+		JPanel paramPanel = new JPanel(new GridBagLayout());
+	
+		JLabel messageLabel1 = new JLabel("Your analysis has been launched. It should open up in");
+		GridBagConstraints mlc1 = new GridBagConstraints();
+		mlc1.weightx = 0.0;
+		mlc1.gridwidth = 2;
+		mlc1.gridx = 0;
+		mlc1.gridy = 0;
+		paramPanel.add(messageLabel1, mlc1);
+		JLabel messageLabel2 = new JLabel("a new browser window or the application will start on your desktop.");
+		GridBagConstraints mlc2 = new GridBagConstraints();
+		mlc2.weightx = 0.0;
+		mlc2.gridwidth = 2;
+		mlc2.gridx = 0;
+		mlc2.gridy = 1;
+		paramPanel.add(messageLabel2, mlc2);
+		
+		
+		
+		List<ToolParameter> params = (new MockATMClient()).getAnalysisParams(tool);
+		System.out.println("Params " + params.size());
+		int i=0;		
+		int j=2;
+		//paramPanel.add(new JLabel()); // hold place in the grid
+		for (ToolParameter p: params){
+			GridBagConstraints c1 = new GridBagConstraints();
+			c1.weightx = 0.5;
+			c1.gridx = 0;
+			c1.gridy = j;
+			JLabel pLabel = new JLabel(p.getParameterName()+": ", JLabel.RIGHT);
+			pLabel.setPreferredSize(new Dimension(140,20));
+			paramPanel.add(pLabel,c1);
+			
+				JLabel pValue = new JLabel();
+				pValue.setText(p.getDefaultValue());
+				pValue.setPreferredSize(new Dimension(140,20));
+				pValue.setMaximumSize(new Dimension(140,20));
+				pValue.setMinimumSize(new Dimension(140,20));
+				GridBagConstraints c2 = new GridBagConstraints();
+				c2.weightx = 0.5;
+				c2.gridx = 1;
+				c2.gridy = j++;
+				paramPanel.add(pValue, c2);
+			
+		}
+		rightAnalysesPanel.add(paramPanel, BorderLayout.CENTER);
+		
+		
+		return;
+		
+	}
+	
+	
+	
+}

File ui/src/org/genomespace/gsui/ui/tasks/ToolAnalysesLaunchDisplay.java

View file
+package org.genomespace.gsui.ui.tasks;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.*;
+import java.util.List;
+
+import javax.swing.*;
+
+import org.genepattern.gui.BrowserLauncher;
+import org.genomespace.gsui.message.*;
+import org.genomespace.gsui.mock.MockATMClient;
+import org.genomespace.gsui.ui.maindisplay.*;
+import org.genomespace.model.descriptors.tool.*;
+
+public class ToolAnalysesLaunchDisplay extends JPanel {
+
+	WebToolDescriptor tool;
+	HashMap<String, JTextField> inputParameterFields;
+	
+	public ToolAnalysesLaunchDisplay(WebToolDescriptor tool){
+		this.tool = tool;
+		inputParameterFields = new HashMap<String, JTextField>();
+		setupForTool();
+	}
+	
+	public WebToolDescriptor getTool() {
+		return tool;
+	}
+
+	public void setTool(WebToolDescriptor tool) {
+		this.tool = tool;
+	}
+
+	public HashMap<String, JTextField> getInputParameterFields() {
+		return inputParameterFields;
+	}
+
+	public void setInputParameterFields(
+			HashMap<String, JTextField> inputParameterFields) {
+		this.inputParameterFields = inputParameterFields;
+	}
+
+	/**
+     * bring up a panel showing the sub analyses available for this tool
+     * @param gsui
+     * @param tool
+     */
+    public JPanel setupForTool(){
+    	  this.setLayout(new BorderLayout());
+          
+    	  JPanel rightTopPanel = new RoundedPanel(new BorderLayout(), 25);
+          rightTopPanel.setBackground(Color.white);
+          
+          JPanel rightAnalysesPanel = new RoundedPanel(new BorderLayout(), 25);
+          rightAnalysesPanel.setBackground(Color.white);
+           
+          GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();    
+          final java.net.URL url = gsui.getImageURL(tool.getToolName());
+         
+          JPanel titlePanel = new RoundedPanel(new FlowLayout(), 25);
+          titlePanel.setBackground(Color.white);
+          final ImageIcon icon = new ImageIcon(url);
+          titlePanel.add(new JLabel(icon));
+          JLabel lblToolName = new JLabel(tool.getToolName(), JLabel.CENTER);
+          lblToolName.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
+          lblToolName.setForeground(Color.darkGray);
+        
+          titlePanel.add(lblToolName);
+          
+          JLabel lblToolDescrip = new JLabel(tool.getDescription(), JLabel.CENTER);
+          lblToolDescrip.setForeground(Color.darkGray);
+          titlePanel.add(lblToolDescrip);
+          
+          this.add(titlePanel, BorderLayout.NORTH);
+          
+           
+          JLabel lr2 = new JLabel("Analyses", JLabel.CENTER);
+          lr2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
+          lr2.setForeground(Color.darkGray);
+          rightAnalysesPanel.add(lr2, BorderLayout.NORTH);
+    
+          JPanel rightAnalysesContainerPanel = new JPanel(new FlowLayout(10));
+          rightAnalysesContainerPanel.setBackground(Color.white);
+          rightAnalysesPanel.add(rightAnalysesContainerPanel, BorderLayout.CENTER);
+          
+          
+          // ADD THE PARAMETERS FOR THE SELECTED TOOL HERE in the rightAnalysesContainerPanel
+          
+          addAnalysesDisplay(rightAnalysesPanel, tool);
+          // TODO
+          
+          
+          this.add(rightAnalysesPanel, BorderLayout.CENTER);
+          
+          
+          JButton backToTools = new JButton("Back to tool list");
+          backToTools.setPreferredSize(new Dimension(90,30));
+          backToTools.setMaximumSize(new Dimension(90,30));
+    	 
+          backToTools.addActionListener(new ActionListener(){
+
+  			@Override
+  			public void actionPerformed(ActionEvent e) {
+  				try {
+  					
+  				    MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
+  						    ChangeViewMessageRequest.SHOW_TOOL_LIST_REQUEST, this));
+  				
+  				} catch (Exception exc){
+  					exc.printStackTrace();
+  				}
+  			}
+     		 
+     	 });
+          this.add(backToTools, BorderLayout.SOUTH);
+          
+          
+    	return this;
+    	
+    }
+
+    // add the display of a sub-analyses for a tool (e.g. a Genepattern module
+	private void addAnalysesDisplay(JPanel rightAnalysesPanel,
+			WebToolDescriptor d) {
+		GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+		
+		final WebToolDescriptor aTool = d;
+
+		JButton launchButton = new JButton("launch");
+		final ToolAnalysesLaunchDisplay toolDisplay = this;
+		
+		launchButton.addActionListener(new ActionListener() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				try {
+					MockATMClient atm = new MockATMClient();
+					HashMap<String,String> paramValues = new HashMap<String,String>();
+					for (String pName: toolDisplay.inputParameterFields.keySet()){
+						JTextField textField = inputParameterFields.get(pName);
+						paramValues.put(pName, textField.getText());
+					}
+					
+					String launchUrl = atm.getLaunchUrl(aTool, paramValues);
+					
+					System.out.println("Launch is " + launchUrl);
+					
+					BrowserLauncher.openURL(launchUrl);
+					
+					MessageManager
+					.notifyListeners(new ChangeViewMessageRequest(
+							this,
+							ChangeViewMessageRequest.SHOW_TOOL_LAUNCH_COMPLETE,
+							toolDisplay));
+					
+				} catch (Exception exc) {
+					exc.printStackTrace();
+				}
+			}
+
+		});
+
+		JLabel lr = new JLabel(d.getToolName(), JLabel.CENTER);
+		rightAnalysesPanel.add(lr, BorderLayout.NORTH);
+
+		// add the parameters in the middle
+		JPanel paramPanel = new JPanel(new GridLayout(0,2));
+		List<ToolParameter> params = (new MockATMClient()).getAnalysisParams(tool);
+		int i=0;
+		System.out.println("Params " + params.size());
+		
+		for (ToolParameter p: params){
+			
+			JLabel pLabel = new JLabel(p.getParameterName()+": ", JLabel.RIGHT);
+			pLabel.setPreferredSize(new Dimension(140,20));
+			paramPanel.add(pLabel);
+			if (p.getVariableName().equals("File")){
+				JTextField pValue = new JTextField(50);
+				pValue.setText(p.getDefaultValue());
+				pValue.setPreferredSize(new Dimension(140,20));
+				paramPanel.add(pValue);
+				inputParameterFields.put(p.getParameterName(), pValue);
+			} else {
+				JLabel pValue = new JLabel();
+				pValue.setText(p.getDefaultValue());
+				pValue.setPreferredSize(new Dimension(140,20));
+				pValue.setMaximumSize(new Dimension(140,20));
+				pValue.setMinimumSize(new Dimension(140,20));
+				paramPanel.add(pValue);
+			}
+		}
+		rightAnalysesPanel.add(paramPanel, BorderLayout.CENTER);
+		
+		rightAnalysesPanel.add(launchButton, BorderLayout.SOUTH);
+		
+		return;
+		
+	}
+	
+	
+	
+}

File ui/src/org/genomespace/gsui/ui/tasks/ToolAnalysesListDisplay.java

View file
+package org.genomespace.gsui.ui.tasks;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.util.List;
+
+import javax.swing.*;
+
+import org.genepattern.gui.BrowserLauncher;
+import org.genomespace.gsui.message.*;
+import org.genomespace.gsui.mock.MockATMClient;
+import org.genomespace.gsui.ui.maindisplay.*;
+import org.genomespace.model.descriptors.tool.*;
+
+public class ToolAnalysesListDisplay extends JPanel {
+
+	WebToolDescriptor tool;
+	
+	public ToolAnalysesListDisplay(WebToolDescriptor tool){
+		this.tool = tool;
+		setupForTool();
+	}
+	
+	/**
+     * bring up a panel showing the sub analyses available for this tool
+     * @param gsui
+     * @param tool
+     */
+    public JPanel setupForTool(){
+    	  this.setLayout(new BorderLayout());
+          
+    	  JPanel rightTopPanel = new RoundedPanel(new BorderLayout(), 25);
+          rightTopPanel.setBackground(Color.white);
+          
+          JPanel rightAnalysesPanel = new RoundedPanel(new BorderLayout(), 25);
+          rightAnalysesPanel.setBackground(Color.white);
+           
+          GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();    
+          final java.net.URL url = gsui.getImageURL(tool.getToolName());
+         
+          JPanel titlePanel = new RoundedPanel(new FlowLayout(), 25);
+          titlePanel.setBackground(Color.white);
+          final ImageIcon icon = new ImageIcon(url);
+          titlePanel.add(new JLabel(icon));
+          JLabel lblToolName = new JLabel(tool.getToolName(), JLabel.CENTER);
+          lblToolName.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
+          lblToolName.setForeground(Color.darkGray);
+        
+          titlePanel.add(lblToolName);
+          
+          JLabel lblToolDescrip = new JLabel(tool.getDescription(), JLabel.CENTER);
+          lblToolDescrip.setForeground(Color.darkGray);
+          titlePanel.add(lblToolDescrip);
+          
+          this.add(titlePanel, BorderLayout.NORTH);
+          
+           
+          JLabel lr2 = new JLabel("Analyses", JLabel.CENTER);
+          lr2.setFont(new java.awt.Font("Dialog", java.awt.Font.BOLD, 14));
+          lr2.setForeground(Color.darkGray);
+          rightAnalysesPanel.add(lr2, BorderLayout.NORTH);
+    
+          JPanel rightAnalysesContainerPanel = new JPanel(new FlowLayout(10));
+          rightAnalysesContainerPanel.setBackground(Color.white);
+          rightAnalysesPanel.add(rightAnalysesContainerPanel, BorderLayout.CENTER);
+          
+          
+          // ADD THE ANALYSES FOR THE SELECTED TOOL HERE in the rightAnalysesContainerPanel
+          
+          List<WebToolDescriptor> analyses = (new MockATMClient()).getWebToolAnalysess(tool.getToolName());
+          for (WebToolDescriptor d: analyses){
+        	  addAnalysesDisplay(rightAnalysesContainerPanel, d);
+          }
+          
+          this.add(rightAnalysesPanel, BorderLayout.CENTER);
+          
+          
+          JButton backToTools = new JButton("Back to tool list");
+          backToTools.setPreferredSize(new Dimension(90,30));
+          backToTools.setMaximumSize(new Dimension(90,30));
+    	 
+          backToTools.addActionListener(new ActionListener(){
+
+  			@Override
+  			public void actionPerformed(ActionEvent e) {
+  				try {
+  					
+  				    MessageManager.notifyListeners(new ChangeViewMessageRequest(this,
+  						    ChangeViewMessageRequest.SHOW_TOOL_LIST_REQUEST, this));
+  				
+  				} catch (Exception exc){
+  					exc.printStackTrace();
+  				}
+  			}
+     		 
+     	 });
+          this.add(backToTools, BorderLayout.SOUTH);
+          
+          
+    	return this;
+    	
+    }
+
+    // add the display of a sub-analyses for a tool (e.g. a Genepattern module
+	private void addAnalysesDisplay(JPanel rightAnalysesPanel,
+			WebToolDescriptor d) {
+		GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+		JPanel toolPanel = new RoundedPanel(new BorderLayout(), 25);
+		toolPanel.setPreferredSize(new Dimension(400, 150));
+		toolPanel.setMinimumSize(new Dimension(400, 150));
+		toolPanel.setMaximumSize(new Dimension(400, 150));
+		
+		JPanel buttonPanel = new RoundedPanel(new FlowLayout(5), 25);
+		final WebToolDescriptor aTool = d;
+
+		JButton launchButton = new JButton("launch");
+
+		launchButton.addActionListener(new ActionListener() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				try {
+					//BrowserLauncher.openURL(aTool.getBaseUrl());
+					MessageManager
+					.notifyListeners(new ChangeViewMessageRequest(
+							this,
+							ChangeViewMessageRequest.SHOW_TOOL_ANALYSES_LAUNCH_REQUEST,
+							aTool));
+				} catch (Exception exc) {
+					exc.printStackTrace();
+				}
+			}
+
+		});
+
+		JLabel lr = new JLabel(d.getToolName(), JLabel.CENTER);
+		toolPanel.add(lr, BorderLayout.NORTH);
+
+		// add the parameters in the middle
+		JPanel paramPanel = new JPanel(new GridLayout(0,2));
+		List<ToolParameter> params = (new MockATMClient()).getAnalysisParams(tool);
+		int i=0;
+		System.out.println("Params " + params.size());
+		
+		for (ToolParameter p: params){
+			
+			JLabel pLabel = new JLabel(p.getParameterName()+": ", JLabel.RIGHT);
+			pLabel.setPreferredSize(new Dimension(140,15));
+			paramPanel.add(pLabel);
+			
+			JLabel pValue = new JLabel();
+			pValue.setText(p.getDefaultValue());
+			pValue.setPreferredSize(new Dimension(140,15));
+			pValue.setMaximumSize(new Dimension(140,15));
+			pValue.setMinimumSize(new Dimension(140,15));
+			paramPanel.add(pValue);
+			
+		}
+		toolPanel.add(paramPanel, BorderLayout.CENTER);
+		
+		toolPanel.add(buttonPanel, BorderLayout.SOUTH);
+		buttonPanel.add(launchButton);
+		
+		rightAnalysesPanel.add(toolPanel);
+		return;
+		
+	}
+	
+	
+	
+}

File ui/src/org/genomespace/gsui/ui/tasks/ToolListDisplay.java

View file
+package org.genomespace.gsui.ui.tasks;
+
+import java.awt.*;
+import java.awt.event.*;
+import java.io.IOException;
+import java.util.List;
+
+import javax.swing.*;
+
+import org.genepattern.gui.BrowserLauncher;
+import org.genomespace.gsui.GSUILauncher;
+import org.genomespace.gsui.message.*;
+import org.genomespace.gsui.mock.MockATMClient;
+import org.genomespace.gsui.ui.maindisplay.*;
+import org.genomespace.gsui.ui.menu.MenuItemAction;
+import org.genomespace.model.descriptors.tool.WebToolDescriptor;
+
+public class ToolListDisplay extends JPanel {
+
+	JPanel rightToolContainerPanel;
+
+	public ToolListDisplay() {
+		// GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+		// List<WebToolDescriptor> atmtools =
+		// gsSession.getAnalysisToolManagerClient().getWebTools();
+		List<WebToolDescriptor> atmtools = new MockATMClient().getWebTools();
+
+		setupForGSTools();
+		for (int i = 0; i < atmtools.size(); i++) {
+			final WebToolDescriptor aTool = atmtools.get(i);
+			addToolChooser(aTool);
+		}
+	}
+
+	/**
+	 * bring up a panel showing the sub analyses available for this tool
+	 * 
+	 * @param gsui
+	 * @param tool
+	 */
+	public void setupForGSTools() {
+		this.setLayout(new BorderLayout());
+
+		final java.net.URL url = GSUILauncher.class
+				.getResource("/org/genomespace/gsui/resources/genomespacelogo.png");
+		final ImageIcon icon = new ImageIcon(url);
+		this.add(new JLabel(icon), BorderLayout.NORTH);
+		this.setBackground(Color.white);
+
+		rightToolContainerPanel = new JPanel(new FlowLayout(10));
+		rightToolContainerPanel.setBackground(Color.white);
+		this.add(rightToolContainerPanel, BorderLayout.CENTER);
+	}
+
+	public JPanel addToolChooser(final WebToolDescriptor tool) {
+		GenomeSpaceUI gsui = GenomeSpaceUI.getInstance();
+		JPanel toolPanel = new RoundedPanel(new BorderLayout(), 25);
+		JPanel buttonPanel = new RoundedPanel(new FlowLayout(5), 25);
+		final WebToolDescriptor aTool = tool;
+
+		JButton launchButton = new JButton("launch");
+
+		launchButton.addActionListener(new ActionListener() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				try {
+					BrowserLauncher.openURL(aTool.getBaseUrl());
+				} catch (Exception exc) {
+					exc.printStackTrace();
+				}
+			}
+
+		});
+
+		JButton analysesButton = new JButton("Details");
+
+		analysesButton.addActionListener(new ActionListener() {
+
+			@Override
+			public void actionPerformed(ActionEvent e) {
+				try {
+
+					MessageManager
+							.notifyListeners(new ChangeViewMessageRequest(
+									this,
+									ChangeViewMessageRequest.SHOW_TOOL_ANALYSES_REQUEST,
+									tool));
+
+				} catch (Exception exc) {
+					exc.printStackTrace();
+				}
+			}
+
+		});
+
+		java.net.URL url = gsui.getImageURL(tool.getToolName());
+		final ImageIcon icon = new ImageIcon(url);
+
+		JLabel lr = new JLabel(tool.getToolName(), JLabel.CENTER);
+		toolPanel.add(lr, BorderLayout.NORTH);
+		toolPanel.add(new JLabel(icon), BorderLayout.CENTER);
+		toolPanel.add(buttonPanel, BorderLayout.SOUTH);
+
+		buttonPanel.add(launchButton);
+		buttonPanel.add(analysesButton);
+
+		rightToolContainerPanel.add(toolPanel);
+		return toolPanel;
+	}
+
+}