X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=f79867132ec7daec4a2c974233f51af6f5cab18c;hb=50ea78c7b98de7614cd386956e9aa0ee73dd7936;hp=5c93dc559d5ccd8cfbb799f5045c616ccea17db9;hpb=80e1557b48887100b254d0caf83c28e49ecffcb5;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 5c93dc5..f798671 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -29,6 +29,7 @@ import jalview.bin.*; import jalview.datamodel.*; import jalview.schemes.*; +import jalview.structure.StructureSelectionManager; /** * DOCUMENT ME! @@ -166,7 +167,7 @@ public class AlignViewport showAnnotation = Cache.getDefault("SHOW_ANNOTATIONS", true); rightAlignIds = Cache.getDefault("RIGHT_ALIGN_IDS", false); - + centreColumnLabels = Cache.getDefault("CENTRE_COLUMN_LABELS", false); autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true); padGaps = Cache.getDefault("PAD_GAPS", true); @@ -222,7 +223,7 @@ public class AlignViewport 0f, 11f, AlignmentAnnotation.BAR_GRAPH); - quality.hasText = false; + quality.hasText = true; quality.autoCalculated=true; alignment.addAnnotation(quality); @@ -300,7 +301,7 @@ public class AlignViewport { if (ap != null) { - ap.paintAlignment(true); + ap.paintAlignment(false); } Thread.sleep(200); } @@ -455,9 +456,14 @@ public class AlignViewport boolean updatingConsensus = false; boolean updatingConservation = false; + /** + * centre columnar annotation labels in displayed alignment annotation + * TODO: add to jalviewXML and annotation display settings + */ + boolean centreColumnLabels=false; /** - * DOCUMENT ME! + * trigger update of conservation annotation */ public void updateConservation(final AlignmentPanel ap) { @@ -471,7 +477,7 @@ public class AlignViewport } /** - * DOCUMENT ME! + * trigger update of consensus annotation */ public void updateConsensus(final AlignmentPanel ap) { @@ -496,7 +502,7 @@ public class AlignViewport { if (ap != null) { - ap.paintAlignment(true); + ap.paintAlignment(false); } Thread.sleep(200); @@ -512,7 +518,7 @@ public class AlignViewport try { - int aWidth = alignment.getWidth(); + int aWidth = (alignment!=null) ? alignment.getWidth() : 0; // null pointer possibility here. if(aWidth<0) { return; @@ -916,7 +922,15 @@ public class AlignViewport */ public void setAlignment(AlignmentI align) { + if (alignment!=null && alignment.getCodonFrames()!=null) + { + StructureSelectionManager.getStructureSelectionManager().removeMappings(alignment.getCodonFrames()); + } this.alignment = align; + if (alignment.getCodonFrames()!=null) + { + StructureSelectionManager.getStructureSelectionManager().addMappings(alignment.getCodonFrames()); + } } /** @@ -1444,20 +1458,7 @@ public class AlignViewport public void invertColumnSelection() { - for(int i=0; i