git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3187 'on top' optional for complementary features
[jalview.git]
/
src
/
jalview
/
ws
/
jws1
/
MsaWSClient.java
diff --git
a/src/jalview/ws/jws1/MsaWSClient.java
b/src/jalview/ws/jws1/MsaWSClient.java
index
7285639
..
4a09625
100644
(file)
--- a/
src/jalview/ws/jws1/MsaWSClient.java
+++ b/
src/jalview/ws/jws1/MsaWSClient.java
@@
-1,6
+1,6
@@
/*
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
*
* This file is part of Jalview.
*
@@
-20,14
+20,23
@@
*/
package jalview.ws.jws1;
*/
package jalview.ws.jws1;
+import jalview.datamodel.AlignmentI;
+import jalview.datamodel.AlignmentView;
+import jalview.gui.AlignFrame;
+import jalview.gui.Desktop;
+import jalview.gui.JvOptionPane;
+import jalview.gui.WebserviceInfo;
+import jalview.util.MessageManager;
+
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import javax.swing.*;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
-import ext.vamsas.*;
-import jalview.datamodel.*;
-import jalview.gui.*;
+import ext.vamsas.MuscleWSServiceLocator;
+import ext.vamsas.MuscleWSSoapBindingStub;
+import ext.vamsas.ServiceHandle;
/**
* DOCUMENT ME!
/**
* DOCUMENT ME!
@@
-62,31
+71,31
@@
public class MsaWSClient extends WS1Client
public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle,
jalview.datamodel.AlignmentView msa, boolean submitGaps,
public MsaWSClient(ext.vamsas.ServiceHandle sh, String altitle,
jalview.datamodel.AlignmentView msa, boolean submitGaps,
- boolean preserveOrder, Alignment seqdataset,
+ boolean preserveOrder, AlignmentI seqdataset,
AlignFrame _alignFrame)
{
super();
alignFrame = _alignFrame;
if (!sh.getAbstractName().equals("MsaWS"))
{
AlignFrame _alignFrame)
{
super();
alignFrame = _alignFrame;
if (!sh.getAbstractName().equals("MsaWS"))
{
- JOptionPane
- .showMessageDialog(
- Desktop.desktop,
- "The Service called \n"
- + sh.getName()
- + "\nis not a \nMultiple Sequence Alignment Service !",
- "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+ JvOptionPane.showMessageDialog(Desktop.desktop,
+ MessageManager.formatMessage(
+ "label.service_called_is_not_msa_service",
+ new String[]
+ { sh.getName() }),
+ MessageManager.getString("label.internal_jalview_error"),
+ JvOptionPane.WARNING_MESSAGE);
return;
}
if ((wsInfo = setWebService(sh)) == null)
{
return;
}
if ((wsInfo = setWebService(sh)) == null)
{
- JOptionPane.showMessageDialog(
- Desktop.desktop,
- "The Multiple Sequence Alignment Service named "
- + sh.getName() + " is unknown",
- "Internal Jalview Error", JOptionPane.WARNING_MESSAGE);
+ JvOptionPane.showMessageDialog(Desktop.desktop, MessageManager
+ .formatMessage("label.msa_service_is_unknown", new String[]
+ { sh.getName() }),
+ MessageManager.getString("label.internal_jalview_error"),
+ JvOptionPane.WARNING_MESSAGE);
return;
}
return;
}
@@
-101,7
+110,7
@@
public class MsaWSClient extends WS1Client
}
private void startMsaWSClient(String altitle, AlignmentView msa,
}
private void startMsaWSClient(String altitle, AlignmentView msa,
- boolean submitGaps, boolean preserveOrder, Alignment seqdataset)
+ boolean submitGaps, boolean preserveOrder, AlignmentI seqdataset)
{
if (!locateWebService())
{
{
if (!locateWebService())
{
@@
-113,9
+122,8
@@
public class MsaWSClient extends WS1Client
String jobtitle = WebServiceName.toLowerCase();
if (jobtitle.endsWith("alignment"))
{
String jobtitle = WebServiceName.toLowerCase();
if (jobtitle.endsWith("alignment"))
{
- if (submitGaps
- && (!jobtitle.endsWith("realignment") || jobtitle
- .indexOf("profile") == -1))
+ if (submitGaps && (!jobtitle.endsWith("realignment")
+ || jobtitle.indexOf("profile") == -1))
{
int pos = jobtitle.indexOf("alignment");
jobtitle = WebServiceName.substring(0, pos) + "re-alignment of "
{
int pos = jobtitle.indexOf("alignment");
jobtitle = WebServiceName.substring(0, pos) + "re-alignment of "
@@
-151,7
+159,7
@@
public class MsaWSClient extends WS1Client
try
{
try
{
- this.server = (MuscleWS) loc.getMuscleWS(new java.net.URL(WsURL));
+ this.server = loc.getMuscleWS(new java.net.URL(WsURL));
((MuscleWSSoapBindingStub) this.server).setTimeout(60000); // One minute
// timeout
} catch (Exception ex)
((MuscleWSSoapBindingStub) this.server).setTimeout(60000); // One minute
// timeout
} catch (Exception ex)
@@
-193,6
+201,7
@@
public class MsaWSClient extends WS1Client
return (WebServiceName.indexOf("lustal") > -1); // cheat!
}
return (WebServiceName.indexOf("lustal") > -1); // cheat!
}
+ @Override
public void attachWSMenuEntry(JMenu msawsmenu,
final ServiceHandle serviceHandle, final AlignFrame alignFrame)
{
public void attachWSMenuEntry(JMenu msawsmenu,
final ServiceHandle serviceHandle, final AlignFrame alignFrame)
{
@@
-201,12
+210,14
@@
public class MsaWSClient extends WS1Client
method.setToolTipText(WsURL);
method.addActionListener(new ActionListener()
{
method.setToolTipText(WsURL);
method.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame.gatherSequencesForAlignment();
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame.gatherSequencesForAlignment();
- new jalview.ws.jws1.MsaWSClient(serviceHandle, alignFrame
- .getTitle(), msa, false, true, alignFrame.getViewport()
- .getAlignment().getDataset(), alignFrame);
+ new jalview.ws.jws1.MsaWSClient(serviceHandle,
+ alignFrame.getTitle(), msa, false, true,
+ alignFrame.getViewport().getAlignment().getDataset(),
+ alignFrame);
}
}
@@
-215,17
+226,19
@@
public class MsaWSClient extends WS1Client
if (canSubmitGaps())
{
// We know that ClustalWS can accept partial alignments for refinement.
if (canSubmitGaps())
{
// We know that ClustalWS can accept partial alignments for refinement.
- final JMenuItem methodR = new JMenuItem(serviceHandle.getName()
- + " Realign");
+ final JMenuItem methodR = new JMenuItem(
+ serviceHandle.getName() + " Realign");
methodR.setToolTipText(WsURL);
methodR.addActionListener(new ActionListener()
{
methodR.setToolTipText(WsURL);
methodR.addActionListener(new ActionListener()
{
+ @Override
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame.gatherSequencesForAlignment();
public void actionPerformed(ActionEvent e)
{
AlignmentView msa = alignFrame.gatherSequencesForAlignment();
- new jalview.ws.jws1.MsaWSClient(serviceHandle, alignFrame
- .getTitle(), msa, true, true, alignFrame.getViewport()
- .getAlignment().getDataset(), alignFrame);
+ new jalview.ws.jws1.MsaWSClient(serviceHandle,
+ alignFrame.getTitle(), msa, true, true,
+ alignFrame.getViewport().getAlignment().getDataset(),
+ alignFrame);
}
}