[MOBY-guts] biomoby commit
Wendy Alexander
walexander at dev.open-bio.org
Tue May 27 16:06:14 UTC 2008
walexander
Tue May 27 12:06:14 EDT 2008
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard
In directory dev.open-bio.org:/tmp/cvs-serv10987
Modified Files:
SimpleClientPanel.java
Log Message:
Changed the way the label on the run button changes when the ping checkbox or the show input radio button is selected.
moby-live/Java/src/main/org/biomoby/service/dashboard SimpleClientPanel.java,1.11,1.12
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/SimpleClientPanel.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/SimpleClientPanel.java 2008/05/14 20:37:10 1.11
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/service/dashboard/SimpleClientPanel.java 2008/05/27 16:06:14 1.12
@@ -250,7 +250,23 @@
ButtonGroup group = new ButtonGroup();
JRadioButton htNone, htRegistry, htEndpoint, htLocal, htNewURL;
group.add (htEndpoint = createHowToButton ("Use service's usual endpoint", DP_CS_URL));
- group.add (htNone = createHowToButton ("No real call, just show/echo input", DP_CS_NONE));
+ htNone = createHowToButton ("No real call, just show/echo input", DP_CS_NONE);
+ htNone.addItemListener(
+ new ItemListener() {
+ public void itemStateChanged (ItemEvent e) {
+ boolean enabled = (e.getStateChange() == ItemEvent.SELECTED);
+ if (enabled) runButton.setText(" Show Input ");
+ else {
+ if (propertyChannel.getBoolean(DP_INP_PING, false)){
+ runButton.setText(" Ping Service ");
+ }
+ else {
+ runButton.setText(" Call Service ");
+ }
+ }
+ }
+ });
+ group.add (htNone);
group.add (htRegistry = createHowToButton ("Ask registry where service is, and call it", DP_CS_REGISTRY));
group.add (htNewURL = createHowToButton ("Use this endpoint", DP_CS_NEWURL));
group.add (htLocal = createHowToButton ("Use this local class", DP_CS_CLASS));
@@ -260,13 +276,9 @@
boolean usingPing = getPrefValue (DP_INP_PING, false);
boolean usingAsBytes = getPrefValue (DP_INP_ASBYTES, false);
String runLabel = " Call Service ";
- if (usingPing) {
- if (usingAsBytes) runLabel = " Ping and Show Input ";
- else runLabel = " Ping Service ";
- }
- else {
- if (usingAsBytes) runLabel = " Show Input ";
- }
+ if (propertyChannel.getString(DP_CALL_SERVICE).equals(DP_CS_NONE))
+ runLabel = " Show Input ";
+ else if (usingPing) runLabel = " Ping Service ";
runButton =
createButton (runLabel,
@@ -316,14 +328,16 @@
propertyChannel.put (DP_INP_PING,
new Boolean (enabled).toString());
if (enabled) {
- if (propertyChannel.getString(DP_INP_ASBYTES).toLowerCase().equals("true"))
- runButton.setText(" Ping and Show Input ");
- else runButton.setText(" Ping Service ");
+ if (propertyChannel.getString(DP_CALL_SERVICE).equals(DP_CS_NONE))
+ runButton.setText(" Show Input ");
+ else
+ runButton.setText(" Ping Service ");
}
else {
- if (propertyChannel.getString(DP_INP_ASBYTES).toLowerCase().equals("true"))
+ if (propertyChannel.getString(DP_CALL_SERVICE).equals(DP_CS_NONE))
runButton.setText(" Show Input ");
- else runButton.setText(" Call Service ");
+ else
+ runButton.setText(" Call Service ");
}
}
});
@@ -343,17 +357,6 @@
setPrefValue (DP_INP_ASBYTES, enabled);
propertyChannel.put (DP_INP_ASBYTES,
new Boolean (enabled).toString());
- if (enabled) {
- if (propertyChannel.getString(DP_INP_PING).toLowerCase().equals("true"))
- runButton.setText(" Ping and Show Input ");
- else runButton.setText(" Show Input ");
- }
- else {
- if (propertyChannel.getString(DP_INP_PING).toLowerCase().equals("true"))
- runButton.setText(" Ping Service ");
- else runButton.setText(" Call Service ");
- }
-
}
});
setPropertySelect (usingAsBytes, DP_INP_ASBYTES);
More information about the MOBY-guts
mailing list