JAL-2349 JAL-4027 JAL-3855 quick hack to add contact matrices accompanying alignment...
authorJim Procter <j.procter@dundee.ac.uk>
Fri, 10 Jun 2022 11:57:43 +0000 (12:57 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Fri, 10 Jun 2022 11:57:43 +0000 (12:57 +0100)
src/jalview/gui/AlignViewport.java

index 30ccdbe..c61fe34 100644 (file)
  */
 package jalview.gui;
 
+import java.awt.Container;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.FontMetrics;
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import javax.swing.JInternalFrame;
+
 import jalview.analysis.AlignmentUtils;
 import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
 import jalview.api.AlignViewportI;
@@ -35,6 +46,7 @@ import jalview.datamodel.AlignedCodonFrame;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.ContactMatrixI;
 import jalview.datamodel.HiddenColumns;
 import jalview.datamodel.SearchResults;
 import jalview.datamodel.SearchResultsI;
@@ -53,17 +65,6 @@ import jalview.util.MessageManager;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.ws.params.AutoCalcSetting;
 
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.FontMetrics;
-import java.awt.Rectangle;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-
-import javax.swing.JInternalFrame;
-
 /**
  * DOCUMENT ME!
  * 
@@ -719,7 +720,10 @@ public class AlignViewport extends AlignmentViewport
         al.addSequence(seq);
       }
     }
-
+    for (ContactMatrixI cm : toAdd.getContactMaps())
+    {
+      al.addContactList(cm);
+    }
     ranges.setEndSeq(getAlignment().getHeight() - 1); // BH 2019.04.18
     firePropertyChange("alignment", null, getAlignment().getSequences());
   }