X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FMsaWSClient.java;h=c83ef0fd26a3f8a505481338c5f4eb7d9e7d79a7;hb=8dfdafee89d06dd397c392619b4b285f0dc35430;hp=5fe3e74e2c59f99dd0b6369ebb957e484d8db0fb;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/ws/jws2/MsaWSClient.java b/src/jalview/ws/jws2/MsaWSClient.java index 5fe3e74..c83ef0f 100644 --- a/src/jalview/ws/jws2/MsaWSClient.java +++ b/src/jalview/ws/jws2/MsaWSClient.java @@ -109,8 +109,7 @@ public class MsaWSClient extends Jws2Client // redundant at mo - but may change JOptionPane.showMessageDialog(Desktop.desktop, MessageManager .formatMessage("label.service_called_is_not_msa_service", - new String[] - { sh.serviceType }), MessageManager + new String[] { sh.serviceType }), MessageManager .getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE); @@ -120,8 +119,8 @@ public class MsaWSClient extends Jws2Client if ((wsInfo = setWebService(sh, false)) == null) { JOptionPane.showMessageDialog(Desktop.desktop, MessageManager - .formatMessage("label.msa_service_is_unknown", new String[] - { sh.serviceType }), MessageManager + .formatMessage("label.msa_service_is_unknown", + new String[] { sh.serviceType }), MessageManager .getString("label.internal_jalview_error"), JOptionPane.WARNING_MESSAGE); @@ -130,7 +129,6 @@ public class MsaWSClient extends Jws2Client startMsaWSClient(altitle, msa, submitGaps, preserveOrder, seqdataset); - } public MsaWSClient() @@ -195,8 +193,6 @@ public class MsaWSClient extends Jws2Client System.out.println("A".matches("(-*[a-zA-Z]-*){1}[a-zA-Z-]*")); } - - protected String getServiceActionKey() { return "MsaWS"; @@ -220,6 +216,7 @@ public class MsaWSClient extends Jws2Client return (WebServiceName.indexOf("lustal") > -1); // cheat! } + @Override public void attachWSMenuEntry(JMenu rmsawsmenu, final Jws2Instance service, final AlignFrame alignFrame) { @@ -251,8 +248,7 @@ public class MsaWSClient extends Jws2Client { action = "Realign "; msawsmenu = new JMenu(MessageManager.formatMessage( - "label.realign_with_params", new String[] - { svcname })); + "label.realign_with_params", new String[] { svcname })); msawsmenu.setToolTipText(MessageManager .getString("label.align_sequences_to_existing_alignment")); rmsawsmenu.add(msawsmenu); @@ -260,23 +256,24 @@ public class MsaWSClient extends Jws2Client 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 })); + "label.calcname_with_default_settings", + new String[] { calcName })); + method.setToolTipText(MessageManager + .formatMessage("label.action_with_default_settings", + new String[] { action })); method.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { AlignmentView msa = alignFrame.gatherSequencesForAlignment(); if (msa != null) { - new MsaWSClient(service, alignFrame.getTitle(), msa, withGaps, - true, alignFrame.getViewport().getAlignment() - .getDataset(), alignFrame); + new MsaWSClient(service, alignFrame.getTitle(), msa, withGaps, + true, alignFrame.getViewport().getAlignment() + .getDataset(), alignFrame); } } @@ -293,14 +290,16 @@ public class MsaWSClient extends Jws2Client method.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { AlignmentView msa = alignFrame.gatherSequencesForAlignment(); if (msa != null) { new MsaWSClient(service, null, null, true, alignFrame - .getTitle(), msa, withGaps, true, alignFrame - .getViewport().getAlignment().getDataset(), alignFrame); + .getTitle(), msa, withGaps, true, alignFrame + .getViewport().getAlignment().getDataset(), + alignFrame); } } @@ -309,9 +308,10 @@ 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 })); final int showToolTipFor = ToolTipManager.sharedInstance() .getDismissDelay(); @@ -333,21 +333,24 @@ public class MsaWSClient extends Jws2Client @Override public void mouseExited(MouseEvent e) { - ToolTipManager.sharedInstance().setDismissDelay(showToolTipFor); + ToolTipManager.sharedInstance().setDismissDelay( + showToolTipFor); } }); - methodR.setToolTipText(JvSwingUtils.wrapTooltip( + String tooltip = JvSwingUtils.wrapTooltip( true, - "

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

")); + + "
" + + preset.getDescription()); + methodR.setToolTipText(tooltip); methodR.addActionListener(new ActionListener() { + @Override public void actionPerformed(ActionEvent e) { AlignmentView msa = alignFrame @@ -356,9 +359,9 @@ public class MsaWSClient extends Jws2Client if (msa != null) { MsaWSClient msac = new MsaWSClient(service, preset, - alignFrame.getTitle(), - msa, false, true, alignFrame.getViewport() - .getAlignment().getDataset(), alignFrame); + alignFrame.getTitle(), msa, false, true, + alignFrame.getViewport().getAlignment() + .getDataset(), alignFrame); } }