X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=d24f6c4b90e3ad6831776a52312a96f32b92852b;hb=6e0dc75fa4251c831606d00cee1c01de5733890a;hp=69695130904947cf654696d84dec5fd4e2330338;hpb=d305e02d8b425bb501141ad32142aeb8572adc57;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 6969513..d24f6c4 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -38,13 +38,12 @@ */ package jalview.gui; -import jalview.analysis.AnnotationSorter.SortOrder; +import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; import jalview.analysis.NJTree; import jalview.api.AlignViewportI; import jalview.bin.Cache; -import jalview.datamodel.AlignmentAnnotation; +import jalview.commands.CommandI; import jalview.datamodel.AlignmentI; -import jalview.datamodel.Annotation; import jalview.datamodel.ColumnSelection; import jalview.datamodel.PDBEntry; import jalview.datamodel.Sequence; @@ -100,7 +99,7 @@ public class AlignViewport extends AlignmentViewport implements boolean showAnnotation = true; - SortOrder sortAnnotationsBy = null; + SequenceAnnotationOrder sortAnnotationsBy = null; int charHeight; @@ -140,9 +139,9 @@ public class AlignViewport extends AlignmentViewport implements boolean gatherViewsHere = false; - Stack historyList = new Stack(); + Stack historyList = new Stack(); - Stack redoList = new Stack(); + Stack redoList = new Stack(); int thresholdTextColour = 0; @@ -337,10 +336,6 @@ public class AlignViewport extends AlignmentViewport implements false); showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false); showConsensus = Cache.getDefault("SHOW_IDENTITY", true); - consensus = new AlignmentAnnotation("Consensus", "PID", - new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); - consensus.hasText = true; - consensus.autoCalculated = true; } initAutoAnnotation(); if (jalview.bin.Cache.getProperty("DEFAULT_COLOUR") != null) @@ -362,13 +357,14 @@ public class AlignViewport extends AlignmentViewport implements } wrapAlignment = Cache.getDefault("WRAP_ALIGNMENT", false); - showUnconserved = Cache.getDefault("SHOW_UNCONSERVED", - false); + showUnconserved = Cache.getDefault("SHOW_UNCONSERVED", false); sortByTree = Cache.getDefault("SORT_BY_TREE", false); - followSelection = Cache.getDefault("FOLLOW_SELECTIONS", - true); - sortAnnotationsBy = SortOrder.valueOf(Cache.getDefault( - "SORT_ANNOTATIONS", SortOrder.SEQUENCE_AND_TYPE.name())); + followSelection = Cache.getDefault("FOLLOW_SELECTIONS", true); + sortAnnotationsBy = SequenceAnnotationOrder.valueOf(Cache.getDefault( + Preferences.SORT_ANNOTATIONS, + SequenceAnnotationOrder.NONE.name())); + showAutocalculatedAbove = Cache.getDefault( + Preferences.SHOW_AUTOCALC_ABOVE, false); } /** @@ -1258,6 +1254,8 @@ public class AlignViewport extends AlignmentViewport implements private Hashtable calcIdParams = new Hashtable(); + private boolean showAutocalculatedAbove; + public AutoCalcSetting getCalcIdSettingsFor(String calcId) { return calcIdParams.get(calcId); @@ -1276,13 +1274,23 @@ public class AlignViewport extends AlignmentViewport implements } } - protected SortOrder getSortAnnotationsBy() + protected SequenceAnnotationOrder getSortAnnotationsBy() { return sortAnnotationsBy; } - protected void setSortAnnotationsBy(SortOrder sortAnnotationsBy) + protected void setSortAnnotationsBy(SequenceAnnotationOrder sortAnnotationsBy) { this.sortAnnotationsBy = sortAnnotationsBy; } + + protected boolean isShowAutocalculatedAbove() + { + return showAutocalculatedAbove; + } + + protected void setShowAutocalculatedAbove(boolean showAutocalculatedAbove) + { + this.showAutocalculatedAbove = showAutocalculatedAbove; + } }