[MOBY-guts] biomoby commit

Andreas Groscurth groscurt at dev.open-bio.org
Fri Feb 6 09:17:15 UTC 2009


groscurt
Fri Feb  6 04:17:14 EST 2009
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv10146/src/main/org/biomoby/service/dashboard

Modified Files:
	RegistrationDataTypeSubPanel.java 
	RegistrationServiceTypeSubPanel.java 
	RegistrationNamespaceSubPanel.java 
Log Message:
added unregisterbutton
moby-live/Java/src/main/org/biomoby/service/dashboard RegistrationDataTypeSubPanel.java,1.14,1.15 RegistrationServiceTypeSubPanel.java,1.11,1.12 RegistrationNamespaceSubPanel.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java	2009/02/02 09:05:13	1.14
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationDataTypeSubPanel.java	2009/02/06 09:17:14	1.15
@@ -139,17 +139,18 @@
 	     KeyEvent.VK_F,
 	     REG_DT_FROM_XML,
 	     createXMLChooser (REG_DT_FROM_XML));
-//	unregisButton =
-//	 	    createButton (" Unregister Data Type ",
-//	 	   			  "Remove an existing datatype from a Biomoby registry",
-//	 	   			  KeyEvent.VK_U,
-//	 	   			  new ActionListener() {
-//	 	   			      public void actionPerformed (ActionEvent e) {
-//	 	   			    	  datatypeTree.onUnregisterDataType();
-//	 	   			      }
-//	 	   			  });
-//	unregisButton.setIcon (unregisterIcon);
-//	unregisButton.setDisabledIcon (unregisterIconDis);
+	unregisButton =
+	 	    createButton (" Unregister Data Type ",
+	 	   			  "Remove an existing datatype from a Biomoby registry",
+	 	   			  KeyEvent.VK_U,
+	 	   			  new ActionListener() {
+	 	   			      public void actionPerformed (ActionEvent e) {
+	 	   			    	  datatypeTree.onUnregisterDataType();
+	 	   			      }
+	 	   			  });
+	unregisButton.setIcon (unregisterIcon);
+	unregisButton.setDisabledIcon (unregisterIconDis);
+	unregisButton.setEnabled( false );
 
 	// make splits
 	JSplitPane split = hSplit (hSplit (buildTree.scrollable(),
@@ -160,7 +161,7 @@
  	SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST,  0.0, 0.0);
  	SwingUtils.addComponent (p, showXMLButton,  1, 1, 1, 1, NONE, WEST,  0.0, 0.0);
  	SwingUtils.addComponent (p, fromXMLButton,  2, 1, 1, 1, NONE, WEST,  0.0, 0.0);
-// 	SwingUtils.addComponent (p, unregisButton,  3, 1, 1, 1, NONE, NEAST, 0.0, 0.0);
+ 	SwingUtils.addComponent (p, unregisButton,  3, 1, 1, 1, NONE, NEAST, 0.0, 0.0);
 	return p;
     }
 
@@ -337,6 +338,7 @@
 			try {
 			    if (isDataType)
 				dataType = registryModel.getDataType (nodeObject.getValue());
+			    unregisButton.setEnabled( isDataType );
 			} catch (MobyException e) {
 			    error (DATA_TYPES_ACCESS_ERROR, e);
 			}
@@ -423,7 +425,7 @@
 	    final SwingWorker worker = new SwingWorker() {
 		    public Object construct() {
 			try {
-//				unregisButton.setEnabled( false );
+				unregisButton.setEnabled( false );
 			    MobyDataType dataType = new MobyDataType (dataTypeName);
 			    console.setText ("Data type to be unregistered: " + dataTypeName + "\n");
 			    registryModel.unRegisterDataType (dataType);

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java	2009/01/26 08:29:58	1.11
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationServiceTypeSubPanel.java	2009/02/06 09:17:14	1.12
@@ -135,17 +135,18 @@
 	     KeyEvent.VK_F,
 	     REG_ST_FROM_XML,
 	     createXMLChooser (REG_ST_FROM_XML));
-//	unregisButton =
-//	    createButton (" Unregister Service Type ",
-//			  "Remove an existing service type from a Biomoby registry",
-//			  KeyEvent.VK_U,
-//			  new ActionListener() {
-//			      public void actionPerformed (ActionEvent e) {
-//			    	  serviceTypeTree.onUnregisterServiceType();
-//			      }
-//			  });
-//	unregisButton.setIcon (unregisterIcon);
-//	unregisButton.setDisabledIcon (unregisterIconDis);
+	unregisButton =
+	    createButton (" Unregister Service Type ",
+			  "Remove an existing service type from a Biomoby registry",
+			  KeyEvent.VK_U,
+			  new ActionListener() {
+			      public void actionPerformed (ActionEvent e) {
+			    	  serviceTypeTree.onUnregisterServiceType();
+			      }
+			  });
+	unregisButton.setIcon (unregisterIcon);
+	unregisButton.setDisabledIcon (unregisterIconDis);
+	unregisButton.setEnabled( false );
 
 
 	// put it together
@@ -153,7 +154,7 @@
  	SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST,  0.0, 0.0);
  	SwingUtils.addComponent (p, showXMLButton,  1, 1, 1, 1, NONE, WEST,  0.0, 0.0);
  	SwingUtils.addComponent (p, fromXMLButton,  2, 1, 1, 1, NONE, WEST,  0.0, 0.0);
-// 	SwingUtils.addComponent (p, unregisButton,  3, 1, 1, 1, NONE, NEAST,  0.0, 0.0);
+ 	SwingUtils.addComponent (p, unregisButton,  3, 1, 1, 1, NONE, NEAST,  0.0, 0.0);
 	return p;
     }
 
@@ -292,6 +293,8 @@
 	    if (node == null) {
 		setEnabledPopupItem (AC_UNREG, false);
 		setEnabledPopupItem (AC_PARENT, false);
+		if(unregisButton != null)
+		    unregisButton.setEnabled( false );
 		return;
 	    }
 	    final CommonNode nodeObject = (CommonNode)node.getUserObject();
@@ -306,6 +309,7 @@
 			try {
 			    if (isServiceType)
 				serviceType = registryModel.getServiceType (nodeObject.getValue());
+			    unregisButton.setEnabled( isServiceType );
 			} catch (MobyException e) {
 			    error (SERVICE_TYPES_ACCESS_ERROR, e);
 			}
@@ -368,6 +372,7 @@
 		    MobyException exception = null;
 		    public Object construct() {
 			try {
+			    unregisButton.setEnabled( false );
 			    MobyServiceType serviceType = new MobyServiceType (name);
 			    oldAppendMode = console.setAppendMode (true);
 			    console.setText ("Service type to be unregistered: " + name + "\n");

===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java	2009/01/26 08:29:58	1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/RegistrationNamespaceSubPanel.java	2009/02/06 09:17:14	1.11
@@ -130,24 +130,25 @@
 	     KeyEvent.VK_F,
 	     REG_NS_FROM_XML,
 	     createXMLChooser (REG_NS_FROM_XML));
-//	unregisButton =
-//	    createButton (" Unregister Namespace ",
-//			  "Remove an existing namespace from a Biomoby registry",
-//			  KeyEvent.VK_U,
-//			  new ActionListener() {
-//			      public void actionPerformed (ActionEvent e) {
-//			    	  namespacesTree.onUnregisterNamespace();
-//			      }
-//			  });
-//	unregisButton.setIcon (unregisterIcon);
-//	unregisButton.setDisabledIcon (unregisterIconDis);
+	unregisButton =
+	    createButton (" Unregister Namespace ",
+			  "Remove an existing namespace from a Biomoby registry",
+			  KeyEvent.VK_U,
+			  new ActionListener() {
+			      public void actionPerformed (ActionEvent e) {
+			    	  namespacesTree.onUnregisterNamespace();
+			      }
+			  });
+	unregisButton.setIcon (unregisterIcon);
+	unregisButton.setDisabledIcon (unregisterIconDis);
+	unregisButton.setEnabled( false );
 
 	// put it together
  	SwingUtils.addComponent (p, split,          0, 0, 4, 1, BOTH, NWEST, 1.0, 1.0);
  	SwingUtils.addComponent (p, registerButton, 0, 1, 1, 1, NONE, WEST,  0.0, 0.0);
  	SwingUtils.addComponent (p, showXMLButton,  1, 1, 1, 1, NONE, WEST,  0.0, 0.0);
  	SwingUtils.addComponent (p, fromXMLButton,  2, 1, 1, 1, NONE, WEST,  0.0, 0.0);
-// 	SwingUtils.addComponent (p, unregisButton,  3, 1, 1, 1, NONE, NEAST, 0.0, 0.0);
+ 	SwingUtils.addComponent (p, unregisButton,  3, 1, 1, 1, NONE, NEAST, 0.0, 0.0);
 	return p;
     }
 
@@ -281,6 +282,7 @@
 			try {
 			    if (isNamespace)
 				namespace = registryModel.getNamespace (nodeObject.getValue());
+			    unregisButton.setEnabled( isNamespace );
 			} catch (MobyException e) {
 			    error (NAMESPACES_ACCESS_ERROR, e);
 			}
@@ -339,7 +341,6 @@
 
 		    // runs on the event-dispatching thread.
 		    public void finished() {
-		    	unregisButton.setEnabled( true );
 			if (exception != null)
 			    error ("An error occured when trying to unregister a namespace.\n\n",
 				   exception);




More information about the MOBY-guts mailing list