X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fviewmodel%2FAlignmentViewport.java;h=d7ba417ccb61f4352471f95eaa030bae67b07e88;hb=f96e6a945e2df8a844f428c08cfc08210d937fc0;hp=536f76722459a14a585174bbd7dd333f0d4e454d;hpb=f35dfec0655116f4eb1afec4997eb496683687f6;p=jalview.git diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 536f767..d7ba417 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -664,8 +664,7 @@ public abstract class AlignmentViewport * retain any colour thresholds per group while * changing choice of colour scheme (JAL-2386) */ - sg.setColourScheme( - cs == null ? null : cs.getInstance(this, sg)); + sg.setColourScheme(cs == null ? null : cs.getInstance(this, sg)); if (cs != null) { sg.getGroupColourScheme().alignmentChanged(sg, @@ -963,6 +962,7 @@ public abstract class AlignmentViewport ranges = null; currentTree = null; selectionGroup = null; + colSel = null; setAlignment(null); } @@ -1820,9 +1820,8 @@ public abstract class AlignmentViewport AlignmentAnnotation clone = new AlignmentAnnotation(annot); if (selectedOnly && selectionGroup != null) { - clone.makeVisibleAnnotation( - selectionGroup.getStartRes(), selectionGroup.getEndRes(), - alignment.getHiddenColumns()); + clone.makeVisibleAnnotation(selectionGroup.getStartRes(), + selectionGroup.getEndRes(), alignment.getHiddenColumns()); } else { @@ -2720,6 +2719,30 @@ public abstract class AlignmentViewport viewStyle.setProteinFontAsCdna(b); } + @Override + public void setShowComplementFeatures(boolean b) + { + viewStyle.setShowComplementFeatures(b); + } + + @Override + public boolean isShowComplementFeatures() + { + return viewStyle.isShowComplementFeatures(); + } + + @Override + public void setShowComplementFeaturesOnTop(boolean b) + { + viewStyle.setShowComplementFeaturesOnTop(b); + } + + @Override + public boolean isShowComplementFeaturesOnTop() + { + return viewStyle.isShowComplementFeaturesOnTop(); + } + /** * @return true if view should scroll to show the highlighted region of a * sequence @@ -2950,7 +2973,7 @@ public abstract class AlignmentViewport } @Override - public void setCurrentTree(TreeModel tree) + public void setCurrentTree(TreeModel tree) // adapt to Aptx { currentTree = tree; } @@ -2962,7 +2985,8 @@ public abstract class AlignmentViewport } @Override - public AlignmentExportData getAlignExportData(AlignExportSettingsI options) + public AlignmentExportData getAlignExportData( + AlignExportSettingsI options) { AlignmentI alignmentToExport = null; String[] omitHidden = null; @@ -2990,7 +3014,7 @@ public abstract class AlignmentViewport omitHidden, alignmentStartEnd); return ed; } - + /** * flag set to indicate if structure views might be out of sync with sequences * in the alignment @@ -3054,4 +3078,22 @@ public abstract class AlignmentViewport codingComplement.setUpdateStructures(needToUpdateStructureViews); } } + + @Override + public Iterator getViewAsVisibleContigs(boolean selectedRegionOnly) + { + int start = 0; + int end = 0; + if (selectedRegionOnly && selectionGroup != null) + { + start = selectionGroup.getStartRes(); + end = selectionGroup.getEndRes() + 1; + } + else + { + end = alignment.getWidth(); + } + return (alignment.getHiddenColumns().getVisContigsIterator(start, end, + false)); + } }