X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=0b40abd1992115f2fe2faf940511d3f97e3dc7d0;hb=5cb4c1540eaca054c26ff42a8319f0dbffb1f8e6;hp=39ded7f633049aab1db2b626494a44db237815c9;hpb=09b8644607fb5b9debbfe39a7177922b0e66aa9a;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 39ded7f..0b40abd 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -79,7 +79,7 @@ public class AlignViewport extends AlignmentViewport private Rectangle explodedGeometry; - String viewName; + private String viewName; /* * Flag set true on the view that should 'gather' multiple views of the same @@ -92,12 +92,6 @@ public class AlignViewport extends AlignmentViewport private AnnotationColumnChooser annotationColumnSelectionState; - boolean validCharWidth; - - public boolean followSelection = true; - - private Hashtable calcIdParams = new Hashtable<>(); - /** * Creates a new AlignViewport object. * @@ -260,18 +254,13 @@ public class AlignViewport extends AlignmentViewport setFont(new Font(fontName, style, Integer.parseInt(fontSize)), true); - AlignmentI al = getAlignment(); - - if (Cache.getDefault("NORMALISE_GAPS", true)) - { - al.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 (consensusProfiles == null && !isDataset) + if (hconsensus == null && !isDataset) { - if (!al.isNucleotide()) + if (!alignment.isNucleotide()) { showConservation = Cache.getDefault("SHOW_CONSERVATION", true); showQuality = Cache.getDefault("SHOW_QUALITY", true); @@ -295,7 +284,7 @@ public class AlignViewport extends AlignmentViewport initAutoAnnotation(); // initInformation(); - String colourProperty = al.isNucleotide() + String colourProperty = alignment.isNucleotide() ? Preferences.DEFAULT_COLOUR_NUC : Preferences.DEFAULT_COLOUR_PROT; String schemeName = Cache.getProperty(colourProperty); @@ -306,7 +295,7 @@ public class AlignViewport extends AlignmentViewport ResidueColourScheme.NONE); } ColourSchemeI colourScheme = ColourSchemeProperty - .getColourScheme(al, schemeName); + .getColourScheme(this, alignment, schemeName); residueShading = new ResidueShader(colourScheme); if (colourScheme instanceof UserColourScheme) @@ -318,9 +307,12 @@ public class AlignViewport extends AlignmentViewport if (residueShading != null) { - residueShading.setConsensus(consensusProfiles); + residueShading.setConsensus(hconsensus); } + setColourAppliesToAllGroups(true); } + + boolean validCharWidth; /** * {@inheritDoc} @@ -404,9 +396,9 @@ public class AlignViewport extends AlignmentViewport /* * replace mappings on our alignment */ - if (getAlignment() != null && align != null) + if (alignment != null && align != null) { - getAlignment().setCodonFrames(align.getCodonFrames()); + alignment.setCodonFrames(align.getCodonFrames()); } } @@ -475,11 +467,11 @@ public class AlignViewport extends AlignmentViewport } else { - end = getAlignment().getWidth(); + end = alignment.getWidth(); } - return getAlignment().getHiddenColumns().getVisContigsIterator(start, - end, false); + return (alignment.getHiddenColumns().getVisContigsIterator(start, + end, false)); } /** @@ -528,6 +520,8 @@ public class AlignViewport extends AlignmentViewport return false; } + public boolean followSelection = true; + /** * @return true if view selection should always follow the selections * broadcast by other selection sources @@ -592,6 +586,19 @@ public class AlignViewport extends AlignmentViewport return StructureSelectionManager .getStructureSelectionManager(Desktop.instance); } + + @Override + public boolean isNormaliseSequenceLogo() + { + return normaliseSequenceLogo; + } + + @Override +public void setNormaliseSequenceLogo(boolean state) + { + normaliseSequenceLogo = state; + } + /** * @@ -602,6 +609,8 @@ public class AlignViewport extends AlignmentViewport { return validCharWidth; } + + private Hashtable calcIdParams = new Hashtable<>(); public AutoCalcSetting getCalcIdSettingsFor(String calcId) { @@ -795,7 +804,7 @@ public class AlignViewport extends AlignmentViewport AlignFrame newAlignFrame = new AlignFrame(al, AlignFrame.DEFAULT_WIDTH, AlignFrame.DEFAULT_HEIGHT); newAlignFrame.setTitle(title); - newAlignFrame.statusBar.setText(MessageManager + newAlignFrame.setStatus(MessageManager .formatMessage("label.successfully_loaded_file", new Object[] { title })); @@ -1033,4 +1042,13 @@ public class AlignViewport extends AlignmentViewport fr.setTransparency(featureSettings.getTransparency()); } + public String getViewName() + { + return viewName; + } + + public void setViewName(String viewName) + { + this.viewName = viewName; + } }