From 091a66f3290c61a5c4b07358205f8757abd30cc3 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Fri, 10 Jun 2022 12:57:43 +0100 Subject: [PATCH] JAL-2349 JAL-4027 JAL-3855 quick hack to add contact matrices accompanying alignment objects via sequence fetcher or imported from other sources --- src/jalview/gui/AlignViewport.java | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 30ccdbe..c61fe34 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -20,6 +20,17 @@ */ 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()); } -- 1.7.10.2