action.boxes = Boxes\r
action.text = Text\r
action.by_pairwise_id = by Pairwise Identity\r
+action.by_length = by Length\r
action.by_id = by Id\r
+ action.by_length = by Length\r
action.by_group = by Group\r
action.remove = Remove\r
-action.remove_redundancy = Remove Redundancy\r
+action.remove_redundancy = Remove Redundancy...\r
action.pairwise_alignment = Pairwise Alignments...\r
action.by_rna_helixes = by RNA Helices\r
action.user_defined = User Defined...\r
*/
package jalview.datamodel;
+ import jalview.util.MessageManager;
+
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+import java.util.Vector;
/**
* Data structure to hold and manipulate a multiple sequence alignment
{
if (progressBarHandlers == null || !progressBars.contains(new Long(id)))
{
- throw new Error(
- "call setProgressBar before registering the progress bar's handler.");
+ throw new Error(MessageManager.getString("error.call_setprogressbar_before_registering_handler"));
}
progressBarHandlers.put(new Long(id), handler);
- final JPanel progressPanel = (JPanel) progressBars.get(new Long(id));
+ final JPanel progressPanel = progressBars.get(new Long(id));
if (handler.canCancel())
{
JButton cancel = new JButton(
*/
package jalview.gui;
import jalview.analysis.AlignmentSorter;
import jalview.bin.Cache;
import jalview.commands.OrderCommand;
--import jalview.datamodel.*;
--import jalview.io.*;
++import jalview.datamodel.AlignmentI;
++import jalview.datamodel.SequenceFeature;
++import jalview.datamodel.SequenceGroup;
++import jalview.datamodel.SequenceI;
++import jalview.io.JalviewFileChooser;
import jalview.schemes.AnnotationColourGradient;
import jalview.schemes.GraduatedColor;
import jalview.util.MessageManager;
import jalview.ws.dbsources.das.api.jalviewSourceI;
++import java.awt.BorderLayout;
++import java.awt.Color;
++import java.awt.Component;
++import java.awt.Font;
++import java.awt.Graphics;
++import java.awt.GridLayout;
++import java.awt.Rectangle;
++import java.awt.event.ActionEvent;
++import java.awt.event.ActionListener;
++import java.awt.event.ItemEvent;
++import java.awt.event.ItemListener;
++import java.awt.event.MouseAdapter;
++import java.awt.event.MouseEvent;
++import java.awt.event.MouseMotionAdapter;
++import java.beans.PropertyChangeEvent;
++import java.beans.PropertyChangeListener;
++import java.io.File;
++import java.io.FileInputStream;
++import java.io.FileOutputStream;
++import java.io.InputStreamReader;
++import java.io.OutputStreamWriter;
++import java.io.PrintWriter;
++import java.util.ArrayList;
++import java.util.Hashtable;
++import java.util.Iterator;
++import java.util.List;
++import java.util.Vector;
++
++import javax.swing.AbstractCellEditor;
++import javax.swing.BorderFactory;
++import javax.swing.Icon;
++import javax.swing.JButton;
++import javax.swing.JCheckBox;
++import javax.swing.JCheckBoxMenuItem;
++import javax.swing.JColorChooser;
++import javax.swing.JDialog;
++import javax.swing.JInternalFrame;
++import javax.swing.JLabel;
++import javax.swing.JLayeredPane;
++import javax.swing.JMenuItem;
++import javax.swing.JOptionPane;
++import javax.swing.JPanel;
++import javax.swing.JPopupMenu;
++import javax.swing.JScrollPane;
++import javax.swing.JSlider;
++import javax.swing.JTabbedPane;
++import javax.swing.JTable;
++import javax.swing.ListSelectionModel;
++import javax.swing.SwingConstants;
++import javax.swing.SwingUtilities;
++import javax.swing.event.ChangeEvent;
++import javax.swing.event.ChangeListener;
++import javax.swing.table.AbstractTableModel;
++import javax.swing.table.TableCellEditor;
++import javax.swing.table.TableCellRenderer;
++
public class FeatureSettings extends JPanel
{
DasSourceBrowser dassourceBrowser;
(String) table.getValueAt(selectedRow, 0));
}
}
++
++ // isPopupTrigger fires on mouseReleased on Mac
++ @Override
++ public void mouseReleased(MouseEvent evt)
++ {
++ selectedRow = table.rowAtPoint(evt.getPoint());
++ if (evt.isPopupTrigger())
++ {
++ popupSort(selectedRow, (String) table.getValueAt(selectedRow, 0),
++ table.getValueAt(selectedRow, 1), fr.minmax, evt.getX(),
++ evt.getY());
++ }
++ }
});
table.addMouseMotionListener(new MouseMotionAdapter()
file), "UTF-8");
jalview.schemabinding.version2.JalviewUserColours jucs = new jalview.schemabinding.version2.JalviewUserColours();
-- jucs = (jalview.schemabinding.version2.JalviewUserColours) jucs
++ jucs = jucs
.unmarshal(in);
for (int i = jucs.getColourCount() - 1; i >= 0; i--)
{
public void stateChanged(ChangeEvent evt)
{
-- fr.setTransparency((float) (100 - transparency.getValue()) / 100f);
++ fr.setTransparency((100 - transparency.getValue()) / 100f);
af.alignPanel.paintAlignment(true);
}
});
*/
package jalview.gui;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.List;
-import java.util.Vector;
-
-import javax.swing.*;
-
-import jalview.datamodel.*;
+import jalview.datamodel.Sequence;
+import jalview.datamodel.SequenceFeature;
+import jalview.datamodel.SequenceGroup;
+import jalview.datamodel.SequenceI;
import jalview.io.SequenceAnnotationReport;
+ import jalview.util.MessageManager;
import jalview.util.UrlLink;
+import java.awt.BorderLayout;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseMotionListener;
+import java.awt.event.MouseWheelEvent;
+import java.awt.event.MouseWheelListener;
+import java.util.List;
+import java.util.Vector;
+
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+import javax.swing.ToolTipManager;
+
/**
- * DOCUMENT ME!
+ * This panel hosts alignment sequence ids and responds to mouse clicks on them,
+ * as well as highlighting ids matched by a search from the Find menu.
*
* @author $author$
* @version $Revision$
JOptionPane
.showInternalMessageDialog(
Desktop.desktop,
- "Unixers: Couldn't find default web browser."
- + "\nAdd the full path to your browser in Preferences.",
- "Web browser not found", JOptionPane.WARNING_MESSAGE);
+ MessageManager.getString("label.web_browser_not_found_unix"),
+ MessageManager.getString("label.web_browser_not_found"), JOptionPane.WARNING_MESSAGE);
ex.printStackTrace();
}
-
}
/**
--- /dev/null
+ package jalview.ws.jabaws;
+
+ import static org.junit.Assert.assertEquals;
+ import static org.junit.Assert.fail;
+
+ import java.util.ArrayList;
+ import java.util.List;
-import java.util.function.Consumer;
+
+ import org.junit.Test;
+
+ import compbio.data.msa.MsaWS;
+ import compbio.data.msa.RegistryWS;
+ import compbio.data.sequence.FastaSequence;
+ import compbio.metadata.JobStatus;
+ import compbio.ws.client.Jws2Client;
+ import compbio.ws.client.Services;
+
+ public class MinJabawsClientTests {
+
+ /**
+ * simple test for the benefit of JAL-1338
+ * @throws Exception
+ */
+ @SuppressWarnings("rawtypes")
+ @Test
+ public void msaTest() throws Exception {
+ String url;
+ RegistryWS registry = Jws2Client
+ .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws");
+ if (registry != null) {
+
+ MsaWS msaservice = null;
+ for (Services service : registry.getSupportedServices()) {
+ if (service.equals(Services.ClustalOWS)) {
+ msaservice = (MsaWS) Jws2Client.connect(url, service);
+ if (msaservice != null) {
+ break;
+ }
+ }
+ }
+ if (msaservice == null) {
+ fail("couldn't find a clustalO service on the public registry");
+ }
+ FastaSequence fsq = new FastaSequence("seqA",
+ "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE");
+ List<FastaSequence> iseqs = new ArrayList<FastaSequence>();
+ for (int i = 0; i < 9; i++) {
+ iseqs.add(new FastaSequence(fsq.getId() + i, fsq.getSequence()
+ + fsq.getSequence().substring(i + 3, i + 3 + i)));
+ }
+
+ String jobid = msaservice.align(iseqs);
- if (jobid != null) {
- JobStatus js = null;
- do {
- try {
- Thread.sleep(500);
- } catch (InterruptedException q) {
- }
- ;
- js = msaservice.getJobStatus(jobid);
- } while (!js.equals(JobStatus.FAILED)
- && !js.equals(JobStatus.CANCELLED)
- && !js.equals(JobStatus.FINISHED));
- assertEquals("Trial alignment failed. State was " + js.name(),
- js, JobStatus.FINISHED);
- assertEquals(
- "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
- msaservice.getResult(jobid).getSequences().size(),
- iseqs.size());
- msaservice.getResult(jobid).getSequences()
- .forEach(new Consumer<FastaSequence>() {
- @Override
- public void accept(FastaSequence t) {
- System.out.println(">"+t.getId());
- System.out.println(t.getFormattedFasta());
- }
- });
++ if (jobid != null)
++ {
++ JobStatus js = null;
++ do
++ {
++ try
++ {
++ Thread.sleep(500);
++ } catch (InterruptedException q)
++ {
++ }
++ ;
++ js = msaservice.getJobStatus(jobid);
++ } while (!js.equals(JobStatus.FAILED)
++ && !js.equals(JobStatus.CANCELLED)
++ && !js.equals(JobStatus.FINISHED));
++ assertEquals("Trial alignment failed. State was " + js.name(), js,
++ JobStatus.FINISHED);
++ assertEquals(
++ "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
++ msaservice.getResult(jobid).getSequences().size(),
++ iseqs.size());
++ for (FastaSequence t : msaservice.getResult(jobid).getSequences())
++ {
++ System.out.println(">" + t.getId());
++ System.out.println(t.getFormattedFasta());
++ }
++ // .forEach(new Consumer<FastaSequence>() {
++ // @Override
++ // public void accept(FastaSequence t) {
++ // System.out.println(">"+t.getId());
++ // System.out.println(t.getFormattedFasta());
++ // }
++ // });
+ }
+
+ }
+ }
+ }