X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationLabels.java;h=d781ebb30a4a997e256d4ef55f9580340dfe9d15;hb=cc3341f9d1465b0226d184be4216d022a62e5cee;hp=c01a6f3d3aa35108b41bc60a16c5d5193f995fcd;hpb=c2e6335a319d61b641fb6fcbb0a4a5dc88a58014;p=jalview.git diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index c01a6f3..d781ebb 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -428,9 +428,9 @@ public class AnnotationLabels extends JPanel { final PAEContactMatrix cm = (PAEContactMatrix) av .getContactMatrix(aa[selectedRow]); - if (cm.getNewickString()!=null && cm.getNewickString().length()>0) + if (cm!=null && cm.hasTree()) { - item = new JMenuItem("Show Matrix"); + item = new JMenuItem("Show Tree for Matrix"); item.addActionListener(new ActionListener() { @@ -1087,6 +1087,7 @@ public class AnnotationLabels extends JPanel g.translate(0, getScrollOffset()); g.setColor(Color.black); SequenceI lastSeqRef = null; + String lastLabel = null; AlignmentAnnotation[] aa = av.getAlignment().getAlignmentAnnotation(); int fontHeight = g.getFont().getSize(); int y = 0; @@ -1111,6 +1112,7 @@ public class AnnotationLabels extends JPanel { hasHiddenRows = false; int olY = 0; + int nexAA = 0; for (int i = 0; i < aa.length; i++) { visible = true; @@ -1120,6 +1122,9 @@ public class AnnotationLabels extends JPanel continue; } olY = y; + // look ahead to next annotation + for (nexAA=i+1; nexAA