[MOBY-guts] biomoby commit

Eddie Kawas kawas at pub.open-bio.org
Wed Aug 31 23:56:39 UTC 2005


kawas
Wed Aug 31 19:56:39 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool
In directory pub.open-bio.org:/tmp/cvs-serv2170/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool

Modified Files:
	ServiceFocusListener.java ServiceInstancePanelFactory.java 
	ServiceActionListener.java 
Log Message:
removed the requirement to enter signature urls and created a pop up text box that pops up when entering a description

moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool ServiceFocusListener.java,1.2,1.3 ServiceInstancePanelFactory.java,1.3,1.4 ServiceActionListener.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java	2005/06/02 15:48:28	1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceFocusListener.java	2005/08/31 23:56:39	1.3
@@ -6,6 +6,8 @@
 import java.awt.event.FocusEvent;
 import java.awt.event.FocusListener;
 
+import javax.swing.JFrame;
+import javax.swing.JTextArea;
 import javax.swing.JTextField;
 
 /**
@@ -19,7 +21,7 @@
 public class ServiceFocusListener implements FocusListener {
 
 	private ServiceCreationTool tool = null;
-
+	DescriptionWindow dw = null;
 	/**
 	 * 
 	 * @param tool - the service creation tool object to associate with the focus listener
@@ -36,13 +38,27 @@
 		if (name.equals("primary")) {
 			tool.getPanelFactory().setRADIO_SELECTED(true);
 			tool.setRadioButtonID(ServiceCreationTool.PRIMARY);
-
 		} else if (name.equals("secondary")) {
 			tool.getPanelFactory().setRADIO_SELECTED(true);
 			tool.setRadioButtonID(ServiceCreationTool.SECONDARY);
 		} else if (name.equals("output")) {
 			tool.getPanelFactory().setRADIO_SELECTED(true);
 			tool.setRadioButtonID(ServiceCreationTool.OUTPUT);
+		} else if (name.equals("description")) {
+		    // pop up window to type in
+		    if (dw == null){
+		        dw = new DescriptionWindow(tool, (JTextArea) (fe.getComponent()));
+		        dw.setVisible(true);
+		    	fe.getComponent().transferFocusUpCycle();
+		    	dw.toFront();
+		    } else {
+		        dw.dispose();
+		        dw = new DescriptionWindow(tool, (JTextArea) (fe.getComponent()));
+		        dw.setVisible(true);
+		    	fe.getComponent().transferFocusUpCycle();
+		    	dw.toFront();
+		    }
+		    
 		}
 	}
 
@@ -58,8 +74,8 @@
 			tool.getService().setAuthority(str);
 		} else if (name.equals("description")) {
 			//index 1
-			String str = ((JTextField) (fe.getComponent())).getText();
-			tool.getService().setDescription(str);
+//			String str = ((JTextArea) (fe.getComponent())).getText();
+//			tool.getService().setDescription(str);
 		} else if (name.equals("name")) {
 			//index 2
 			String str = ((JTextField) (fe.getComponent())).getText();

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceInstancePanelFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceInstancePanelFactory.java	2005/07/19 15:44:10	1.3
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceInstancePanelFactory.java	2005/08/31 23:56:39	1.4
@@ -8,6 +8,7 @@
 import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.FlowLayout;
+import java.awt.Font;
 import java.awt.GridLayout;
 import java.util.Enumeration;
 import java.util.StringTokenizer;
@@ -27,6 +28,7 @@
 import javax.swing.JTextArea;
 import javax.swing.JTextField;
 import javax.swing.ListSelectionModel;
+import javax.swing.text.Style;
 
 import org.biomoby.client.ui.graphical.applets.shared.MobyTree;
 import org.biomoby.client.ui.graphical.applets.util.TreeLoaderThread;
@@ -260,7 +262,11 @@
 		emailField.setName("email");
 		emailField.addFocusListener(tfl);
 
-		JTextField descriptionField = new JTextField(10);
+		JTextArea descriptionField = new JTextArea(2,10);
+		descriptionField.setFont(new Font("Serif", Font.PLAIN, 11));
+		descriptionField.setMinimumSize(descriptionField.getPreferredSize());
+		descriptionField.setLineWrap(true);
+		descriptionField.setWrapStyleWord(true);
 		descriptionField.setName("description");
 		descriptionField.addFocusListener(tfl);
 
@@ -302,7 +308,8 @@
 
 
 		itemPanel.add(descriptionLabel);
-		itemPanel.add(descriptionField);
+		JScrollPane _scrollpane =  new JScrollPane(descriptionField);
+		itemPanel.add(_scrollpane);
 		JPanel help2 = null;
 		help2 = initPanel(help1, "", -1);
 		help2.add(descriptionLabel2,BorderLayout.LINE_START);
@@ -1421,7 +1428,11 @@
 		emailField.addFocusListener(tfl);
 		if (SET)
 			emailField.setText(s.getEmailContact());
-		JTextField descriptionField = new JTextField(10);
+		JTextArea descriptionField = new JTextArea(2,10);
+		descriptionField.setFont(new Font("Serif", Font.PLAIN, 11));
+		descriptionField.setMinimumSize(descriptionField.getPreferredSize());
+		descriptionField.setLineWrap(true);
+		descriptionField.setWrapStyleWord(true);
 		descriptionField.setName("description");
 		descriptionField.addFocusListener(tfl);
 		if (SET)
@@ -1469,7 +1480,7 @@
 
 
 		itemPanel.add(descriptionLabel);
-		itemPanel.add(descriptionField);
+		itemPanel.add(new JScrollPane(descriptionField));
 		JPanel help2 = null;
 		help2 = initPanel(help1, "", -1);
 		help2.add(descriptionLabel2,BorderLayout.LINE_START);

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceActionListener.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/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceActionListener.java	2005/04/07 16:42:27	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/client/ui/graphical/applets/serviceInstanceCreationTool/ServiceActionListener.java	2005/08/31 23:56:39	1.2
@@ -140,9 +140,9 @@
             // check if there is at least one input and output
             if (tool.getService().canRegisterService()) {
                 try {
-                    if (!tool.getService().getSignatureURL().equals("")
-                            && REGEXP.isValidURL(tool.getService()
-                                    .getSignatureURL())) {
+                    if (true ){//!tool.getService().getSignatureURL().equals("")
+                            //&& REGEXP.isValidURL(tool.getService()
+                                    //.getSignatureURL())) {
                         // Display a file save box and save the result.
                         /*
                          * get the result from the centralImp store in the




More information about the MOBY-guts mailing list