X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=b088e0868acd7d1074be861dc08e357cb4b249c0;hb=ad15cff29620f960119f80176f1fd443da9f6763;hp=921189bf1727799ea9372995759ee8ac41652acb;hpb=49a7daf06cb98b45ce2d33ea25b15172c4204dda;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 921189b..b088e08 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1,6 +1,6 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) - * Copyright (C) 2014 The Jalview Authors + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors * * This file is part of Jalview. * @@ -42,9 +42,8 @@ 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; @@ -96,10 +95,6 @@ public class AlignViewport extends AlignmentViewport implements boolean renderGaps = true; - boolean showSequenceFeatures = false; - - boolean showAnnotation = true; - SequenceAnnotationOrder sortAnnotationsBy = null; int charHeight; @@ -126,12 +121,6 @@ public class AlignViewport extends AlignmentViewport implements boolean cursorMode = false; - /** - * Keys are the feature types which are currently visible. Note: Values are - * not used! - */ - private Hashtable featuresDisplayed = null; - boolean antiAlias = false; Rectangle explodedPosition; @@ -140,9 +129,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; @@ -150,8 +139,7 @@ public class AlignViewport extends AlignmentViewport implements Color textColour2 = Color.white; - boolean rightAlignIds = false; - + private AnnotationColumnChooser annotationColumnSelectionState; /** * Creates a new AlignViewport object. * @@ -207,16 +195,7 @@ public class AlignViewport extends AlignmentViewport implements setAlignment(al); if (hiddenColumns != null) { - this.colSel = hiddenColumns; - if (hiddenColumns.getHiddenColumns() != null - && hiddenColumns.getHiddenColumns().size() > 0) - { - hasHiddenColumns = true; - } - else - { - hasHiddenColumns = false; - } + colSel = hiddenColumns; } init(); } @@ -263,16 +242,7 @@ public class AlignViewport extends AlignmentViewport implements setAlignment(al); if (hiddenColumns != null) { - this.colSel = hiddenColumns; - if (hiddenColumns.getHiddenColumns() != null - && hiddenColumns.getHiddenColumns().size() > 0) - { - hasHiddenColumns = true; - } - else - { - hasHiddenColumns = false; - } + colSel = hiddenColumns; } init(); } @@ -287,9 +257,9 @@ public class AlignViewport extends AlignmentViewport implements antiAlias = Cache.getDefault("ANTI_ALIAS", false); showJVSuffix = Cache.getDefault("SHOW_JVSUFFIX", true); - showAnnotation = Cache.getDefault("SHOW_ANNOTATIONS", true); + setShowAnnotation(Cache.getDefault("SHOW_ANNOTATIONS", true)); - rightAlignIds = Cache.getDefault("RIGHT_ALIGN_IDS", false); + setRightAlignIds(Cache.getDefault("RIGHT_ALIGN_IDS", false)); centreColumnLabels = Cache.getDefault("CENTRE_COLUMN_LABELS", false); autoCalculateConsensus = Cache.getDefault("AUTO_CALC_CONSENSUS", true); @@ -337,10 +307,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) @@ -373,22 +339,6 @@ public class AlignViewport extends AlignmentViewport implements } /** - * set the flag - * - * @param b - * features are displayed if true - */ - public void setShowSequenceFeatures(boolean b) - { - showSequenceFeatures = b; - } - - public boolean getShowSequenceFeatures() - { - return showSequenceFeatures; - } - - /** * centre columnar annotation labels in displayed alignment annotation TODO: * add to jalviewXML and annotation display settings */ @@ -842,27 +792,6 @@ public class AlignViewport extends AlignmentViewport implements * * @return DOCUMENT ME! */ - public boolean getShowAnnotation() - { - return showAnnotation; - } - - /** - * DOCUMENT ME! - * - * @param b - * DOCUMENT ME! - */ - public void setShowAnnotation(boolean b) - { - showAnnotation = b; - } - - /** - * DOCUMENT ME! - * - * @return DOCUMENT ME! - */ public boolean getScaleAboveWrapped() { return scaleAboveWrapped; @@ -1062,23 +991,6 @@ public class AlignViewport extends AlignmentViewport implements shownpfeats = show; } - /** - * - * @return true if view has hidden rows - */ - public boolean hasHiddenRows() - { - return hasHiddenRows; - } - - /** - * - * @return true if view has hidden columns - */ - public boolean hasHiddenColumns() - { - return hasHiddenColumns; - } /** * when set, view will scroll to show the highlighted position @@ -1106,8 +1018,6 @@ public class AlignViewport extends AlignmentViewport implements return followSelection; } - boolean showSeqFeaturesHeight; - public void sendSelection() { jalview.structure.StructureSelectionManager @@ -1116,16 +1026,6 @@ public class AlignViewport extends AlignmentViewport implements new ColumnSelection(getColumnSelection()), this); } - public void setShowSequenceFeaturesHeight(boolean selected) - { - showSeqFeaturesHeight = selected; - } - - public boolean getShowSequenceFeaturesHeight() - { - return showSeqFeaturesHeight; - } - /** * return the alignPanel containing the given viewport. Use this to get the * components currently handling the given viewport. @@ -1279,16 +1179,6 @@ public class AlignViewport extends AlignmentViewport implements } } -<<<<<<< HEAD - public Hashtable getFeaturesDisplayed() - { - return featuresDisplayed; - } - - public void setFeaturesDisplayed(Hashtable featuresDisplayed) - { - this.featuresDisplayed = featuresDisplayed; -======= protected SequenceAnnotationOrder getSortAnnotationsBy() { return sortAnnotationsBy; @@ -1307,6 +1197,16 @@ public class AlignViewport extends AlignmentViewport implements protected void setShowAutocalculatedAbove(boolean showAutocalculatedAbove) { this.showAutocalculatedAbove = showAutocalculatedAbove; ->>>>>>> branch 'features/JAL-1541_BioJsMSAViewer-export-option' of https://source.jalview.org/git/jalview.git + } + + public AnnotationColumnChooser getAnnotationColumnSelectionState() + { + return annotationColumnSelectionState; + } + + public void setAnnotationColumnSelectionState( + AnnotationColumnChooser currentAnnotationColumnSelectionState) + { + this.annotationColumnSelectionState = currentAnnotationColumnSelectionState; } }