import java.awt.dnd.*;\r
import org.biojava.dasobert.eventmodel.*;\r
\r
-\r
/**\r
* DOCUMENT ME!\r
*\r
new AnnotationExporter().exportFeatures(alignPanel);\r
}\r
\r
+\r
public void exportAnnotations_actionPerformed(ActionEvent e)\r
{\r
new AnnotationExporter().exportAnnotations(\r
String format = new IdentifyFile().Identify(str, "Paste");\r
SequenceI[] sequences;\r
\r
+\r
if(Desktop.jalviewClipboard!=null)\r
{\r
// The clipboard was filled from within Jalview, we must use the sequences\r
\r
if (newAlignment)\r
{\r
+ System.out.println(format +" 2");\r
alignment = new Alignment(sequences);\r
\r
if(Desktop.jalviewClipboard!=null)\r
alignment.setDataset( (Alignment)Desktop.jalviewClipboard[1] );\r
else\r
alignment.setDataset( null );\r
+\r
}\r
else\r
{\r
+ System.out.println(format +" 24");\r
alignment = viewport.getAlignment();\r
\r
//!newAlignment\r
for (int i = 0; i < sequences.length; i++)\r
{\r
-\r
Sequence newseq = new Sequence(sequences[i].getName(),\r
sequences[i].getSequence(), sequences[i].getStart(),\r
sequences[i].getEnd());\r
\r
alignment.addSequence(newseq);\r
}\r
+\r
+\r
viewport.setEndSeq(alignment.getHeight());\r
alignment.getWidth();\r
viewport.firePropertyChange("alignment", null, alignment.getSequences());\r
}\r
\r
+\r
+\r
+\r
+\r
// Add any annotations attached to sequences\r
for (int i = 0; i < sequences.length; i++)\r
{\r
{\r
viewport.hideSequence(seqs[i]);\r
}\r
- repaint();\r
+ alignPanel.repaint();\r
}\r
\r
public void hideSelColumns_actionPerformed(ActionEvent e)\r
AppletFormatAdapter.FILE);\r
if (!isGroupsFile)\r
{\r
- String protocol = "File";\r
- String format = new IdentifyFile().Identify(file, protocol);\r
- SequenceI[] sequences = new FormatAdapter().readFile(file, protocol,\r
- format);\r
-\r
- FastaFile ff = new FastaFile();\r
- Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();\r
- c.setContents(new StringSelection(ff.print(sequences)), Desktop.instance);\r
-\r
- this.paste(false);\r
+ String format = new IdentifyFile().Identify(file, FormatAdapter.FILE);\r
+ new FileLoader().LoadFile(viewport, file, FormatAdapter.FILE, format);\r
}\r
}\r
else\r