X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=0b40abd1992115f2fe2faf940511d3f97e3dc7d0;hb=eb735a1925bb9387a532f3f89b6eba3eab695e85;hp=e0abfd9b8d1b971e6fe7b889d148edb9a7e1cd3a;hpb=a134511be07a998f7b80168dd26b632d53ed66b4;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index e0abfd9..0b40abd 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -254,14 +254,13 @@ public class AlignViewport extends AlignmentViewport setFont(new Font(fontName, style, Integer.parseInt(fontSize)), true); - alignment - .setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0)); + alignment.setGapCharacter(Cache.getDefault("GAP_SYMBOL", "-").charAt(0)); // We must set conservation and consensus before setting colour, // as Blosum and Clustal require this to be done - if (hconsensus == null && !isDataset) + if (hconsensus == null && !isDataset) { - if (!alignment.isNucleotide()) + if (!alignment.isNucleotide()) { showConservation = Cache.getDefault("SHOW_CONSERVATION", true); showQuality = Cache.getDefault("SHOW_QUALITY", true); @@ -273,13 +272,19 @@ public class AlignViewport extends AlignmentViewport showSequenceLogo = Cache.getDefault("SHOW_CONSENSUS_LOGO", false); normaliseSequenceLogo = Cache.getDefault("NORMALISE_CONSENSUS_LOGO", false); + // for now, use consensus options for Information till it gets its own + setShowHMMSequenceLogo(showSequenceLogo); + setNormaliseHMMSequenceLogo(normaliseSequenceLogo); + setShowInformationHistogram(showConsensusHistogram); showGroupConsensus = Cache.getDefault("SHOW_GROUP_CONSENSUS", false); showConsensus = Cache.getDefault("SHOW_IDENTITY", true); showOccupancy = Cache.getDefault(Preferences.SHOW_OCCUPANCY, true); } initAutoAnnotation(); - String colourProperty = alignment.isNucleotide() + // initInformation(); + + String colourProperty = alignment.isNucleotide() ? Preferences.DEFAULT_COLOUR_NUC : Preferences.DEFAULT_COLOUR_PROT; String schemeName = Cache.getProperty(colourProperty); @@ -290,7 +295,7 @@ public class AlignViewport extends AlignmentViewport ResidueColourScheme.NONE); } ColourSchemeI colourScheme = ColourSchemeProperty - .getColourScheme(alignment, schemeName); + .getColourScheme(this, alignment, schemeName); residueShading = new ResidueShader(colourScheme); if (colourScheme instanceof UserColourScheme) @@ -302,11 +307,11 @@ public class AlignViewport extends AlignmentViewport if (residueShading != null) { - residueShading.setConsensus(hconsensus); + residueShading.setConsensus(hconsensus); } setColourAppliesToAllGroups(true); } - + boolean validCharWidth; /** @@ -391,7 +396,7 @@ public class AlignViewport extends AlignmentViewport /* * replace mappings on our alignment */ - if (alignment != null && align != null) + if (alignment != null && align != null) { alignment.setCodonFrames(align.getCodonFrames()); } @@ -444,7 +449,7 @@ public class AlignViewport extends AlignmentViewport } /** - * returns the visible column regions of the alignment + * Returns an iterator over the visible column regions of the alignment * * @param selectedRegionOnly * true to just return the contigs intersecting with the selected @@ -464,8 +469,9 @@ public class AlignViewport extends AlignmentViewport { end = alignment.getWidth(); } - return (alignment.getHiddenColumns().getVisContigsIterator(start, end, - false)); + + return (alignment.getHiddenColumns().getVisContigsIterator(start, + end, false)); } /** @@ -515,7 +521,7 @@ public class AlignViewport extends AlignmentViewport } public boolean followSelection = true; - + /** * @return true if view selection should always follow the selections * broadcast by other selection sources @@ -580,18 +586,20 @@ public class AlignViewport extends AlignmentViewport return StructureSelectionManager .getStructureSelectionManager(Desktop.instance); } - + @Override public boolean isNormaliseSequenceLogo() { return normaliseSequenceLogo; } - public void setNormaliseSequenceLogo(boolean state) + @Override +public void setNormaliseSequenceLogo(boolean state) { normaliseSequenceLogo = state; } + /** * * @return true if alignment characters should be displayed @@ -601,7 +609,7 @@ public class AlignViewport extends AlignmentViewport { return validCharWidth; } - + private Hashtable calcIdParams = new Hashtable<>(); public AutoCalcSetting getCalcIdSettingsFor(String calcId)