[MOBY-guts] biomoby commit

Eddie Kawas kawas at dev.open-bio.org
Sun May 18 12:43:10 UTC 2008


kawas
Sun May 18 08:43:09 EDT 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv29582/src/main/org/biomoby/service/dashboard

Modified Files:
	PerlMoSeSPanel.java 
Log Message:
made the 'generate cgi services' check box a radio button
added a pop that occurs when generating services.
moby-live/Java/src/main/org/biomoby/service/dashboard PerlMoSeSPanel.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java	2008/05/15 18:58:47	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/PerlMoSeSPanel.java	2008/05/18 12:43:09	1.2
@@ -30,6 +30,7 @@
 import javax.swing.AbstractButton;
 import javax.swing.BorderFactory;
 import javax.swing.Box;
+import javax.swing.ButtonGroup;
 import javax.swing.Icon;
 import javax.swing.JButton;
 import javax.swing.JCheckBox;
@@ -39,6 +40,7 @@
 import javax.swing.JLabel;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
+import javax.swing.JRadioButton;
 import javax.swing.JScrollPane;
 import javax.swing.JSplitPane;
 import javax.swing.JTabbedPane;
@@ -71,6 +73,8 @@
     static String PM_OVERWRITE = "perl-moses-overwrite";
 
     static String PM_CGI = "perl-moses-cgi";
+    
+    static String PM_SOAP = "perl-moses-soap";
 
     static String PM_UPDATE_SERVICE_CACHE = "perl-moses-update-service-cache";
 
@@ -266,8 +270,7 @@
 	JPanel bPanel = createTitledPanel("Generate");
 	JCheckBox genOverwrite = createActionBox("Overwrite Existing Code",
 		PM_OVERWRITE);
-	JCheckBox genCgi = createActionBox("Generate CGI Service", PM_CGI);
-
+	
 	generateBtn = createButton("Generate Skeletons",
 		"Generate skeletons from selected services", KeyEvent.VK_G,
 		new ActionListener() {
@@ -305,9 +308,15 @@
 		    }
 		});
 
+	ButtonGroup group = new ButtonGroup();
+	JRadioButton genCgi, genSoap;
+	group.add (genCgi = createHowToButton ("Generate CGI Service", PM_CGI));
+	group.add (genSoap     = createHowToButton ("Generate SOAP Service", PM_SOAP));
+	
 	SwingUtils.addComponent(bPanel, genOverwrite, 0, 0, 1, 1, NONE, NWEST, 0.0, 0.0);
 	SwingUtils.addComponent(bPanel, genCgi,       0, 1, 2, 1, NONE, NWEST, 0.0, 0.0);
-	SwingUtils.addComponent(bPanel, generateBtn,  0, 2, 2, 1, NONE, NWEST, 0.0, 0.0);
+	SwingUtils.addComponent(bPanel, genSoap,       0, 2, 2, 1, NONE, NWEST, 0.0, 0.0);
+	SwingUtils.addComponent(bPanel, generateBtn,  0, 3, 2, 1, NONE, NWEST, 0.0, 0.0);
 
 	JPanel uPanel = createTitledPanel("Utilities");
 	JCheckBox syncServices = createActionBox("Synchronize Services",
@@ -585,6 +594,23 @@
 	return panel;
     }
 
+    private JRadioButton createHowToButton (String title, String howTo) {
+	JRadioButton radio = new JRadioButton (title);
+	radio.setActionCommand (howTo);
+	radio.addActionListener (howToListener);
+	if (!howTo.equals(PM_CGI)) {
+	    radio.setSelected (true);
+	    radio.setEnabled (true);
+	}
+	propertyChannel.put (PM_CGI, false);
+	return radio;
+    }
+    private ActionListener howToListener = new ActionListener() {
+	    public void actionPerformed (ActionEvent e) {
+		String howTo = e.getActionCommand();
+		propertyChannel.put (PM_CGI, howTo.equals(PM_CGI));
+	    }
+	};
     private JPanel getServicesSelectionPanel() {
 	JPanel p = new JPanel(new GridBagLayout());
 	p.setBorder(createFatBorder("Select services to work with",
@@ -810,8 +836,9 @@
 				.add(propertyChannel
 					.getString(DashboardProperties.DP_REGISTRY_ENDPOINT));
 			if (Boolean.parseBoolean(propertyChannel
-				.getString(PM_CGI)))
+				.getString(PM_CGI))){
 			    command.add("-c");
+			}
 			command.add(authority);
 			// place command into com
 			String[] com = command.toArray(new String[] {});
@@ -858,6 +885,10 @@
 		    propertyChannel
 			    .fire(DP_STATUS_MSG,
 				    "Generating Perl-MoSeS service skeletons complete!");
+		    JOptionPane.showMessageDialog(null,
+			        "Processing of selected service completed!\n" +
+		    		"Please check the 'console' to ensure that the service\n" +
+		    		"skeletons were generated correctly.", "Completed", JOptionPane.INFORMATION_MESSAGE);
 		    if (!(propertyChannel.getBoolean(PM_SYNC_DATATYPES, false) || propertyChannel
 			    .getBoolean(PM_SYNC_SERVICES, false))) {
 			syncBtn.setEnabled(true);
@@ -900,8 +931,9 @@
 				.add(propertyChannel
 					.getString(DashboardProperties.DP_REGISTRY_ENDPOINT));
 			if (Boolean.parseBoolean(propertyChannel
-				.getString(PM_CGI)))
+				.getString(PM_CGI))){
 			    command.add("-c");
+			}
 			command.add(auth);
 			command.add(name);
 			// place command into com
@@ -951,6 +983,10 @@
 		    propertyChannel
 			    .fire(DP_STATUS_MSG,
 				    "Generating Perl-MoSeS service skeletons complete!");
+		    JOptionPane.showMessageDialog(null,
+			        "Processing of selected service completed!\n" +
+		    		"Please check the 'console' to ensure that the service\n" +
+		    		"skeletons were generated correctly.", "Completed", JOptionPane.INFORMATION_MESSAGE);
 		    if (!(propertyChannel.getBoolean(PM_SYNC_DATATYPES, false) || propertyChannel
 			    .getBoolean(PM_SYNC_SERVICES, false))) {
 			syncBtn.setEnabled(true);




More information about the MOBY-guts mailing list