Merge branch 'develop' into features/JAL-892varnaToProject
[jalview.git] / src / jalview / appletgui / CutAndPasteTransfer.java
index bb2fa12..535dc62 100644 (file)
  */
 package jalview.appletgui;
 
-import java.awt.BorderLayout;
-import java.awt.Button;
-import java.awt.Dialog;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.Label;
-import java.awt.Panel;
-import java.awt.TextArea;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
-
 import jalview.analysis.AlignmentUtils;
 import jalview.api.ComplexAlignFile;
 import jalview.bin.JalviewLite;
-import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
 import jalview.datamodel.PDBEntry;
@@ -51,6 +37,19 @@ import jalview.schemes.ColourSchemeI;
 import jalview.schemes.TCoffeeColourScheme;
 import jalview.util.MessageManager;
 
+import java.awt.BorderLayout;
+import java.awt.Button;
+import java.awt.Dialog;
+import java.awt.Font;
+import java.awt.Frame;
+import java.awt.Label;
+import java.awt.Panel;
+import java.awt.TextArea;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+
 public class CutAndPasteTransfer extends Panel implements ActionListener,
         MouseListener
 {
@@ -221,11 +220,11 @@ public class CutAndPasteTransfer extends Panel implements ActionListener,
   protected void loadAlignment(String text, boolean newWindow,
           AlignViewport viewport)
   {
-    Alignment al = null;
+    AlignmentI al = null;
 
     String format = new IdentifyFile().Identify(text,
             AppletFormatAdapter.PASTE);
-    AppletFormatAdapter afa = new AppletFormatAdapter(viewport);
+    AppletFormatAdapter afa = new AppletFormatAdapter(alignFrame.alignPanel);
     try
     {
       al = afa.readFile(text, AppletFormatAdapter.PASTE, format);
@@ -294,7 +293,7 @@ public class CutAndPasteTransfer extends Panel implements ActionListener,
    * @param al
    * @return
    */
-  protected boolean openSplitFrame(Alignment al, String format)
+  protected boolean openSplitFrame(AlignmentI al, String format)
   {
     final AlignmentI thisAlignment = this.alignFrame.getAlignViewport().getAlignment();
     if (thisAlignment.isNucleotide() == al.isNucleotide())