[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu Apr 12 01:03:15 UTC 2007


gordonp
Wed Apr 11 21:03:14 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui
In directory dev.open-bio.org:/tmp/cvs-serv30766/src/main/ca/ucalgary/seahawk/gui

Modified Files:
	MobySecondaryInputGUI.java 
Log Message:
Fixed boolean param parsing
moby-live/Java/src/main/ca/ucalgary/seahawk/gui MobySecondaryInputGUI.java,1.4,1.5
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySecondaryInputGUI.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/MobySecondaryInputGUI.java	2007/04/03 02:33:57	1.4
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/seahawk/gui/MobySecondaryInputGUI.java	2007/04/12 01:03:14	1.5
@@ -246,8 +246,10 @@
 	widget.add(makeJLabel(msdi));
 	JCheckBox checkbox = new JCheckBox();
 	checkbox.setSelected(defaultValue.toLowerCase().equals("true") || 
+			     defaultValue.toLowerCase().equals("yes") || 
 			     defaultValue.equals("1") || 
-			     defaultValue.equals("T"));  
+			     defaultValue.equals("T") || 
+			     defaultValue.equals("Y"));  
 	data2widget.put(msdi, checkbox);
 	widget.add(checkbox);
 
@@ -463,10 +465,13 @@
 		    newValue = ((JTextComponent) widget).getText();
 		    msdi.setValue(newValue.toString());
 		}
+		else if(widget instanceof JCheckBox){
+		    msdi.setValue(""+((JCheckBox) widget).isSelected());
+		}
 		else{
 		    logger.error("IllegalArgumentException: GUI Component for " + msdi.getName() + 
 				" was neither a JComboBox nor a " +
-				"JTextComponent as expected");
+				"JTextComponent nor a JCheckBox as expected");
 		    throw new IllegalArgumentException();
 		}
 	    }




More information about the MOBY-guts mailing list