*/
package jalview.ws;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
import java.util.*;
import javax.swing.*;
startJPredClient(title, seq, null);
}
+ public JPredClient()
+ {
+
+ super();
+ // add a class reference to the list
+ }
+
private void startJPredClient(String title, SequenceI[] msf,
AlignFrame parentFrame)
{
return server;
}
+
+ public void attachWSMenuEntry(JMenu wsmenu, final ServiceHandle sh, final AlignFrame af)
+ {
+ final JMenuItem method = new JMenuItem(sh.getName());
+ method.setToolTipText(sh.getEndpointURL());
+ method.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ AlignmentView msa = af.gatherSeqOrMsaForSecStrPrediction();
+ if (msa.getSequences().length == 1)
+ {
+ // Single Sequence prediction
+ new jalview.ws.JPredClient(sh, af.getTitle(), false, msa, af, true);
+ }
+ else
+ {
+ if (msa.getSequences().length > 1)
+ {
+ // Sequence profile based prediction
+ new jalview.ws.JPredClient(sh,
+ af.getTitle(), true, msa, af, true);
+ }
+ }
+ }
+ });
+ wsmenu.add(method);
+ }
}