From e9dd79fe9d061dc449ede4d0150298f6621aed04 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 7 Sep 2010 12:09:49 +0000 Subject: [PATCH] debug warning / option dialog box display --- src/jalview/gui/WsJobParameters.java | 123 +++++++++++++++++++++++----------- 1 file changed, 83 insertions(+), 40 deletions(-) diff --git a/src/jalview/gui/WsJobParameters.java b/src/jalview/gui/WsJobParameters.java index 1d56b69..cf76f75 100644 --- a/src/jalview/gui/WsJobParameters.java +++ b/src/jalview/gui/WsJobParameters.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Vector; +import javax.swing.InputVerifier; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; @@ -169,8 +170,8 @@ public class WsJobParameters extends JPanel implements ItemListener, * @param service * @param preset */ - public WsJobParameters(JFrame parent, Jws2Instance service, WsParamSetI preset, - List jobArgset) + public WsJobParameters(JFrame parent, Jws2Instance service, + WsParamSetI preset, List jobArgset) { this(parent, null, service, preset, jobArgset); } @@ -397,7 +398,6 @@ public class WsJobParameters extends JPanel implements ItemListener, } } - private void _deleteUserPreset(String lastParmSet2) { paramStore.deletePreset(lastParmSet2); @@ -469,7 +469,8 @@ public class WsJobParameters extends JPanel implements ItemListener, { // instantiate the abstract proxy for Jaba objects jobArgset = jabajobArgset == null ? null : JabaParamStore .getJwsArgsfromJaba(jabajobArgset); - p = jabap; // (jabap != null) ? paramStore.getPreset(jabap.getName()) : null; + p = jabap; // (jabap != null) ? paramStore.getPreset(jabap.getName()) : + // null; } // TODO: Recover window geometry prefs for this service // jobPanel.setDividerLocation(proportionalLocation) @@ -712,7 +713,8 @@ public class WsJobParameters extends JPanel implements ItemListener, boolean stn = settingDialog; boolean renamed = false; settingDialog = true; - String nm = (String) setName.getSelectedItem(); + String nm = (curSetName != null ? curSetName : (String) setName + .getSelectedItem()); // check if the name is reserved - if it is, rename it. if (isServicePreset(nm)) { @@ -1020,15 +1022,19 @@ public class WsJobParameters extends JPanel implements ItemListener, { valueField.setText(valueField.getText().trim()); iVal = Integer.valueOf(valueField.getText()); - if (validator.getMin()!=null && validator.getMin().intValue()>iVal) + if (validator.getMin() != null + && validator.getMin().intValue() > iVal) { iVal = validator.getMin().intValue(); - // TODO: provide visual indication that hard limit was reached for this parameter + // TODO: provide visual indication that hard limit was reached for + // this parameter } - if (validator.getMax()!=null && validator.getMax().intValue()fVal) + if (validator.getMin() != null + && validator.getMin().floatValue() > fVal) { fVal = validator.getMin().floatValue(); - // TODO: provide visual indication that hard limit was reached for this parameter + // TODO: provide visual indication that hard limit was reached for + // this parameter } - if (validator.getMax()!=null && validator.getMax().floatValue()