From f7d38a812a5d339f421590c5c78023a6832f98d3 Mon Sep 17 00:00:00 2001 From: jprocter Date: Sun, 11 Jul 2010 13:48:25 +0000 Subject: [PATCH] divide services by host within the menu --- src/jalview/ws/jws2/MsaWSClient.java | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 1ad4602..1d9a89c 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -208,10 +208,15 @@ public class MsaWSClient extends Jws2Client setWebService(service, true); // headless boolean finished = true, submitGaps = false; JMenu msawsmenu = rmsawsmenu; - String calcName = WebServiceName + " "; + String svcname = WebServiceName; + if (svcname.endsWith("WS")) + { + svcname = svcname.substring(0,svcname.length()-2); + } + String calcName = svcname + " "; if (canSubmitGaps()) { - msawsmenu = new JMenu(WebServiceName); + msawsmenu = new JMenu(svcname); rmsawsmenu.add(msawsmenu); calcName = ""; } @@ -220,12 +225,12 @@ public class MsaWSClient extends Jws2Client { if (submitGaps == true) { - msawsmenu = new JMenu("profile " + WebServiceName); + msawsmenu = new JMenu("profile " + svcname); rmsawsmenu.add(msawsmenu); } final boolean withGaps = submitGaps; JMenuItem method = new JMenuItem(calcName + "Defaults"); - method.setToolTipText(WsURL); + method.setToolTipText("Align with default settings"); method.addActionListener(new ActionListener() { @@ -239,8 +244,8 @@ public class MsaWSClient extends Jws2Client } }); msawsmenu.add(method); - method = new JMenuItem(calcName + " Edit Parameters..."); - method.setToolTipText(WsURL); + method = new JMenuItem(calcName + "Edit and run ..."); + method.setToolTipText("View and change the parameters before alignment."); method.addActionListener(new ActionListener() { @@ -262,7 +267,7 @@ public class MsaWSClient extends Jws2Client for (final Preset preset : (List) presets.getPresets()) { final JMenuItem methodR = new JMenuItem(preset.getName()); - methodR.setToolTipText(preset.getDescription()); + methodR.setToolTipText("

"+preset.getDescription()+"

"); methodR.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) -- 1.7.10.2