X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FMsaWSClient.java;h=8a352bf052c5fb9f9272ef5a7ec32ae35ac49b06;hb=a9514dd266ef856c485fd8f9108a3797b87add3f;hp=f3c385aef406f9ca198612b59d042b1f2dbd8a3f;hpb=153dd62dc91da13ae732600e6ea55ddbe15eab39;p=jalview.git diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index f3c385a..8a352bf 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -50,7 +50,7 @@ public class MsaWSClient extends Jws2Client AlignFrame alignFrame; - private Preset preset; + private WsParamSetI preset; private List paramset; @@ -112,10 +112,11 @@ public class MsaWSClient extends Jws2Client return; } server = sh.service; + this.preset=preset; if (preset != null) { - if (preset instanceof JabaPreset) - { + if (!((preset instanceof JabaPreset) || preset instanceof JabaWsParamSet)) { + /*{ this.preset = ((JabaPreset) preset).p; } else if (preset instanceof JabaWsParamSet) @@ -137,7 +138,7 @@ public class MsaWSClient extends Jws2Client paramset = newargs; } else - { + {*/ throw new Error( "Implementation error: Can only instantiate Jaba parameter sets."); } @@ -167,7 +168,7 @@ public class MsaWSClient extends Jws2Client } else { - this.preset = ((JabaPreset) prset).p; + this.preset = prset; // ((JabaPreset) prset).p; paramset = null; // no user supplied parameters. } } @@ -274,18 +275,19 @@ public class MsaWSClient extends Jws2Client boolean hasparams = service.hasParameters(); do { - String action="Align "; + String action = "Align "; if (submitGaps == true) { - action="Realign "; + action = "Realign "; msawsmenu = new JMenu("Realign with " + svcname); - msawsmenu.setToolTipText("Align sequences to an existing alignment"); + msawsmenu + .setToolTipText("Align sequences to an existing alignment"); rmsawsmenu.add(msawsmenu); } final boolean withGaps = submitGaps; - JMenuItem method = new JMenuItem(calcName + "Defaults"); - method.setToolTipText(action+"with default settings"); + JMenuItem method = new JMenuItem(calcName + "with Defaults"); + method.setToolTipText(action + "with default settings"); method.addActionListener(new ActionListener() { @@ -301,8 +303,9 @@ public class MsaWSClient extends Jws2Client msawsmenu.add(method); if (hasparams) { - // only add these menu options if the service has user-modifiable arguments - method = new JMenuItem(calcName + "Edit and run ..."); + // only add these menu options if the service has user-modifiable + // arguments + method = new JMenuItem("Edit settings and run ..."); method.setToolTipText("View and change the parameters before alignment."); method.addActionListener(new ActionListener() @@ -320,7 +323,7 @@ public class MsaWSClient extends Jws2Client List presets = service.getParamStore().getPresets(); if (presets != null && presets.size() > 0) { - JMenu presetlist = new JMenu(calcName + "Presets"); + JMenu presetlist = new JMenu("Run "+calcName + "with preset"); for (final WsParamSetI preset : presets) {