X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=e9829bb7d31ce7d454483915e0fd43cad1f5d7a4;hb=2f4f1d8fb6878271b64f327bc58c895f458137af;hp=8978fd708ba541154064c8e06ac484c8de9e2c7b;hpb=90655a5726c6f7b82048438cf66c737a6999866d;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 8978fd7..e9829bb 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -1,19 +1,20 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ /* * Jalview - A Sequence Alignment Editor and Viewer @@ -69,7 +70,8 @@ import java.util.Vector; * @author $author$ * @version $Revision: 1.141 $ */ -public class AlignViewport extends AlignmentViewport implements SelectionSource, VamsasSource, AlignViewportI +public class AlignViewport extends AlignmentViewport implements + SelectionSource, VamsasSource, AlignViewportI { int startRes; @@ -107,7 +109,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, boolean seqNameItalics; - NJTree currentTree = null; boolean scaleAboveWrapped = false; @@ -138,8 +139,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, Stack redoList = new Stack(); - Hashtable sequenceColours; - int thresholdTextColour = 0; Color textColour = Color.black; @@ -321,17 +320,18 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, { if (!alignment.isNucleotide()) { - showConservation=Cache.getDefault("SHOW_CONSERVATION", true); - showQuality=Cache.getDefault("SHOW_QUALITY", true); + showConservation = Cache.getDefault("SHOW_CONSERVATION", true); + showQuality = Cache.getDefault("SHOW_QUALITY", true); showGroupConservation = Cache.getDefault("SHOW_GROUP_CONSERVATION", false); - } + } showConsensusHistogram = Cache.getDefault("SHOW_CONSENSUS_HISTOGRAM", true); showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false); - normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO", false); + normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO", + false); showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false); - showConsensus=Cache.getDefault("SHOW_IDENTITY", true); + showConsensus = Cache.getDefault("SHOW_IDENTITY", true); consensus = new AlignmentAnnotation("Consensus", "PID", new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); consensus.hasText = true; @@ -651,7 +651,7 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, Desktop.instance).removeMappings(alignment.getCodonFrames()); } this.alignment = align; - if (alignment!=null && alignment.getCodonFrames() != null) + if (alignment != null && alignment.getCodonFrames() != null) { StructureSelectionManager.getStructureSelectionManager( Desktop.instance).addMappings(alignment.getCodonFrames()); @@ -913,7 +913,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, scaleRightWrapped = b; } - public void setDataset(boolean b) { isDataset = b; @@ -924,8 +923,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, return isDataset; } - - public boolean getShowHiddenMarkers() { return showHiddenMarkers; @@ -936,35 +933,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, showHiddenMarkers = show; } - public Color getSequenceColour(SequenceI seq) - { - if (sequenceColours == null || !sequenceColours.containsKey(seq)) - { - return Color.white; - } - else - { - return (Color) sequenceColours.get(seq); - } - } - - public void setSequenceColour(SequenceI seq, Color col) - { - if (sequenceColours == null) - { - sequenceColours = new Hashtable(); - } - - if (col == null) - { - sequenceColours.remove(seq); - } - else - { - sequenceColours.put(seq, col); - } - } - /** * returns the visible column regions of the alignment * @@ -1046,23 +1014,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, centreColumnLabels = centrecolumnlabels; } - public void updateSequenceIdColours() - { - if (sequenceColours == null) - { - sequenceColours = new Hashtable(); - } - for (SequenceGroup sg:alignment.getGroups()) - { - if (sg.idColour != null) - { - for (SequenceI s:sg.getSequences(getHiddenRepSequences())) - { - sequenceColours.put(s, sg.idColour); - } - } - } - } /** * enable or disable the display of Database Cross References in the sequence @@ -1274,7 +1225,6 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, return seqvectors.toArray(new SequenceI[seqvectors.size()][]); } - public boolean isNormaliseSequenceLogo() { return normaliseSequenceLogo; @@ -1285,30 +1235,32 @@ public class AlignViewport extends AlignmentViewport implements SelectionSource, normaliseSequenceLogo = state; } - /** * - * @return true if alignment characters should be displayed + * @return true if alignment characters should be displayed */ public boolean isValidCharWidth() { return validCharWidth; } - private Hashtable calcIdParams=new Hashtable(); + + private Hashtable calcIdParams = new Hashtable(); + public AutoCalcSetting getCalcIdSettingsFor(String calcId) { return calcIdParams.get(calcId); } - public void setCalcIdSettingsFor(String calcId, AutoCalcSetting settings, boolean needsUpdate) + public void setCalcIdSettingsFor(String calcId, AutoCalcSetting settings, + boolean needsUpdate) { calcIdParams.put(calcId, settings); - // TODO: create a restart list to trigger any calculations that need to be restarted after load + // TODO: create a restart list to trigger any calculations that need to be + // restarted after load // calculator.getRegisteredWorkersOfClass(settings.getWorkerClass()) if (needsUpdate) { - Cache.log.debug("trigger update for "+calcId); + Cache.log.debug("trigger update for " + calcId); } } - }