X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fws%2Fjws2%2FMsaWSClient.java;h=9ddc69a56f5f7dcca112b0e6ff9fb0584c21e00c;hb=057f733ab390518a3641f1dedebd36c028bf03d6;hp=278501f2200e67b35404845fc556a3a84317284a;hpb=cb5d856b1304448cae13a333cbd9017f81520d90;p=jalview.git diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 278501f..9ddc69a 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -1,19 +1,21 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.ws.jws2; @@ -99,10 +101,8 @@ public class MsaWSClient extends Jws2Client JOptionPane .showMessageDialog( Desktop.desktop, - "The Service called \n" - + sh.serviceType - + "\nis not a \nMultiple Sequence Alignment Service !", - "Internal Jalview Error", JOptionPane.WARNING_MESSAGE); + MessageManager.formatMessage("label.service_called_is_not_msa_service", new String[]{sh.serviceType}), + MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE); return; } @@ -110,9 +110,8 @@ public class MsaWSClient extends Jws2Client if ((wsInfo = setWebService(sh, false)) == null) { JOptionPane.showMessageDialog(Desktop.desktop, - "The Multiple Sequence Alignment Service named " - + sh.serviceType + " is unknown", - "Internal Jalview Error", JOptionPane.WARNING_MESSAGE); + MessageManager.formatMessage("label.msa_service_is_unknown", new String[]{sh.serviceType}), + MessageManager.getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE); return; } @@ -191,6 +190,11 @@ public class MsaWSClient extends Jws2Client public void attachWSMenuEntry(JMenu rmsawsmenu, final Jws2Instance service, final AlignFrame alignFrame) { + if (registerAAConWSInstance(rmsawsmenu, service, alignFrame)) + { + // Alignment dependent analysis calculation WS gui + return; + } setWebService(service, true); // headless boolean finished = true, submitGaps = false; JMenu msawsmenu = rmsawsmenu; @@ -213,15 +217,21 @@ public class MsaWSClient extends Jws2Client if (submitGaps == true) { action = "Realign "; - msawsmenu = new JMenu(MessageManager.formatMessage("label.realign_with_params", new String[]{svcname})); - msawsmenu - .setToolTipText(MessageManager.getString("label.align_sequences_to_existing_alignment")); + msawsmenu = new JMenu(MessageManager.formatMessage( + "label.realign_with_params", new String[] + { svcname })); + msawsmenu.setToolTipText(MessageManager + .getString("label.align_sequences_to_existing_alignment")); rmsawsmenu.add(msawsmenu); } final boolean withGaps = submitGaps; - JMenuItem method = new JMenuItem(MessageManager.formatMessage("label.calcname_with_default_settings", new String[]{calcName})); - method.setToolTipText(MessageManager.formatMessage("label.action_with_default_settings", new String[]{action})); + JMenuItem method = new JMenuItem(MessageManager.formatMessage( + "label.calcname_with_default_settings", new String[] + { calcName })); + method.setToolTipText(MessageManager.formatMessage( + "label.action_with_default_settings", new String[] + { action })); method.addActionListener(new ActionListener() { @@ -239,8 +249,10 @@ public class MsaWSClient extends Jws2Client { // only add these menu options if the service has user-modifiable // arguments - method = new JMenuItem(MessageManager.getString("label.edit_settings_and_run")); - method.setToolTipText(MessageManager.getString("label.view_and_change_parameters_before_alignment")); + method = new JMenuItem( + MessageManager.getString("label.edit_settings_and_run")); + method.setToolTipText(MessageManager + .getString("label.view_and_change_parameters_before_alignment")); method.addActionListener(new ActionListener() { @@ -257,16 +269,17 @@ public class MsaWSClient extends Jws2Client List presets = service.getParamStore().getPresets(); if (presets != null && presets.size() > 0) { - JMenu presetlist = new JMenu(MessageManager.formatMessage("label.run_with_preset_params", new String[]{calcName})); + JMenu presetlist = new JMenu(MessageManager.formatMessage( + "label.run_with_preset_params", new String[] + { calcName })); for (final WsParamSetI preset : presets) { final JMenuItem methodR = new JMenuItem(preset.getName()); - methodR.setToolTipText("

" - + JvSwingUtils.wrapTooltip("" - + (preset.isModifiable() ? "User Preset" - : "Service Preset") + "
" - + preset.getDescription() + "

") + ""); + methodR.setToolTipText(JvSwingUtils.wrapTooltip(true, "

" + + (preset.isModifiable() ? MessageManager.getString("label.user_preset") + : MessageManager.getString("label.service_preset")) + "
" + + preset.getDescription() + "

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