JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / jalview / viewmodel / AlignmentViewport.js
index 6f07731..cdbd489 100644 (file)
-Clazz.declarePackage ("jalview.viewmodel");\r
-Clazz.load (["jalview.api.AlignViewportI", "jalview.structure.CommandListener", "$.VamsasSource", "jalview.datamodel.ColumnSelection", "jalview.viewmodel.styles.ViewStyle", "jalview.workers.AlignCalcManager", "java.beans.PropertyChangeSupport", "java.util.ArrayDeque", "$.HashMap"], "jalview.viewmodel.AlignmentViewport", ["jalview.analysis.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.AlignmentView", "$.CigarArray", "$.Sequence", "$.SequenceGroup", "jalview.schemes.Blosum62ColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "jalview.util.Comparison", "$.MappingUtils", "jalview.workers.ComplementConsensusThread", "$.ConsensusThread", "$.ConservationThread", "$.StrucConsensusThread", "java.awt.Color", "java.util.ArrayList", "$.BitSet", "$.Hashtable"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.viewStyle = null;\r
-this.codingComplement = null;\r
-this.featuresDisplayed = null;\r
-this.historyList = null;\r
-this.redoList = null;\r
-this.alignment = null;\r
-this.sequenceSetID = null;\r
-this.$isDataset = false;\r
-this.hiddenRepSequences = null;\r
-this.colSel = null;\r
-this.autoCalculateConsensus = true;\r
-this.autoCalculateStrucConsensus = true;\r
-this.ignoreGapsInConsensusCalculation = false;\r
-this.globalColourScheme = null;\r
-this.consensus = null;\r
-this.complementConsensus = null;\r
-this.strucConsensus = null;\r
-this.conservation = null;\r
-this.quality = null;\r
-this.groupConsensus = null;\r
-this.groupConservation = null;\r
-this.hconsensus = null;\r
-this.hcomplementConsensus = null;\r
-this.hStrucConsensus = null;\r
-this.hconservation = null;\r
-this.ConsPercGaps = 25;\r
-this.calculator = null;\r
-this.showGroupConservation = false;\r
-this.showGroupConsensus = false;\r
-this.showSequenceLogo = false;\r
-this.normaliseSequenceLogo = false;\r
-this.showConsensusHistogram = true;\r
-this.padGaps = false;\r
-this.sortByTree = false;\r
-this.selectionGroup = null;\r
-this.viewId = null;\r
-this.sgrouphash = -1;\r
-this.colselhash = -1;\r
-this.changeSupport = null;\r
-this.showConservation = true;\r
-this.showQuality = true;\r
-this.showConsensus = true;\r
-this.sequenceColours = null;\r
-this.sortAnnotationsBy = null;\r
-this.showAutocalculatedAbove = false;\r
-this.followHighlight = true;\r
-this.startRes = 0;\r
-this.endRes = 0;\r
-this.startSeq = 0;\r
-this.endSeq = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.viewmodel, "AlignmentViewport", null, [jalview.api.AlignViewportI, jalview.structure.CommandListener, jalview.structure.VamsasSource]);\r
-Clazz.prepareFields (c$, function () {\r
-this.viewStyle =  new jalview.viewmodel.styles.ViewStyle ();\r
-this.historyList =  new java.util.ArrayDeque ();\r
-this.redoList =  new java.util.ArrayDeque ();\r
-this.colSel =  new jalview.datamodel.ColumnSelection ();\r
-this.calculator =  new jalview.workers.AlignCalcManager ();\r
-this.changeSupport =  new java.beans.PropertyChangeSupport (this);\r
-this.sequenceColours =  new java.util.HashMap ();\r
-});\r
-Clazz.defineMethod (c$, "setFontName", \r
-function (name) {\r
-this.viewStyle.setFontName (name);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "setFontStyle", \r
-function (style) {\r
-this.viewStyle.setFontStyle (style);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setFontSize", \r
-function (size) {\r
-this.viewStyle.setFontSize (size);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getFontStyle", \r
-function () {\r
-return this.viewStyle.getFontStyle ();\r
-});\r
-Clazz.defineMethod (c$, "getFontName", \r
-function () {\r
-return this.viewStyle.getFontName ();\r
-});\r
-Clazz.defineMethod (c$, "getFontSize", \r
-function () {\r
-return this.viewStyle.getFontSize ();\r
-});\r
-Clazz.defineMethod (c$, "setUpperCasebold", \r
-function (upperCasebold) {\r
-this.viewStyle.setUpperCasebold (upperCasebold);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isUpperCasebold", \r
-function () {\r
-return this.viewStyle.isUpperCasebold ();\r
-});\r
-Clazz.defineMethod (c$, "isSeqNameItalics", \r
-function () {\r
-return this.viewStyle.isSeqNameItalics ();\r
-});\r
-Clazz.defineMethod (c$, "setColourByReferenceSeq", \r
-function (colourByReferenceSeq) {\r
-this.viewStyle.setColourByReferenceSeq (colourByReferenceSeq);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setColourAppliesToAllGroups", \r
-function (b) {\r
-this.viewStyle.setColourAppliesToAllGroups (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getColourAppliesToAllGroups", \r
-function () {\r
-return this.viewStyle.getColourAppliesToAllGroups ();\r
-});\r
-Clazz.defineMethod (c$, "getAbovePIDThreshold", \r
-function () {\r
-return this.viewStyle.getAbovePIDThreshold ();\r
-});\r
-Clazz.defineMethod (c$, "setIncrement", \r
-function (inc) {\r
-this.viewStyle.setIncrement (inc);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getIncrement", \r
-function () {\r
-return this.viewStyle.getIncrement ();\r
-});\r
-Clazz.defineMethod (c$, "setConservationSelected", \r
-function (b) {\r
-this.viewStyle.setConservationSelected (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setShowHiddenMarkers", \r
-function (show) {\r
-this.viewStyle.setShowHiddenMarkers (show);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getShowHiddenMarkers", \r
-function () {\r
-return this.viewStyle.getShowHiddenMarkers ();\r
-});\r
-Clazz.defineMethod (c$, "setScaleRightWrapped", \r
-function (b) {\r
-this.viewStyle.setScaleRightWrapped (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setScaleLeftWrapped", \r
-function (b) {\r
-this.viewStyle.setScaleLeftWrapped (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setScaleAboveWrapped", \r
-function (b) {\r
-this.viewStyle.setScaleAboveWrapped (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getScaleLeftWrapped", \r
-function () {\r
-return this.viewStyle.getScaleLeftWrapped ();\r
-});\r
-Clazz.defineMethod (c$, "getScaleAboveWrapped", \r
-function () {\r
-return this.viewStyle.getScaleAboveWrapped ();\r
-});\r
-Clazz.defineMethod (c$, "getScaleRightWrapped", \r
-function () {\r
-return this.viewStyle.getScaleRightWrapped ();\r
-});\r
-Clazz.defineMethod (c$, "setAbovePIDThreshold", \r
-function (b) {\r
-this.viewStyle.setAbovePIDThreshold (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setThreshold", \r
-function (thresh) {\r
-this.viewStyle.setThreshold (thresh);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getThreshold", \r
-function () {\r
-return this.viewStyle.getThreshold ();\r
-});\r
-Clazz.defineMethod (c$, "getShowJVSuffix", \r
-function () {\r
-return this.viewStyle.getShowJVSuffix ();\r
-});\r
-Clazz.defineMethod (c$, "setShowJVSuffix", \r
-function (b) {\r
-this.viewStyle.setShowJVSuffix (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setWrapAlignment", \r
-function (state) {\r
-this.viewStyle.setWrapAlignment (state);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setShowText", \r
-function (state) {\r
-this.viewStyle.setShowText (state);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setRenderGaps", \r
-function (state) {\r
-this.viewStyle.setRenderGaps (state);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getColourText", \r
-function () {\r
-return this.viewStyle.getColourText ();\r
-});\r
-Clazz.defineMethod (c$, "setColourText", \r
-function (state) {\r
-this.viewStyle.setColourText (state);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getWrapAlignment", \r
-function () {\r
-return this.viewStyle.getWrapAlignment ();\r
-});\r
-Clazz.defineMethod (c$, "getShowText", \r
-function () {\r
-return this.viewStyle.getShowText ();\r
-});\r
-Clazz.defineMethod (c$, "getWrappedWidth", \r
-function () {\r
-return this.viewStyle.getWrappedWidth ();\r
-});\r
-Clazz.defineMethod (c$, "setWrappedWidth", \r
-function (w) {\r
-this.viewStyle.setWrappedWidth (w);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getCharHeight", \r
-function () {\r
-return this.viewStyle.getCharHeight ();\r
-});\r
-Clazz.defineMethod (c$, "setCharHeight", \r
-function (h) {\r
-this.viewStyle.setCharHeight (h);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getCharWidth", \r
-function () {\r
-return this.viewStyle.getCharWidth ();\r
-});\r
-Clazz.defineMethod (c$, "setCharWidth", \r
-function (w) {\r
-this.viewStyle.setCharWidth (w);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getShowBoxes", \r
-function () {\r
-return this.viewStyle.getShowBoxes ();\r
-});\r
-Clazz.defineMethod (c$, "getShowUnconserved", \r
-function () {\r
-return this.viewStyle.getShowUnconserved ();\r
-});\r
-Clazz.defineMethod (c$, "setShowUnconserved", \r
-function (showunconserved) {\r
-this.viewStyle.setShowUnconserved (showunconserved);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setSeqNameItalics", \r
-function (default1) {\r
-this.viewStyle.setSeqNameItalics (default1);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getAlignment", \r
-function () {\r
-return this.alignment;\r
-});\r
-Clazz.overrideMethod (c$, "getGapCharacter", \r
-function () {\r
-return this.alignment.getGapCharacter ();\r
-});\r
-Clazz.defineMethod (c$, "setDataset", \r
-function (b) {\r
-this.$isDataset = b;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isDataset", \r
-function () {\r
-return this.$isDataset;\r
-});\r
-Clazz.overrideMethod (c$, "setGlobalColourScheme", \r
-function (cs) {\r
-this.globalColourScheme = cs;\r
-var recalc = false;\r
-if (cs != null) {\r
-cs.setConservationApplied (recalc = this.getConservationSelected ());\r
-if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) {\r
-recalc = true;\r
-cs.setThreshold (this.viewStyle.getThreshold (), this.ignoreGapsInConsensusCalculation);\r
-} else {\r
-cs.setThreshold (0, this.ignoreGapsInConsensusCalculation);\r
-}if (recalc) {\r
-cs.setConsensus (this.hconsensus);\r
-cs.setConservation (this.hconservation);\r
-}cs.alignmentChanged (this.alignment, this.hiddenRepSequences);\r
-}if (this.getColourAppliesToAllGroups ()) {\r
-for (var sg, $sg = this.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {\r
-if (cs == null) {\r
-sg.cs = null;\r
-continue;\r
-}sg.cs = cs.applyTo (sg, this.getHiddenRepSequences ());\r
-sg.setConsPercGaps (this.ConsPercGaps);\r
-if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) {\r
-sg.cs.setThreshold (this.viewStyle.getThreshold (), this.isIgnoreGapsConsensus ());\r
-recalc = true;\r
-} else {\r
-sg.cs.setThreshold (0, this.isIgnoreGapsConsensus ());\r
-}if (this.getConservationSelected ()) {\r
-sg.cs.setConservationApplied (true);\r
-recalc = true;\r
-} else {\r
-sg.cs.setConservation (null);\r
-}if (recalc) {\r
-sg.recalcConservation ();\r
-} else {\r
-sg.cs.alignmentChanged (sg, this.hiddenRepSequences);\r
-}}\r
-}}, "jalview.schemes.ColourSchemeI");\r
-Clazz.overrideMethod (c$, "getGlobalColourScheme", \r
-function () {\r
-return this.globalColourScheme;\r
-});\r
-Clazz.overrideMethod (c$, "setConservation", \r
-function (cons) {\r
-this.hconservation = cons;\r
-}, "jalview.analysis.Conservation");\r
-Clazz.overrideMethod (c$, "getConsPercGaps", \r
-function () {\r
-return this.ConsPercGaps;\r
-});\r
-Clazz.overrideMethod (c$, "setSequenceConsensusHash", \r
-function (hconsensus) {\r
-this.hconsensus = hconsensus;\r
-}, "~A");\r
-Clazz.overrideMethod (c$, "setComplementConsensusHash", \r
-function (hconsensus) {\r
-this.hcomplementConsensus = hconsensus;\r
-}, "~A");\r
-Clazz.overrideMethod (c$, "getSequenceConsensusHash", \r
-function () {\r
-return this.hconsensus;\r
-});\r
-Clazz.overrideMethod (c$, "getComplementConsensusHash", \r
-function () {\r
-return this.hcomplementConsensus;\r
-});\r
-Clazz.overrideMethod (c$, "getRnaStructureConsensusHash", \r
-function () {\r
-return this.hStrucConsensus;\r
-});\r
-Clazz.overrideMethod (c$, "setRnaStructureConsensusHash", \r
-function (hStrucConsensus) {\r
-this.hStrucConsensus = hStrucConsensus;\r
-}, "~A");\r
-Clazz.overrideMethod (c$, "getAlignmentQualityAnnot", \r
-function () {\r
-return this.quality;\r
-});\r
-Clazz.overrideMethod (c$, "getAlignmentConservationAnnotation", \r
-function () {\r
-return this.conservation;\r
-});\r
-Clazz.overrideMethod (c$, "getAlignmentConsensusAnnotation", \r
-function () {\r
-return this.consensus;\r
-});\r
-Clazz.overrideMethod (c$, "getComplementConsensusAnnotation", \r
-function () {\r
-return this.complementConsensus;\r
-});\r
-Clazz.overrideMethod (c$, "getAlignmentStrucConsensusAnnotation", \r
-function () {\r
-return this.strucConsensus;\r
-});\r
-Clazz.defineMethod (c$, "updateConservation", \r
-function (ap) {\r
-if (this.alignment.isNucleotide () || this.conservation == null || !this.autoCalculateConsensus) {\r
-return;\r
-}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConservationThread) == null) {\r
-this.calculator.registerWorker ( new jalview.workers.ConservationThread (this, ap));\r
-}}, "jalview.api.AlignmentViewPanel");\r
-Clazz.defineMethod (c$, "updateConsensus", \r
-function (ap) {\r
-if (this.consensus == null || !this.autoCalculateConsensus) {\r
-return;\r
-}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConsensusThread) == null) {\r
-this.calculator.registerWorker ( new jalview.workers.ConsensusThread (this, ap));\r
-}var al = this.getAlignment ();\r
-if (!al.isNucleotide () && al.getCodonFrames () != null && !al.getCodonFrames ().isEmpty ()) {\r
-if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ComplementConsensusThread) == null) {\r
-this.calculator.registerWorker ( new jalview.workers.ComplementConsensusThread (this, ap));\r
-}}}, "jalview.api.AlignmentViewPanel");\r
-Clazz.defineMethod (c$, "updateStrucConsensus", \r
-function (ap) {\r
-if (this.autoCalculateStrucConsensus && this.strucConsensus == null && this.alignment.isNucleotide () && this.alignment.hasRNAStructure ()) {\r
-this.initRNAStructure ();\r
-}if (this.strucConsensus == null || !this.autoCalculateStrucConsensus) {\r
-return;\r
-}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.StrucConsensusThread) == null) {\r
-this.calculator.registerWorker ( new jalview.workers.StrucConsensusThread (this, ap));\r
-}}, "jalview.api.AlignmentViewPanel");\r
-Clazz.defineMethod (c$, "isCalcInProgress", \r
-function () {\r
-return this.calculator.isWorking ();\r
-});\r
-Clazz.overrideMethod (c$, "isCalculationInProgress", \r
-function (alignmentAnnotation) {\r
-if (!alignmentAnnotation.autoCalculated) {\r
-return false;\r
-}if (this.calculator.workingInvolvedWith (alignmentAnnotation)) {\r
-return true;\r
-}return false;\r
-}, "jalview.datamodel.AlignmentAnnotation");\r
-Clazz.overrideMethod (c$, "isClosed", \r
-function () {\r
-return this.alignment == null;\r
-});\r
-Clazz.overrideMethod (c$, "getCalcManager", \r
-function () {\r
-return this.calculator;\r
-});\r
-Clazz.overrideMethod (c$, "isShowSequenceLogo", \r
-function () {\r
-return this.showSequenceLogo;\r
-});\r
-Clazz.defineMethod (c$, "setShowSequenceLogo", \r
-function (showSequenceLogo) {\r
-if (showSequenceLogo != this.showSequenceLogo) {\r
-this.showSequenceLogo = showSequenceLogo;\r
-this.calculator.updateAnnotationFor (jalview.workers.ConsensusThread);\r
-this.calculator.updateAnnotationFor (jalview.workers.ComplementConsensusThread);\r
-this.calculator.updateAnnotationFor (jalview.workers.StrucConsensusThread);\r
-}this.showSequenceLogo = showSequenceLogo;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setShowConsensusHistogram", \r
-function (showConsensusHistogram) {\r
-this.showConsensusHistogram = showConsensusHistogram;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowGroupConservation", \r
-function () {\r
-return this.showGroupConservation;\r
-});\r
-Clazz.defineMethod (c$, "setShowGroupConservation", \r
-function (showGroupConservation) {\r
-this.showGroupConservation = showGroupConservation;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowGroupConsensus", \r
-function () {\r
-return this.showGroupConsensus;\r
-});\r
-Clazz.defineMethod (c$, "setShowGroupConsensus", \r
-function (showGroupConsensus) {\r
-this.showGroupConsensus = showGroupConsensus;\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "isShowConsensusHistogram", \r
-function () {\r
-return this.showConsensusHistogram;\r
-});\r
-Clazz.overrideMethod (c$, "getSelectionGroup", \r
-function () {\r
-return this.selectionGroup;\r
-});\r
-Clazz.overrideMethod (c$, "setSelectionGroup", \r
-function (sg) {\r
-this.selectionGroup = sg;\r
-}, "jalview.datamodel.SequenceGroup");\r
-Clazz.defineMethod (c$, "setHiddenColumns", \r
-function (colsel) {\r
-this.colSel = colsel;\r
-}, "jalview.datamodel.ColumnSelection");\r
-Clazz.overrideMethod (c$, "getColumnSelection", \r
-function () {\r
-return this.colSel;\r
-});\r
-Clazz.overrideMethod (c$, "setColumnSelection", \r
-function (colSel) {\r
-this.colSel = colSel;\r
-if (colSel != null) {\r
-this.updateHiddenColumns ();\r
-}}, "jalview.datamodel.ColumnSelection");\r
-Clazz.overrideMethod (c$, "getHiddenRepSequences", \r
-function () {\r
-return this.hiddenRepSequences;\r
-});\r
-Clazz.overrideMethod (c$, "setHiddenRepSequences", \r
-function (hiddenRepSequences) {\r
-this.hiddenRepSequences = hiddenRepSequences;\r
-}, "java.util.Map");\r
-Clazz.overrideMethod (c$, "hasHiddenColumns", \r
-function () {\r
-return this.colSel != null && this.colSel.hasHiddenColumns ();\r
-});\r
-Clazz.defineMethod (c$, "updateHiddenColumns", \r
-function () {\r
-});\r
-Clazz.overrideMethod (c$, "hasHiddenRows", \r
-function () {\r
-return this.alignment.getHiddenSequences ().getSize () > 0;\r
-});\r
-Clazz.defineMethod (c$, "setSequenceSetId", \r
-function (newid) {\r
-if (this.sequenceSetID != null) {\r
-System.err.println ("Warning - overwriting a sequenceSetId for a viewport!");\r
-}this.sequenceSetID =  String.instantialize (newid);\r
-}, "~S");\r
-Clazz.overrideMethod (c$, "getSequenceSetId", \r
-function () {\r
-if (this.sequenceSetID == null) {\r
-this.sequenceSetID = this.alignment.hashCode () + "";\r
-}return this.sequenceSetID;\r
-});\r
-Clazz.overrideMethod (c$, "getViewId", \r
-function () {\r
-if (this.viewId == null) {\r
-this.viewId = this.getSequenceSetId () + "." + this.hashCode () + "";\r
-}return this.viewId;\r
-});\r
-Clazz.defineMethod (c$, "setIgnoreGapsConsensus", \r
-function (b, ap) {\r
-this.ignoreGapsInConsensusCalculation = b;\r
-if (ap != null) {\r
-this.updateConsensus (ap);\r
-if (this.globalColourScheme != null) {\r
-this.globalColourScheme.setThreshold (this.globalColourScheme.getThreshold (), this.ignoreGapsInConsensusCalculation);\r
-}}}, "~B,jalview.api.AlignmentViewPanel");\r
-Clazz.defineMethod (c$, "isSelectionGroupChanged", \r
-function (b) {\r
-var hc = (this.selectionGroup == null || this.selectionGroup.getSize () == 0) ? -1 : this.selectionGroup.hashCode ();\r
-if (hc != -1 && hc != this.sgrouphash) {\r
-if (b) {\r
-this.sgrouphash = hc;\r
-}return true;\r
-}return false;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isColSelChanged", \r
-function (b) {\r
-var hc = (this.colSel == null || this.colSel.size () == 0) ? -1 : this.colSel.hashCode ();\r
-if (hc != -1 && hc != this.colselhash) {\r
-if (b) {\r
-this.colselhash = hc;\r
-}return true;\r
-}return false;\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "isIgnoreGapsConsensus", \r
-function () {\r
-return this.ignoreGapsInConsensusCalculation;\r
-});\r
-Clazz.defineMethod (c$, "addPropertyChangeListener", \r
-function (listener) {\r
-this.changeSupport.addPropertyChangeListener (listener);\r
-}, "java.beans.PropertyChangeListener");\r
-Clazz.defineMethod (c$, "removePropertyChangeListener", \r
-function (listener) {\r
-this.changeSupport.removePropertyChangeListener (listener);\r
-}, "java.beans.PropertyChangeListener");\r
-Clazz.defineMethod (c$, "firePropertyChange", \r
-function (prop, oldvalue, newvalue) {\r
-this.changeSupport.firePropertyChange (prop, oldvalue, newvalue);\r
-}, "~S,~O,~O");\r
-Clazz.defineMethod (c$, "hideSelectedColumns", \r
-function () {\r
-if (this.colSel.size () < 1) {\r
-return;\r
-}this.colSel.hideSelectedColumns ();\r
-this.setSelectionGroup (null);\r
-});\r
-Clazz.defineMethod (c$, "hideColumns", \r
-function (start, end) {\r
-if (start == end) {\r
-this.colSel.hideColumns (start);\r
-} else {\r
-this.colSel.hideColumns (start, end);\r
-}}, "~N,~N");\r
-Clazz.defineMethod (c$, "showColumn", \r
-function (col) {\r
-this.colSel.revealHiddenColumns (col);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "showAllHiddenColumns", \r
-function () {\r
-this.colSel.revealAllHiddenColumns ();\r
-});\r
-Clazz.defineMethod (c$, "showAllHiddenSeqs", \r
-function () {\r
-if (this.alignment.getHiddenSequences ().getSize () > 0) {\r
-if (this.selectionGroup == null) {\r
-this.selectionGroup =  new jalview.datamodel.SequenceGroup ();\r
-this.selectionGroup.setEndRes (this.alignment.getWidth () - 1);\r
-}var tmp = this.alignment.getHiddenSequences ().showAll (this.hiddenRepSequences);\r
-for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {\r
-this.selectionGroup.addSequence (seq, false);\r
-this.setSequenceAnnotationsVisible (seq, true);\r
-}\r
-this.hiddenRepSequences = null;\r
-this.firePropertyChange ("alignment", null, this.alignment.getSequences ());\r
-this.sendSelection ();\r
-}});\r
-Clazz.defineMethod (c$, "showSequence", \r
-function (index) {\r
-var tmp = this.alignment.getHiddenSequences ().showSequence (index, this.hiddenRepSequences);\r
-if (tmp.size () > 0) {\r
-if (this.selectionGroup == null) {\r
-this.selectionGroup =  new jalview.datamodel.SequenceGroup ();\r
-this.selectionGroup.setEndRes (this.alignment.getWidth () - 1);\r
-}for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {\r
-this.selectionGroup.addSequence (seq, false);\r
-this.setSequenceAnnotationsVisible (seq, true);\r
-}\r
-this.firePropertyChange ("alignment", null, this.alignment.getSequences ());\r
-this.sendSelection ();\r
-}}, "~N");\r
-Clazz.defineMethod (c$, "hideAllSelectedSeqs", \r
-function () {\r
-if (this.selectionGroup == null || this.selectionGroup.getSize () < 1) {\r
-return;\r
-}var seqs = this.selectionGroup.getSequencesInOrder (this.alignment);\r
-this.hideSequence (seqs);\r
-this.setSelectionGroup (null);\r
-});\r
-Clazz.defineMethod (c$, "hideSequence", \r
-function (seq) {\r
-if (seq != null) {\r
-for (var i = 0; i < seq.length; i++) {\r
-this.alignment.getHiddenSequences ().hideSequence (seq[i]);\r
-this.setSequenceAnnotationsVisible (seq[i], false);\r
-}\r
-this.firePropertyChange ("alignment", null, this.alignment.getSequences ());\r
-}}, "~A");\r
-Clazz.defineMethod (c$, "setSequenceAnnotationsVisible", \r
-function (sequenceI, visible) {\r
-for (var ann, $ann = 0, $$ann = this.alignment.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) {\r
-if (ann.sequenceRef === sequenceI) {\r
-ann.visible = visible;\r
-}}\r
-}, "jalview.datamodel.SequenceI,~B");\r
-Clazz.defineMethod (c$, "hideRepSequences", \r
-function (repSequence, sg) {\r
-var sSize = sg.getSize ();\r
-if (sSize < 2) {\r
-return;\r
-}if (this.hiddenRepSequences == null) {\r
-this.hiddenRepSequences =  new java.util.Hashtable ();\r
-}this.hiddenRepSequences.put (repSequence, sg);\r
-var seqs =  new Array (sSize - 1);\r
-var index = 0;\r
-for (var i = 0; i < sSize; i++) {\r
-if (sg.getSequenceAt (i) !== repSequence) {\r
-if (index == sSize - 1) {\r
-return;\r
-}seqs[index++] = sg.getSequenceAt (i);\r
-}}\r
-sg.setSeqrep (repSequence);\r
-sg.setHidereps (true);\r
-this.hideSequence (seqs);\r
-}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup");\r
-Clazz.defineMethod (c$, "isHiddenRepSequence", \r
-function (seq) {\r
-return this.alignment.getSeqrep () === seq || (this.hiddenRepSequences != null && this.hiddenRepSequences.containsKey (seq));\r
-}, "jalview.datamodel.SequenceI");\r
-Clazz.defineMethod (c$, "getRepresentedSequences", \r
-function (seq) {\r
-return (this.hiddenRepSequences == null ? null : this.hiddenRepSequences.get (seq));\r
-}, "jalview.datamodel.SequenceI");\r
-Clazz.overrideMethod (c$, "adjustForHiddenSeqs", \r
-function (alignmentIndex) {\r
-return this.alignment.getHiddenSequences ().adjustForHiddenSeqs (alignmentIndex);\r
-}, "~N");\r
-Clazz.overrideMethod (c$, "invertColumnSelection", \r
-function () {\r
-this.colSel.invertColumnSelection (0, this.alignment.getWidth ());\r
-});\r
-Clazz.overrideMethod (c$, "getSelectionAsNewSequence", \r
-function () {\r
-var sequences;\r
-if (this.selectionGroup == null || this.selectionGroup.getSize () == 0) {\r
-sequences = this.alignment.getSequencesArray ();\r
-var annots = this.alignment.getAlignmentAnnotation ();\r
-for (var i = 0; i < sequences.length; i++) {\r
-sequences[i] =  new jalview.datamodel.Sequence (sequences[i], annots);\r
-}\r
-} else {\r
-sequences = this.selectionGroup.getSelectionAsNewSequences (this.alignment);\r
-}return sequences;\r
-});\r
-Clazz.overrideMethod (c$, "getSequenceSelection", \r
-function () {\r
-var sequences = null;\r
-if (this.selectionGroup != null) {\r
-sequences = this.selectionGroup.getSequencesInOrder (this.alignment);\r
-}if (sequences == null) {\r
-sequences = this.alignment.getSequencesArray ();\r
-}return sequences;\r
-});\r
-Clazz.overrideMethod (c$, "getViewAsCigars", \r
-function (selectedRegionOnly) {\r
-return  new jalview.datamodel.CigarArray (this.alignment, this.colSel, (selectedRegionOnly ? this.selectionGroup : null));\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getAlignmentView", \r
-function (selectedOnly) {\r
-return this.getAlignmentView (selectedOnly, false);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getAlignmentView", \r
-function (selectedOnly, markGroups) {\r
-return  new jalview.datamodel.AlignmentView (this.alignment, this.colSel, this.selectionGroup, this.colSel != null && this.colSel.hasHiddenColumns (), selectedOnly, markGroups);\r
-}, "~B,~B");\r
-Clazz.overrideMethod (c$, "getViewAsString", \r
-function (selectedRegionOnly) {\r
-var selection = null;\r
-var seqs = null;\r
-var i;\r
-var iSize;\r
-var start = 0;\r
-var end = 0;\r
-if (selectedRegionOnly && this.selectionGroup != null) {\r
-iSize = this.selectionGroup.getSize ();\r
-seqs = this.selectionGroup.getSequencesInOrder (this.alignment);\r
-start = this.selectionGroup.getStartRes ();\r
-end = this.selectionGroup.getEndRes () + 1;\r
-} else {\r
-iSize = this.alignment.getHeight ();\r
-seqs = this.alignment.getSequencesArray ();\r
-end = this.alignment.getWidth ();\r
-}selection =  new Array (iSize);\r
-if (this.colSel != null && this.colSel.hasHiddenColumns ()) {\r
-selection = this.colSel.getVisibleSequenceStrings (start, end, seqs);\r
-} else {\r
-for (i = 0; i < iSize; i++) {\r
-selection[i] = seqs[i].getSequenceAsString (start, end);\r
-}\r
-}return selection;\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "getVisibleRegionBoundaries", \r
-function (min, max) {\r
-var regions =  new java.util.ArrayList ();\r
-var start = min;\r
-var end = max;\r
-do {\r
-if (this.colSel != null && this.colSel.hasHiddenColumns ()) {\r
-if (start == 0) {\r
-start = this.colSel.adjustForHiddenColumns (start);\r
-}end = this.colSel.getHiddenBoundaryRight (start);\r
-if (start == end) {\r
-end = max;\r
-}if (end > max) {\r
-end = max;\r
-}}regions.add ( Clazz.newIntArray (-1, [start, end]));\r
-if (this.colSel != null && this.colSel.hasHiddenColumns ()) {\r
-start = this.colSel.adjustForHiddenColumns (end);\r
-start = this.colSel.getHiddenBoundaryLeft (start) + 1;\r
-}} while (end < max);\r
-var startEnd =  Clazz.newIntArray (regions.size (), 2, 0);\r
-return regions;\r
-}, "~N,~N");\r
-Clazz.overrideMethod (c$, "getVisibleAlignmentAnnotation", \r
-function (selectedOnly) {\r
-var ala =  new java.util.ArrayList ();\r
-var aa;\r
-if ((aa = this.alignment.getAlignmentAnnotation ()) != null) {\r
-for (var annot, $annot = 0, $$annot = aa; $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) {\r
-var clone =  new jalview.datamodel.AlignmentAnnotation (annot);\r
-if (selectedOnly && this.selectionGroup != null) {\r
-this.colSel.makeVisibleAnnotation (this.selectionGroup.getStartRes (), this.selectionGroup.getEndRes (), clone);\r
-} else {\r
-this.colSel.makeVisibleAnnotation (clone);\r
-}ala.add (clone);\r
-}\r
-}return ala;\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "isPadGaps", \r
-function () {\r
-return this.padGaps;\r
-});\r
-Clazz.overrideMethod (c$, "setPadGaps", \r
-function (padGaps) {\r
-this.padGaps = padGaps;\r
-}, "~B");\r
-Clazz.overrideMethod (c$, "alignmentChanged", \r
-function (ap) {\r
-if (this.isPadGaps ()) {\r
-this.alignment.padGaps ();\r
-}if (this.autoCalculateConsensus) {\r
-this.updateConsensus (ap);\r
-}if (this.hconsensus != null && this.autoCalculateConsensus) {\r
-this.updateConservation (ap);\r
-}if (this.autoCalculateStrucConsensus) {\r
-this.updateStrucConsensus (ap);\r
-}var alWidth = this.alignment.getWidth ();\r
-var groups = this.alignment.getGroups ();\r
-if (groups != null) {\r
-for (var sg, $sg = groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {\r
-if (sg.getEndRes () > alWidth) {\r
-sg.setEndRes (alWidth - 1);\r
-}}\r
-}if (this.selectionGroup != null && this.selectionGroup.getEndRes () > alWidth) {\r
-this.selectionGroup.setEndRes (alWidth - 1);\r
-}this.resetAllColourSchemes ();\r
-this.calculator.restartWorkers ();\r
-}, "jalview.api.AlignmentViewPanel");\r
-Clazz.defineMethod (c$, "resetAllColourSchemes", \r
-function () {\r
-var cs = this.globalColourScheme;\r
-if (cs != null) {\r
-cs.alignmentChanged (this.alignment, this.hiddenRepSequences);\r
-cs.setConsensus (this.hconsensus);\r
-if (cs.conservationApplied ()) {\r
-cs.setConservation (jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.alignment.getWidth (), false, this.getConsPercGaps (), false));\r
-}}for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {\r
-if (sg.cs != null) {\r
-sg.cs.alignmentChanged (sg, this.hiddenRepSequences);\r
-}sg.recalcConservation ();\r
-}\r
-});\r
-Clazz.defineMethod (c$, "initAutoAnnotation", \r
-function () {\r
-if (this.hconsensus == null && !this.$isDataset) {\r
-if (!this.alignment.isNucleotide ()) {\r
-this.initConservation ();\r
-this.initQuality ();\r
-} else {\r
-this.initRNAStructure ();\r
-}this.consensus =  new jalview.datamodel.AlignmentAnnotation ("Consensus", "PID",  new Array (1), 0, 100, 1);\r
-this.initConsensus (this.consensus);\r
-this.initComplementConsensus ();\r
-}});\r
-Clazz.defineMethod (c$, "initComplementConsensus", \r
-function () {\r
-if (!this.alignment.isNucleotide ()) {\r
-var codonMappings = this.alignment.getCodonFrames ();\r
-if (codonMappings != null && !codonMappings.isEmpty ()) {\r
-this.complementConsensus =  new jalview.datamodel.AlignmentAnnotation ("cDNA Consensus", "PID for cDNA",  new Array (1), 0, 100, 1);\r
-this.initConsensus (this.complementConsensus);\r
-}}});\r
-Clazz.defineMethod (c$, "initConsensus", \r
-($fz = function (aa) {\r
-aa.hasText = true;\r
-aa.autoCalculated = true;\r
-if (this.showConsensus) {\r
-this.alignment.addAnnotation (aa);\r
-}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation");\r
-Clazz.defineMethod (c$, "initConservation", \r
-($fz = function () {\r
-if (this.showConservation) {\r
-if (this.conservation == null) {\r
-this.conservation =  new jalview.datamodel.AlignmentAnnotation ("Conservation", "Conservation of total alignment less than " + this.getConsPercGaps () + "% gaps",  new Array (1), 0, 11, 1);\r
-this.conservation.hasText = true;\r
-this.conservation.autoCalculated = true;\r
-this.alignment.addAnnotation (this.conservation);\r
-}}}, $fz.isPrivate = true, $fz));\r
-Clazz.defineMethod (c$, "initQuality", \r
-($fz = function () {\r
-if (this.showQuality) {\r
-if (this.quality == null) {\r
-this.quality =  new jalview.datamodel.AlignmentAnnotation ("Quality", "Alignment Quality based on Blosum62 scores",  new Array (1), 0, 11, 1);\r
-this.quality.hasText = true;\r
-this.quality.autoCalculated = true;\r
-this.alignment.addAnnotation (this.quality);\r
-}}}, $fz.isPrivate = true, $fz));\r
-Clazz.defineMethod (c$, "initRNAStructure", \r
-($fz = function () {\r
-if (this.alignment.hasRNAStructure () && this.strucConsensus == null) {\r
-this.strucConsensus =  new jalview.datamodel.AlignmentAnnotation ("StrucConsensus", "PID",  new Array (1), 0, 100, 1);\r
-this.strucConsensus.hasText = true;\r
-this.strucConsensus.autoCalculated = true;\r
-if (this.showConsensus) {\r
-this.alignment.addAnnotation (this.strucConsensus);\r
-}}}, $fz.isPrivate = true, $fz));\r
-Clazz.overrideMethod (c$, "calcPanelHeight", \r
-function () {\r
-var anns = this.getAlignment ().getAlignmentAnnotation ();\r
-var height = 0;\r
-var charHeight = this.getCharHeight ();\r
-if (anns != null) {\r
-var graphgrp =  new java.util.BitSet ();\r
-for (var aa, $aa = 0, $$aa = anns; $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) {\r
-if (aa == null) {\r
-System.err.println ("Null annotation row: ignoring.");\r
-continue;\r
-}if (!aa.visible) {\r
-continue;\r
-}if (aa.graphGroup > -1) {\r
-if (graphgrp.get (aa.graphGroup)) {\r
-continue;\r
-} else {\r
-graphgrp.set (aa.graphGroup);\r
-}}aa.height = 0;\r
-if (aa.hasText) {\r
-aa.height += charHeight;\r
-}if (aa.hasIcons) {\r
-aa.height += 16;\r
-}if (aa.graph > 0) {\r
-aa.height += aa.graphHeight;\r
-}if (aa.height == 0) {\r
-aa.height = 20;\r
-}height += aa.height;\r
-}\r
-}if (height == 0) {\r
-height = 20;\r
-}return height;\r
-});\r
-Clazz.overrideMethod (c$, "updateGroupAnnotationSettings", \r
-function (applyGlobalSettings, preserveNewGroupSettings) {\r
-var updateCalcs = false;\r
-var conv = this.isShowGroupConservation ();\r
-var cons = this.isShowGroupConsensus ();\r
-var showprf = this.isShowSequenceLogo ();\r
-var showConsHist = this.isShowConsensusHistogram ();\r
-var normLogo = this.isNormaliseSequenceLogo ();\r
-var sortg = true;\r
-var aan = this.alignment.getAlignmentAnnotation ();\r
-var oldrfs =  new java.util.ArrayList ();\r
-if (aan != null) {\r
-for (var an = 0; an < aan.length; an++) {\r
-if (aan[an].autoCalculated && aan[an].groupRef != null) {\r
-oldrfs.add (aan[an].groupRef);\r
-this.alignment.deleteAnnotation (aan[an], false);\r
-}}\r
-}if (this.alignment.getGroups () != null) {\r
-for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {\r
-updateCalcs = false;\r
-if (applyGlobalSettings || (!preserveNewGroupSettings && !oldrfs.contains (sg))) {\r
-sg.setshowSequenceLogo (showprf);\r
-sg.setShowConsensusHistogram (showConsHist);\r
-sg.setNormaliseSequenceLogo (normLogo);\r
-}if (conv) {\r
-updateCalcs = true;\r
-this.alignment.addAnnotation (sg.getConservationRow (), 0);\r
-}if (cons) {\r
-updateCalcs = true;\r
-this.alignment.addAnnotation (sg.getConsensus (), 0);\r
-}if (updateCalcs) {\r
-sg.recalcConservation ();\r
-}}\r
-}oldrfs.clear ();\r
-}, "~B,~B");\r
-Clazz.defineMethod (c$, "isDisplayReferenceSeq", \r
-function () {\r
-return this.alignment.hasSeqrep () && this.viewStyle.isDisplayReferenceSeq ();\r
-});\r
-Clazz.defineMethod (c$, "setDisplayReferenceSeq", \r
-function (displayReferenceSeq) {\r
-this.viewStyle.setDisplayReferenceSeq (displayReferenceSeq);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isColourByReferenceSeq", \r
-function () {\r
-return this.alignment.hasSeqrep () && this.viewStyle.isColourByReferenceSeq ();\r
-});\r
-Clazz.overrideMethod (c$, "getSequenceColour", \r
-function (seq) {\r
-var sqc = this.sequenceColours.get (seq);\r
-return (sqc == null ? java.awt.Color.white : sqc);\r
-}, "jalview.datamodel.SequenceI");\r
-Clazz.overrideMethod (c$, "setSequenceColour", \r
-function (seq, col) {\r
-if (col == null) {\r
-this.sequenceColours.remove (seq);\r
-} else {\r
-this.sequenceColours.put (seq, col);\r
-}}, "jalview.datamodel.SequenceI,java.awt.Color");\r
-Clazz.overrideMethod (c$, "updateSequenceIdColours", \r
-function () {\r
-for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {\r
-if (sg.idColour != null) {\r
-for (var s, $s = sg.getSequences (this.getHiddenRepSequences ()).iterator (); $s.hasNext () && ((s = $s.next ()) || true);) {\r
-this.sequenceColours.put (s, sg.idColour);\r
-}\r
-}}\r
-});\r
-Clazz.overrideMethod (c$, "clearSequenceColours", \r
-function () {\r
-this.sequenceColours.clear ();\r
-});\r
-Clazz.defineMethod (c$, "getCodingComplement", \r
-function () {\r
-return this.codingComplement;\r
-});\r
-Clazz.defineMethod (c$, "setCodingComplement", \r
-function (av) {\r
-if (this === av) {\r
-System.err.println ("Ignoring recursive setCodingComplement request");\r
-} else {\r
-this.codingComplement = av;\r
-if (av.getCodingComplement () !== this) {\r
-av.setCodingComplement (this);\r
-}}}, "jalview.api.AlignViewportI");\r
-Clazz.overrideMethod (c$, "isNucleotide", \r
-function () {\r
-return this.getAlignment () == null ? false : this.getAlignment ().isNucleotide ();\r
-});\r
-Clazz.overrideMethod (c$, "getFeaturesDisplayed", \r
-function () {\r
-return this.featuresDisplayed;\r
-});\r
-Clazz.overrideMethod (c$, "setFeaturesDisplayed", \r
-function (featuresDisplayedI) {\r
-this.featuresDisplayed = featuresDisplayedI;\r
-}, "jalview.api.FeaturesDisplayedI");\r
-Clazz.overrideMethod (c$, "areFeaturesDisplayed", \r
-function () {\r
-return this.featuresDisplayed != null && this.featuresDisplayed.getRegisterdFeaturesCount () > 0;\r
-});\r
-Clazz.defineMethod (c$, "setShowSequenceFeatures", \r
-function (b) {\r
-this.viewStyle.setShowSequenceFeatures (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowSequenceFeatures", \r
-function () {\r
-return this.viewStyle.isShowSequenceFeatures ();\r
-});\r
-Clazz.defineMethod (c$, "setShowSequenceFeaturesHeight", \r
-function (selected) {\r
-this.viewStyle.setShowSequenceFeaturesHeight (selected);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight", \r
-function () {\r
-return this.viewStyle.isShowSequenceFeaturesHeight ();\r
-});\r
-Clazz.defineMethod (c$, "setShowAnnotation", \r
-function (b) {\r
-this.viewStyle.setShowAnnotation (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowAnnotation", \r
-function () {\r
-return this.viewStyle.isShowAnnotation ();\r
-});\r
-Clazz.defineMethod (c$, "isRightAlignIds", \r
-function () {\r
-return this.viewStyle.isRightAlignIds ();\r
-});\r
-Clazz.defineMethod (c$, "setRightAlignIds", \r
-function (rightAlignIds) {\r
-this.viewStyle.setRightAlignIds (rightAlignIds);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getConservationSelected", \r
-function () {\r
-return this.viewStyle.getConservationSelected ();\r
-});\r
-Clazz.defineMethod (c$, "setShowBoxes", \r
-function (state) {\r
-this.viewStyle.setShowBoxes (state);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getTextColour", \r
-function () {\r
-return this.viewStyle.getTextColour ();\r
-});\r
-Clazz.defineMethod (c$, "getTextColour2", \r
-function () {\r
-return this.viewStyle.getTextColour2 ();\r
-});\r
-Clazz.defineMethod (c$, "getThresholdTextColour", \r
-function () {\r
-return this.viewStyle.getThresholdTextColour ();\r
-});\r
-Clazz.defineMethod (c$, "isConservationColourSelected", \r
-function () {\r
-return this.viewStyle.isConservationColourSelected ();\r
-});\r
-Clazz.defineMethod (c$, "isRenderGaps", \r
-function () {\r
-return this.viewStyle.isRenderGaps ();\r
-});\r
-Clazz.defineMethod (c$, "isShowColourText", \r
-function () {\r
-return this.viewStyle.isShowColourText ();\r
-});\r
-Clazz.defineMethod (c$, "setConservationColourSelected", \r
-function (conservationColourSelected) {\r
-this.viewStyle.setConservationColourSelected (conservationColourSelected);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setShowColourText", \r
-function (showColourText) {\r
-this.viewStyle.setShowColourText (showColourText);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setTextColour", \r
-function (textColour) {\r
-this.viewStyle.setTextColour (textColour);\r
-}, "java.awt.Color");\r
-Clazz.defineMethod (c$, "setThresholdTextColour", \r
-function (thresholdTextColour) {\r
-this.viewStyle.setThresholdTextColour (thresholdTextColour);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setTextColour2", \r
-function (textColour2) {\r
-this.viewStyle.setTextColour2 (textColour2);\r
-}, "java.awt.Color");\r
-Clazz.overrideMethod (c$, "getViewStyle", \r
-function () {\r
-return  new jalview.viewmodel.styles.ViewStyle (this.viewStyle);\r
-});\r
-Clazz.overrideMethod (c$, "setViewStyle", \r
-function (settingsForView) {\r
-this.viewStyle =  new jalview.viewmodel.styles.ViewStyle (settingsForView);\r
-}, "jalview.api.ViewStyleI");\r
-Clazz.defineMethod (c$, "sameStyle", \r
-function (them) {\r
-return this.viewStyle.sameStyle (them);\r
-}, "jalview.api.ViewStyleI");\r
-Clazz.defineMethod (c$, "getIdWidth", \r
-function () {\r
-return this.viewStyle.getIdWidth ();\r
-});\r
-Clazz.defineMethod (c$, "setIdWidth", \r
-function (i) {\r
-this.viewStyle.setIdWidth (i);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "isCentreColumnLabels", \r
-function () {\r
-return this.viewStyle.isCentreColumnLabels ();\r
-});\r
-Clazz.defineMethod (c$, "setCentreColumnLabels", \r
-function (centreColumnLabels) {\r
-this.viewStyle.setCentreColumnLabels (centreColumnLabels);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setShowDBRefs", \r
-function (showdbrefs) {\r
-this.viewStyle.setShowDBRefs (showdbrefs);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowDBRefs", \r
-function () {\r
-return this.viewStyle.isShowDBRefs ();\r
-});\r
-Clazz.defineMethod (c$, "isShowNPFeats", \r
-function () {\r
-return this.viewStyle.isShowNPFeats ();\r
-});\r
-Clazz.defineMethod (c$, "setShowNPFeats", \r
-function (shownpfeats) {\r
-this.viewStyle.setShowNPFeats (shownpfeats);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "addToHistoryList", \r
-function (command) {\r
-if (this.historyList != null) {\r
-this.historyList.push (command);\r
-this.broadcastCommand (command, false);\r
-}}, "jalview.commands.CommandI");\r
-Clazz.defineMethod (c$, "broadcastCommand", \r
-function (command, undo) {\r
-this.getStructureSelectionManager ().commandPerformed (command, undo, this.getVamsasSource ());\r
-}, "jalview.commands.CommandI,~B");\r
-Clazz.defineMethod (c$, "addToRedoList", \r
-function (command) {\r
-if (this.redoList != null) {\r
-this.redoList.push (command);\r
-}this.broadcastCommand (command, true);\r
-}, "jalview.commands.CommandI");\r
-Clazz.defineMethod (c$, "clearRedoList", \r
-function () {\r
-if (this.redoList != null) {\r
-this.redoList.clear ();\r
-}});\r
-Clazz.defineMethod (c$, "setHistoryList", \r
-function (list) {\r
-this.historyList = list;\r
-}, "java.util.Deque");\r
-Clazz.defineMethod (c$, "getHistoryList", \r
-function () {\r
-return this.historyList;\r
-});\r
-Clazz.defineMethod (c$, "setRedoList", \r
-function (list) {\r
-this.redoList = list;\r
-}, "java.util.Deque");\r
-Clazz.defineMethod (c$, "getRedoList", \r
-function () {\r
-return this.redoList;\r
-});\r
-Clazz.overrideMethod (c$, "getVamsasSource", \r
-function () {\r
-return this;\r
-});\r
-Clazz.defineMethod (c$, "getSortAnnotationsBy", \r
-function () {\r
-return this.sortAnnotationsBy;\r
-});\r
-Clazz.defineMethod (c$, "setSortAnnotationsBy", \r
-function (sortAnnotationsBy) {\r
-this.sortAnnotationsBy = sortAnnotationsBy;\r
-}, "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder");\r
-Clazz.defineMethod (c$, "isShowAutocalculatedAbove", \r
-function () {\r
-return this.showAutocalculatedAbove;\r
-});\r
-Clazz.defineMethod (c$, "setShowAutocalculatedAbove", \r
-function (showAutocalculatedAbove) {\r
-this.showAutocalculatedAbove = showAutocalculatedAbove;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isScaleProteinAsCdna", \r
-function () {\r
-return this.viewStyle.isScaleProteinAsCdna ();\r
-});\r
-Clazz.defineMethod (c$, "setScaleProteinAsCdna", \r
-function (b) {\r
-this.viewStyle.setScaleProteinAsCdna (b);\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isFollowHighlight", \r
-function () {\r
-return this.followHighlight;\r
-});\r
-Clazz.overrideMethod (c$, "setFollowHighlight", \r
-function (b) {\r
-this.followHighlight = b;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getStartRes", \r
-function () {\r
-return this.startRes;\r
-});\r
-Clazz.overrideMethod (c$, "getEndRes", \r
-function () {\r
-return this.endRes;\r
-});\r
-Clazz.defineMethod (c$, "getStartSeq", \r
-function () {\r
-return this.startSeq;\r
-});\r
-Clazz.defineMethod (c$, "setStartRes", \r
-function (res) {\r
-this.startRes = res;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setStartSeq", \r
-function (seq) {\r
-this.startSeq = seq;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setEndRes", \r
-function (res) {\r
-if (res > this.alignment.getWidth () - 1) {\r
-res = this.alignment.getWidth () - 1;\r
-}if (res < 0) {\r
-res = 0;\r
-}this.endRes = res;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setEndSeq", \r
-function (seq) {\r
-if (seq > this.alignment.getHeight ()) {\r
-seq = this.alignment.getHeight ();\r
-}if (seq < 0) {\r
-seq = 0;\r
-}this.endSeq = seq;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getEndSeq", \r
-function () {\r
-return this.endSeq;\r
-});\r
-Clazz.defineMethod (c$, "findComplementScrollTarget", \r
-function (sr) {\r
-var complement = this.getCodingComplement ();\r
-if (complement == null || !complement.isFollowHighlight ()) {\r
-return 0;\r
-}var iAmProtein = !this.getAlignment ().isNucleotide ();\r
-var proteinAlignment = iAmProtein ? this.getAlignment () : complement.getAlignment ();\r
-if (proteinAlignment == null) {\r
-return 0;\r
-}var mappings = proteinAlignment.getCodonFrames ();\r
-var seqOffset = 0;\r
-var sequence = null;\r
-var middleColumn = this.getStartRes () + Clazz.doubleToInt ((this.getEndRes () - this.getStartRes ()) / 2);\r
-var hiddenSequences = this.getAlignment ().getHiddenSequences ();\r
-for (var seqNo = this.getStartSeq (); seqNo < this.getEndSeq (); seqNo++, seqOffset++) {\r
-sequence = this.getAlignment ().getSequenceAt (seqNo);\r
-if (hiddenSequences != null && hiddenSequences.isHidden (sequence)) {\r
-continue;\r
-}if (jalview.util.Comparison.isGap (sequence.getCharAt (middleColumn))) {\r
-continue;\r
-}var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (sequence, mappings);\r
-if (!seqMappings.isEmpty ()) {\r
-break;\r
-}}\r
-if (sequence == null) {\r
-return 0;\r
-}jalview.util.MappingUtils.addSearchResults (sr, sequence, sequence.findPosition (middleColumn), mappings);\r
-return seqOffset;\r
-}, "jalview.datamodel.SearchResults");\r
-});\r
+Clazz.declarePackage ("jalview.viewmodel");
+Clazz.load (["jalview.api.AlignViewportI", "jalview.structure.CommandListener", "$.VamsasSource", "jalview.datamodel.ColumnSelection", "jalview.viewmodel.styles.ViewStyle", "jalview.workers.AlignCalcManager", "java.beans.PropertyChangeSupport", "java.util.ArrayDeque", "$.HashMap"], "jalview.viewmodel.AlignmentViewport", ["jalview.analysis.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.AlignmentView", "$.CigarArray", "$.Sequence", "$.SequenceGroup", "jalview.schemes.Blosum62ColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "jalview.util.Comparison", "$.MappingUtils", "jalview.workers.ComplementConsensusThread", "$.ConsensusThread", "$.ConservationThread", "$.StrucConsensusThread", "java.awt.Color", "java.util.ArrayList", "$.BitSet", "$.Hashtable"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.viewStyle = null;
+this.codingComplement = null;
+this.featuresDisplayed = null;
+this.historyList = null;
+this.redoList = null;
+this.alignment = null;
+this.sequenceSetID = null;
+this.$isDataset = false;
+this.hiddenRepSequences = null;
+this.colSel = null;
+this.autoCalculateConsensus = true;
+this.autoCalculateStrucConsensus = true;
+this.ignoreGapsInConsensusCalculation = false;
+this.globalColourScheme = null;
+this.consensus = null;
+this.complementConsensus = null;
+this.strucConsensus = null;
+this.conservation = null;
+this.quality = null;
+this.groupConsensus = null;
+this.groupConservation = null;
+this.hconsensus = null;
+this.hcomplementConsensus = null;
+this.hStrucConsensus = null;
+this.hconservation = null;
+this.ConsPercGaps = 25;
+this.calculator = null;
+this.showGroupConservation = false;
+this.showGroupConsensus = false;
+this.showSequenceLogo = false;
+this.normaliseSequenceLogo = false;
+this.showConsensusHistogram = true;
+this.padGaps = false;
+this.sortByTree = false;
+this.selectionGroup = null;
+this.viewId = null;
+this.sgrouphash = -1;
+this.colselhash = -1;
+this.changeSupport = null;
+this.showConservation = true;
+this.showQuality = true;
+this.showConsensus = true;
+this.sequenceColours = null;
+this.sortAnnotationsBy = null;
+this.showAutocalculatedAbove = false;
+this.followHighlight = true;
+this.startRes = 0;
+this.endRes = 0;
+this.startSeq = 0;
+this.endSeq = 0;
+Clazz.instantialize (this, arguments);
+}, jalview.viewmodel, "AlignmentViewport", null, [jalview.api.AlignViewportI, jalview.structure.CommandListener, jalview.structure.VamsasSource]);
+Clazz.prepareFields (c$, function () {
+this.viewStyle =  new jalview.viewmodel.styles.ViewStyle ();
+this.historyList =  new java.util.ArrayDeque ();
+this.redoList =  new java.util.ArrayDeque ();
+this.colSel =  new jalview.datamodel.ColumnSelection ();
+this.calculator =  new jalview.workers.AlignCalcManager ();
+this.changeSupport =  new java.beans.PropertyChangeSupport (this);
+this.sequenceColours =  new java.util.HashMap ();
+});
+Clazz.defineMethod (c$, "setFontName", 
+function (name) {
+this.viewStyle.setFontName (name);
+}, "~S");
+Clazz.defineMethod (c$, "setFontStyle", 
+function (style) {
+this.viewStyle.setFontStyle (style);
+}, "~N");
+Clazz.defineMethod (c$, "setFontSize", 
+function (size) {
+this.viewStyle.setFontSize (size);
+}, "~N");
+Clazz.defineMethod (c$, "getFontStyle", 
+function () {
+return this.viewStyle.getFontStyle ();
+});
+Clazz.defineMethod (c$, "getFontName", 
+function () {
+return this.viewStyle.getFontName ();
+});
+Clazz.defineMethod (c$, "getFontSize", 
+function () {
+return this.viewStyle.getFontSize ();
+});
+Clazz.defineMethod (c$, "setUpperCasebold", 
+function (upperCasebold) {
+this.viewStyle.setUpperCasebold (upperCasebold);
+}, "~B");
+Clazz.defineMethod (c$, "isUpperCasebold", 
+function () {
+return this.viewStyle.isUpperCasebold ();
+});
+Clazz.defineMethod (c$, "isSeqNameItalics", 
+function () {
+return this.viewStyle.isSeqNameItalics ();
+});
+Clazz.defineMethod (c$, "setColourByReferenceSeq", 
+function (colourByReferenceSeq) {
+this.viewStyle.setColourByReferenceSeq (colourByReferenceSeq);
+}, "~B");
+Clazz.defineMethod (c$, "setColourAppliesToAllGroups", 
+function (b) {
+this.viewStyle.setColourAppliesToAllGroups (b);
+}, "~B");
+Clazz.defineMethod (c$, "getColourAppliesToAllGroups", 
+function () {
+return this.viewStyle.getColourAppliesToAllGroups ();
+});
+Clazz.defineMethod (c$, "getAbovePIDThreshold", 
+function () {
+return this.viewStyle.getAbovePIDThreshold ();
+});
+Clazz.defineMethod (c$, "setIncrement", 
+function (inc) {
+this.viewStyle.setIncrement (inc);
+}, "~N");
+Clazz.defineMethod (c$, "getIncrement", 
+function () {
+return this.viewStyle.getIncrement ();
+});
+Clazz.defineMethod (c$, "setConservationSelected", 
+function (b) {
+this.viewStyle.setConservationSelected (b);
+}, "~B");
+Clazz.defineMethod (c$, "setShowHiddenMarkers", 
+function (show) {
+this.viewStyle.setShowHiddenMarkers (show);
+}, "~B");
+Clazz.defineMethod (c$, "getShowHiddenMarkers", 
+function () {
+return this.viewStyle.getShowHiddenMarkers ();
+});
+Clazz.defineMethod (c$, "setScaleRightWrapped", 
+function (b) {
+this.viewStyle.setScaleRightWrapped (b);
+}, "~B");
+Clazz.defineMethod (c$, "setScaleLeftWrapped", 
+function (b) {
+this.viewStyle.setScaleLeftWrapped (b);
+}, "~B");
+Clazz.defineMethod (c$, "setScaleAboveWrapped", 
+function (b) {
+this.viewStyle.setScaleAboveWrapped (b);
+}, "~B");
+Clazz.defineMethod (c$, "getScaleLeftWrapped", 
+function () {
+return this.viewStyle.getScaleLeftWrapped ();
+});
+Clazz.defineMethod (c$, "getScaleAboveWrapped", 
+function () {
+return this.viewStyle.getScaleAboveWrapped ();
+});
+Clazz.defineMethod (c$, "getScaleRightWrapped", 
+function () {
+return this.viewStyle.getScaleRightWrapped ();
+});
+Clazz.defineMethod (c$, "setAbovePIDThreshold", 
+function (b) {
+this.viewStyle.setAbovePIDThreshold (b);
+}, "~B");
+Clazz.defineMethod (c$, "setThreshold", 
+function (thresh) {
+this.viewStyle.setThreshold (thresh);
+}, "~N");
+Clazz.defineMethod (c$, "getThreshold", 
+function () {
+return this.viewStyle.getThreshold ();
+});
+Clazz.defineMethod (c$, "getShowJVSuffix", 
+function () {
+return this.viewStyle.getShowJVSuffix ();
+});
+Clazz.defineMethod (c$, "setShowJVSuffix", 
+function (b) {
+this.viewStyle.setShowJVSuffix (b);
+}, "~B");
+Clazz.defineMethod (c$, "setWrapAlignment", 
+function (state) {
+this.viewStyle.setWrapAlignment (state);
+}, "~B");
+Clazz.defineMethod (c$, "setShowText", 
+function (state) {
+this.viewStyle.setShowText (state);
+}, "~B");
+Clazz.defineMethod (c$, "setRenderGaps", 
+function (state) {
+this.viewStyle.setRenderGaps (state);
+}, "~B");
+Clazz.defineMethod (c$, "getColourText", 
+function () {
+return this.viewStyle.getColourText ();
+});
+Clazz.defineMethod (c$, "setColourText", 
+function (state) {
+this.viewStyle.setColourText (state);
+}, "~B");
+Clazz.defineMethod (c$, "getWrapAlignment", 
+function () {
+return this.viewStyle.getWrapAlignment ();
+});
+Clazz.defineMethod (c$, "getShowText", 
+function () {
+return this.viewStyle.getShowText ();
+});
+Clazz.defineMethod (c$, "getWrappedWidth", 
+function () {
+return this.viewStyle.getWrappedWidth ();
+});
+Clazz.defineMethod (c$, "setWrappedWidth", 
+function (w) {
+this.viewStyle.setWrappedWidth (w);
+}, "~N");
+Clazz.defineMethod (c$, "getCharHeight", 
+function () {
+return this.viewStyle.getCharHeight ();
+});
+Clazz.defineMethod (c$, "setCharHeight", 
+function (h) {
+this.viewStyle.setCharHeight (h);
+}, "~N");
+Clazz.defineMethod (c$, "getCharWidth", 
+function () {
+return this.viewStyle.getCharWidth ();
+});
+Clazz.defineMethod (c$, "setCharWidth", 
+function (w) {
+this.viewStyle.setCharWidth (w);
+}, "~N");
+Clazz.defineMethod (c$, "getShowBoxes", 
+function () {
+return this.viewStyle.getShowBoxes ();
+});
+Clazz.defineMethod (c$, "getShowUnconserved", 
+function () {
+return this.viewStyle.getShowUnconserved ();
+});
+Clazz.defineMethod (c$, "setShowUnconserved", 
+function (showunconserved) {
+this.viewStyle.setShowUnconserved (showunconserved);
+}, "~B");
+Clazz.defineMethod (c$, "setSeqNameItalics", 
+function (default1) {
+this.viewStyle.setSeqNameItalics (default1);
+}, "~B");
+Clazz.defineMethod (c$, "getAlignment", 
+function () {
+return this.alignment;
+});
+Clazz.overrideMethod (c$, "getGapCharacter", 
+function () {
+return this.alignment.getGapCharacter ();
+});
+Clazz.defineMethod (c$, "setDataset", 
+function (b) {
+this.$isDataset = b;
+}, "~B");
+Clazz.defineMethod (c$, "isDataset", 
+function () {
+return this.$isDataset;
+});
+Clazz.overrideMethod (c$, "setGlobalColourScheme", 
+function (cs) {
+this.globalColourScheme = cs;
+var recalc = false;
+if (cs != null) {
+cs.setConservationApplied (recalc = this.getConservationSelected ());
+if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) {
+recalc = true;
+cs.setThreshold (this.viewStyle.getThreshold (), this.ignoreGapsInConsensusCalculation);
+} else {
+cs.setThreshold (0, this.ignoreGapsInConsensusCalculation);
+}if (recalc) {
+cs.setConsensus (this.hconsensus);
+cs.setConservation (this.hconservation);
+}cs.alignmentChanged (this.alignment, this.hiddenRepSequences);
+}if (this.getColourAppliesToAllGroups ()) {
+for (var sg, $sg = this.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
+if (cs == null) {
+sg.cs = null;
+continue;
+}sg.cs = cs.applyTo (sg, this.getHiddenRepSequences ());
+sg.setConsPercGaps (this.ConsPercGaps);
+if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) {
+sg.cs.setThreshold (this.viewStyle.getThreshold (), this.isIgnoreGapsConsensus ());
+recalc = true;
+} else {
+sg.cs.setThreshold (0, this.isIgnoreGapsConsensus ());
+}if (this.getConservationSelected ()) {
+sg.cs.setConservationApplied (true);
+recalc = true;
+} else {
+sg.cs.setConservation (null);
+}if (recalc) {
+sg.recalcConservation ();
+} else {
+sg.cs.alignmentChanged (sg, this.hiddenRepSequences);
+}}
+}}, "jalview.schemes.ColourSchemeI");
+Clazz.overrideMethod (c$, "getGlobalColourScheme", 
+function () {
+return this.globalColourScheme;
+});
+Clazz.overrideMethod (c$, "setConservation", 
+function (cons) {
+this.hconservation = cons;
+}, "jalview.analysis.Conservation");
+Clazz.overrideMethod (c$, "getConsPercGaps", 
+function () {
+return this.ConsPercGaps;
+});
+Clazz.overrideMethod (c$, "setSequenceConsensusHash", 
+function (hconsensus) {
+this.hconsensus = hconsensus;
+}, "~A");
+Clazz.overrideMethod (c$, "setComplementConsensusHash", 
+function (hconsensus) {
+this.hcomplementConsensus = hconsensus;
+}, "~A");
+Clazz.overrideMethod (c$, "getSequenceConsensusHash", 
+function () {
+return this.hconsensus;
+});
+Clazz.overrideMethod (c$, "getComplementConsensusHash", 
+function () {
+return this.hcomplementConsensus;
+});
+Clazz.overrideMethod (c$, "getRnaStructureConsensusHash", 
+function () {
+return this.hStrucConsensus;
+});
+Clazz.overrideMethod (c$, "setRnaStructureConsensusHash", 
+function (hStrucConsensus) {
+this.hStrucConsensus = hStrucConsensus;
+}, "~A");
+Clazz.overrideMethod (c$, "getAlignmentQualityAnnot", 
+function () {
+return this.quality;
+});
+Clazz.overrideMethod (c$, "getAlignmentConservationAnnotation", 
+function () {
+return this.conservation;
+});
+Clazz.overrideMethod (c$, "getAlignmentConsensusAnnotation", 
+function () {
+return this.consensus;
+});
+Clazz.overrideMethod (c$, "getComplementConsensusAnnotation", 
+function () {
+return this.complementConsensus;
+});
+Clazz.overrideMethod (c$, "getAlignmentStrucConsensusAnnotation", 
+function () {
+return this.strucConsensus;
+});
+Clazz.defineMethod (c$, "updateConservation", 
+function (ap) {
+if (this.alignment.isNucleotide () || this.conservation == null || !this.autoCalculateConsensus) {
+return;
+}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConservationThread) == null) {
+this.calculator.registerWorker ( new jalview.workers.ConservationThread (this, ap));
+}}, "jalview.api.AlignmentViewPanel");
+Clazz.defineMethod (c$, "updateConsensus", 
+function (ap) {
+if (this.consensus == null || !this.autoCalculateConsensus) {
+return;
+}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConsensusThread) == null) {
+this.calculator.registerWorker ( new jalview.workers.ConsensusThread (this, ap));
+}var al = this.getAlignment ();
+if (!al.isNucleotide () && al.getCodonFrames () != null && !al.getCodonFrames ().isEmpty ()) {
+if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ComplementConsensusThread) == null) {
+this.calculator.registerWorker ( new jalview.workers.ComplementConsensusThread (this, ap));
+}}}, "jalview.api.AlignmentViewPanel");
+Clazz.defineMethod (c$, "updateStrucConsensus", 
+function (ap) {
+if (this.autoCalculateStrucConsensus && this.strucConsensus == null && this.alignment.isNucleotide () && this.alignment.hasRNAStructure ()) {
+this.initRNAStructure ();
+}if (this.strucConsensus == null || !this.autoCalculateStrucConsensus) {
+return;
+}if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.StrucConsensusThread) == null) {
+this.calculator.registerWorker ( new jalview.workers.StrucConsensusThread (this, ap));
+}}, "jalview.api.AlignmentViewPanel");
+Clazz.defineMethod (c$, "isCalcInProgress", 
+function () {
+return this.calculator.isWorking ();
+});
+Clazz.overrideMethod (c$, "isCalculationInProgress", 
+function (alignmentAnnotation) {
+if (!alignmentAnnotation.autoCalculated) {
+return false;
+}if (this.calculator.workingInvolvedWith (alignmentAnnotation)) {
+return true;
+}return false;
+}, "jalview.datamodel.AlignmentAnnotation");
+Clazz.overrideMethod (c$, "isClosed", 
+function () {
+return this.alignment == null;
+});
+Clazz.overrideMethod (c$, "getCalcManager", 
+function () {
+return this.calculator;
+});
+Clazz.overrideMethod (c$, "isShowSequenceLogo", 
+function () {
+return this.showSequenceLogo;
+});
+Clazz.defineMethod (c$, "setShowSequenceLogo", 
+function (showSequenceLogo) {
+if (showSequenceLogo != this.showSequenceLogo) {
+this.showSequenceLogo = showSequenceLogo;
+this.calculator.updateAnnotationFor (jalview.workers.ConsensusThread);
+this.calculator.updateAnnotationFor (jalview.workers.ComplementConsensusThread);
+this.calculator.updateAnnotationFor (jalview.workers.StrucConsensusThread);
+}this.showSequenceLogo = showSequenceLogo;
+}, "~B");
+Clazz.defineMethod (c$, "setShowConsensusHistogram", 
+function (showConsensusHistogram) {
+this.showConsensusHistogram = showConsensusHistogram;
+}, "~B");
+Clazz.defineMethod (c$, "isShowGroupConservation", 
+function () {
+return this.showGroupConservation;
+});
+Clazz.defineMethod (c$, "setShowGroupConservation", 
+function (showGroupConservation) {
+this.showGroupConservation = showGroupConservation;
+}, "~B");
+Clazz.defineMethod (c$, "isShowGroupConsensus", 
+function () {
+return this.showGroupConsensus;
+});
+Clazz.defineMethod (c$, "setShowGroupConsensus", 
+function (showGroupConsensus) {
+this.showGroupConsensus = showGroupConsensus;
+}, "~B");
+Clazz.overrideMethod (c$, "isShowConsensusHistogram", 
+function () {
+return this.showConsensusHistogram;
+});
+Clazz.overrideMethod (c$, "getSelectionGroup", 
+function () {
+return this.selectionGroup;
+});
+Clazz.overrideMethod (c$, "setSelectionGroup", 
+function (sg) {
+this.selectionGroup = sg;
+}, "jalview.datamodel.SequenceGroup");
+Clazz.defineMethod (c$, "setHiddenColumns", 
+function (colsel) {
+this.colSel = colsel;
+}, "jalview.datamodel.ColumnSelection");
+Clazz.overrideMethod (c$, "getColumnSelection", 
+function () {
+return this.colSel;
+});
+Clazz.overrideMethod (c$, "setColumnSelection", 
+function (colSel) {
+this.colSel = colSel;
+if (colSel != null) {
+this.updateHiddenColumns ();
+}}, "jalview.datamodel.ColumnSelection");
+Clazz.overrideMethod (c$, "getHiddenRepSequences", 
+function () {
+return this.hiddenRepSequences;
+});
+Clazz.overrideMethod (c$, "setHiddenRepSequences", 
+function (hiddenRepSequences) {
+this.hiddenRepSequences = hiddenRepSequences;
+}, "java.util.Map");
+Clazz.overrideMethod (c$, "hasHiddenColumns", 
+function () {
+return this.colSel != null && this.colSel.hasHiddenColumns ();
+});
+Clazz.defineMethod (c$, "updateHiddenColumns", 
+function () {
+});
+Clazz.overrideMethod (c$, "hasHiddenRows", 
+function () {
+return this.alignment.getHiddenSequences ().getSize () > 0;
+});
+Clazz.defineMethod (c$, "setSequenceSetId", 
+function (newid) {
+if (this.sequenceSetID != null) {
+System.err.println ("Warning - overwriting a sequenceSetId for a viewport!");
+}this.sequenceSetID =  String.instantialize (newid);
+}, "~S");
+Clazz.overrideMethod (c$, "getSequenceSetId", 
+function () {
+if (this.sequenceSetID == null) {
+this.sequenceSetID = this.alignment.hashCode () + "";
+}return this.sequenceSetID;
+});
+Clazz.overrideMethod (c$, "getViewId", 
+function () {
+if (this.viewId == null) {
+this.viewId = this.getSequenceSetId () + "." + this.hashCode () + "";
+}return this.viewId;
+});
+Clazz.defineMethod (c$, "setIgnoreGapsConsensus", 
+function (b, ap) {
+this.ignoreGapsInConsensusCalculation = b;
+if (ap != null) {
+this.updateConsensus (ap);
+if (this.globalColourScheme != null) {
+this.globalColourScheme.setThreshold (this.globalColourScheme.getThreshold (), this.ignoreGapsInConsensusCalculation);
+}}}, "~B,jalview.api.AlignmentViewPanel");
+Clazz.defineMethod (c$, "isSelectionGroupChanged", 
+function (b) {
+var hc = (this.selectionGroup == null || this.selectionGroup.getSize () == 0) ? -1 : this.selectionGroup.hashCode ();
+if (hc != -1 && hc != this.sgrouphash) {
+if (b) {
+this.sgrouphash = hc;
+}return true;
+}return false;
+}, "~B");
+Clazz.defineMethod (c$, "isColSelChanged", 
+function (b) {
+var hc = (this.colSel == null || this.colSel.size () == 0) ? -1 : this.colSel.hashCode ();
+if (hc != -1 && hc != this.colselhash) {
+if (b) {
+this.colselhash = hc;
+}return true;
+}return false;
+}, "~B");
+Clazz.overrideMethod (c$, "isIgnoreGapsConsensus", 
+function () {
+return this.ignoreGapsInConsensusCalculation;
+});
+Clazz.defineMethod (c$, "addPropertyChangeListener", 
+function (listener) {
+this.changeSupport.addPropertyChangeListener (listener);
+}, "java.beans.PropertyChangeListener");
+Clazz.defineMethod (c$, "removePropertyChangeListener", 
+function (listener) {
+this.changeSupport.removePropertyChangeListener (listener);
+}, "java.beans.PropertyChangeListener");
+Clazz.defineMethod (c$, "firePropertyChange", 
+function (prop, oldvalue, newvalue) {
+this.changeSupport.firePropertyChange (prop, oldvalue, newvalue);
+}, "~S,~O,~O");
+Clazz.defineMethod (c$, "hideSelectedColumns", 
+function () {
+if (this.colSel.size () < 1) {
+return;
+}this.colSel.hideSelectedColumns ();
+this.setSelectionGroup (null);
+});
+Clazz.defineMethod (c$, "hideColumns", 
+function (start, end) {
+if (start == end) {
+this.colSel.hideColumns (start);
+} else {
+this.colSel.hideColumns (start, end);
+}}, "~N,~N");
+Clazz.defineMethod (c$, "showColumn", 
+function (col) {
+this.colSel.revealHiddenColumns (col);
+}, "~N");
+Clazz.defineMethod (c$, "showAllHiddenColumns", 
+function () {
+this.colSel.revealAllHiddenColumns ();
+});
+Clazz.defineMethod (c$, "showAllHiddenSeqs", 
+function () {
+if (this.alignment.getHiddenSequences ().getSize () > 0) {
+if (this.selectionGroup == null) {
+this.selectionGroup =  new jalview.datamodel.SequenceGroup ();
+this.selectionGroup.setEndRes (this.alignment.getWidth () - 1);
+}var tmp = this.alignment.getHiddenSequences ().showAll (this.hiddenRepSequences);
+for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
+this.selectionGroup.addSequence (seq, false);
+this.setSequenceAnnotationsVisible (seq, true);
+}
+this.hiddenRepSequences = null;
+this.firePropertyChange ("alignment", null, this.alignment.getSequences ());
+this.sendSelection ();
+}});
+Clazz.defineMethod (c$, "showSequence", 
+function (index) {
+var tmp = this.alignment.getHiddenSequences ().showSequence (index, this.hiddenRepSequences);
+if (tmp.size () > 0) {
+if (this.selectionGroup == null) {
+this.selectionGroup =  new jalview.datamodel.SequenceGroup ();
+this.selectionGroup.setEndRes (this.alignment.getWidth () - 1);
+}for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
+this.selectionGroup.addSequence (seq, false);
+this.setSequenceAnnotationsVisible (seq, true);
+}
+this.firePropertyChange ("alignment", null, this.alignment.getSequences ());
+this.sendSelection ();
+}}, "~N");
+Clazz.defineMethod (c$, "hideAllSelectedSeqs", 
+function () {
+if (this.selectionGroup == null || this.selectionGroup.getSize () < 1) {
+return;
+}var seqs = this.selectionGroup.getSequencesInOrder (this.alignment);
+this.hideSequence (seqs);
+this.setSelectionGroup (null);
+});
+Clazz.defineMethod (c$, "hideSequence", 
+function (seq) {
+if (seq != null) {
+for (var i = 0; i < seq.length; i++) {
+this.alignment.getHiddenSequences ().hideSequence (seq[i]);
+this.setSequenceAnnotationsVisible (seq[i], false);
+}
+this.firePropertyChange ("alignment", null, this.alignment.getSequences ());
+}}, "~A");
+Clazz.defineMethod (c$, "setSequenceAnnotationsVisible", 
+function (sequenceI, visible) {
+for (var ann, $ann = 0, $$ann = this.alignment.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) {
+if (ann.sequenceRef === sequenceI) {
+ann.visible = visible;
+}}
+}, "jalview.datamodel.SequenceI,~B");
+Clazz.defineMethod (c$, "hideRepSequences", 
+function (repSequence, sg) {
+var sSize = sg.getSize ();
+if (sSize < 2) {
+return;
+}if (this.hiddenRepSequences == null) {
+this.hiddenRepSequences =  new java.util.Hashtable ();
+}this.hiddenRepSequences.put (repSequence, sg);
+var seqs =  new Array (sSize - 1);
+var index = 0;
+for (var i = 0; i < sSize; i++) {
+if (sg.getSequenceAt (i) !== repSequence) {
+if (index == sSize - 1) {
+return;
+}seqs[index++] = sg.getSequenceAt (i);
+}}
+sg.setSeqrep (repSequence);
+sg.setHidereps (true);
+this.hideSequence (seqs);
+}, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup");
+Clazz.defineMethod (c$, "isHiddenRepSequence", 
+function (seq) {
+return this.alignment.getSeqrep () === seq || (this.hiddenRepSequences != null && this.hiddenRepSequences.containsKey (seq));
+}, "jalview.datamodel.SequenceI");
+Clazz.defineMethod (c$, "getRepresentedSequences", 
+function (seq) {
+return (this.hiddenRepSequences == null ? null : this.hiddenRepSequences.get (seq));
+}, "jalview.datamodel.SequenceI");
+Clazz.overrideMethod (c$, "adjustForHiddenSeqs", 
+function (alignmentIndex) {
+return this.alignment.getHiddenSequences ().adjustForHiddenSeqs (alignmentIndex);
+}, "~N");
+Clazz.overrideMethod (c$, "invertColumnSelection", 
+function () {
+this.colSel.invertColumnSelection (0, this.alignment.getWidth ());
+});
+Clazz.overrideMethod (c$, "getSelectionAsNewSequence", 
+function () {
+var sequences;
+if (this.selectionGroup == null || this.selectionGroup.getSize () == 0) {
+sequences = this.alignment.getSequencesArray ();
+var annots = this.alignment.getAlignmentAnnotation ();
+for (var i = 0; i < sequences.length; i++) {
+sequences[i] =  new jalview.datamodel.Sequence (sequences[i], annots);
+}
+} else {
+sequences = this.selectionGroup.getSelectionAsNewSequences (this.alignment);
+}return sequences;
+});
+Clazz.overrideMethod (c$, "getSequenceSelection", 
+function () {
+var sequences = null;
+if (this.selectionGroup != null) {
+sequences = this.selectionGroup.getSequencesInOrder (this.alignment);
+}if (sequences == null) {
+sequences = this.alignment.getSequencesArray ();
+}return sequences;
+});
+Clazz.overrideMethod (c$, "getViewAsCigars", 
+function (selectedRegionOnly) {
+return  new jalview.datamodel.CigarArray (this.alignment, this.colSel, (selectedRegionOnly ? this.selectionGroup : null));
+}, "~B");
+Clazz.defineMethod (c$, "getAlignmentView", 
+function (selectedOnly) {
+return this.getAlignmentView (selectedOnly, false);
+}, "~B");
+Clazz.defineMethod (c$, "getAlignmentView", 
+function (selectedOnly, markGroups) {
+return  new jalview.datamodel.AlignmentView (this.alignment, this.colSel, this.selectionGroup, this.colSel != null && this.colSel.hasHiddenColumns (), selectedOnly, markGroups);
+}, "~B,~B");
+Clazz.overrideMethod (c$, "getViewAsString", 
+function (selectedRegionOnly) {
+var selection = null;
+var seqs = null;
+var i;
+var iSize;
+var start = 0;
+var end = 0;
+if (selectedRegionOnly && this.selectionGroup != null) {
+iSize = this.selectionGroup.getSize ();
+seqs = this.selectionGroup.getSequencesInOrder (this.alignment);
+start = this.selectionGroup.getStartRes ();
+end = this.selectionGroup.getEndRes () + 1;
+} else {
+iSize = this.alignment.getHeight ();
+seqs = this.alignment.getSequencesArray ();
+end = this.alignment.getWidth ();
+}selection =  new Array (iSize);
+if (this.colSel != null && this.colSel.hasHiddenColumns ()) {
+selection = this.colSel.getVisibleSequenceStrings (start, end, seqs);
+} else {
+for (i = 0; i < iSize; i++) {
+selection[i] = seqs[i].getSequenceAsString (start, end);
+}
+}return selection;
+}, "~B");
+Clazz.overrideMethod (c$, "getVisibleRegionBoundaries", 
+function (min, max) {
+var regions =  new java.util.ArrayList ();
+var start = min;
+var end = max;
+do {
+if (this.colSel != null && this.colSel.hasHiddenColumns ()) {
+if (start == 0) {
+start = this.colSel.adjustForHiddenColumns (start);
+}end = this.colSel.getHiddenBoundaryRight (start);
+if (start == end) {
+end = max;
+}if (end > max) {
+end = max;
+}}regions.add ( Clazz.newIntArray (-1, [start, end]));
+if (this.colSel != null && this.colSel.hasHiddenColumns ()) {
+start = this.colSel.adjustForHiddenColumns (end);
+start = this.colSel.getHiddenBoundaryLeft (start) + 1;
+}} while (end < max);
+var startEnd =  Clazz.newIntArray (regions.size (), 2, 0);
+return regions;
+}, "~N,~N");
+Clazz.overrideMethod (c$, "getVisibleAlignmentAnnotation", 
+function (selectedOnly) {
+var ala =  new java.util.ArrayList ();
+var aa;
+if ((aa = this.alignment.getAlignmentAnnotation ()) != null) {
+for (var annot, $annot = 0, $$annot = aa; $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) {
+var clone =  new jalview.datamodel.AlignmentAnnotation (annot);
+if (selectedOnly && this.selectionGroup != null) {
+this.colSel.makeVisibleAnnotation (this.selectionGroup.getStartRes (), this.selectionGroup.getEndRes (), clone);
+} else {
+this.colSel.makeVisibleAnnotation (clone);
+}ala.add (clone);
+}
+}return ala;
+}, "~B");
+Clazz.overrideMethod (c$, "isPadGaps", 
+function () {
+return this.padGaps;
+});
+Clazz.overrideMethod (c$, "setPadGaps", 
+function (padGaps) {
+this.padGaps = padGaps;
+}, "~B");
+Clazz.overrideMethod (c$, "alignmentChanged", 
+function (ap) {
+if (this.isPadGaps ()) {
+this.alignment.padGaps ();
+}if (this.autoCalculateConsensus) {
+this.updateConsensus (ap);
+}if (this.hconsensus != null && this.autoCalculateConsensus) {
+this.updateConservation (ap);
+}if (this.autoCalculateStrucConsensus) {
+this.updateStrucConsensus (ap);
+}var alWidth = this.alignment.getWidth ();
+var groups = this.alignment.getGroups ();
+if (groups != null) {
+for (var sg, $sg = groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
+if (sg.getEndRes () > alWidth) {
+sg.setEndRes (alWidth - 1);
+}}
+}if (this.selectionGroup != null && this.selectionGroup.getEndRes () > alWidth) {
+this.selectionGroup.setEndRes (alWidth - 1);
+}this.resetAllColourSchemes ();
+this.calculator.restartWorkers ();
+}, "jalview.api.AlignmentViewPanel");
+Clazz.defineMethod (c$, "resetAllColourSchemes", 
+function () {
+var cs = this.globalColourScheme;
+if (cs != null) {
+cs.alignmentChanged (this.alignment, this.hiddenRepSequences);
+cs.setConsensus (this.hconsensus);
+if (cs.conservationApplied ()) {
+cs.setConservation (jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.alignment.getWidth (), false, this.getConsPercGaps (), false));
+}}for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
+if (sg.cs != null) {
+sg.cs.alignmentChanged (sg, this.hiddenRepSequences);
+}sg.recalcConservation ();
+}
+});
+Clazz.defineMethod (c$, "initAutoAnnotation", 
+function () {
+if (this.hconsensus == null && !this.$isDataset) {
+if (!this.alignment.isNucleotide ()) {
+this.initConservation ();
+this.initQuality ();
+} else {
+this.initRNAStructure ();
+}this.consensus =  new jalview.datamodel.AlignmentAnnotation ("Consensus", "PID",  new Array (1), 0, 100, 1);
+this.initConsensus (this.consensus);
+this.initComplementConsensus ();
+}});
+Clazz.defineMethod (c$, "initComplementConsensus", 
+function () {
+if (!this.alignment.isNucleotide ()) {
+var codonMappings = this.alignment.getCodonFrames ();
+if (codonMappings != null && !codonMappings.isEmpty ()) {
+this.complementConsensus =  new jalview.datamodel.AlignmentAnnotation ("cDNA Consensus", "PID for cDNA",  new Array (1), 0, 100, 1);
+this.initConsensus (this.complementConsensus);
+}}});
+Clazz.defineMethod (c$, "initConsensus", 
+($fz = function (aa) {
+aa.hasText = true;
+aa.autoCalculated = true;
+if (this.showConsensus) {
+this.alignment.addAnnotation (aa);
+}}, $fz.isPrivate = true, $fz), "jalview.datamodel.AlignmentAnnotation");
+Clazz.defineMethod (c$, "initConservation", 
+($fz = function () {
+if (this.showConservation) {
+if (this.conservation == null) {
+this.conservation =  new jalview.datamodel.AlignmentAnnotation ("Conservation", "Conservation of total alignment less than " + this.getConsPercGaps () + "% gaps",  new Array (1), 0, 11, 1);
+this.conservation.hasText = true;
+this.conservation.autoCalculated = true;
+this.alignment.addAnnotation (this.conservation);
+}}}, $fz.isPrivate = true, $fz));
+Clazz.defineMethod (c$, "initQuality", 
+($fz = function () {
+if (this.showQuality) {
+if (this.quality == null) {
+this.quality =  new jalview.datamodel.AlignmentAnnotation ("Quality", "Alignment Quality based on Blosum62 scores",  new Array (1), 0, 11, 1);
+this.quality.hasText = true;
+this.quality.autoCalculated = true;
+this.alignment.addAnnotation (this.quality);
+}}}, $fz.isPrivate = true, $fz));
+Clazz.defineMethod (c$, "initRNAStructure", 
+($fz = function () {
+if (this.alignment.hasRNAStructure () && this.strucConsensus == null) {
+this.strucConsensus =  new jalview.datamodel.AlignmentAnnotation ("StrucConsensus", "PID",  new Array (1), 0, 100, 1);
+this.strucConsensus.hasText = true;
+this.strucConsensus.autoCalculated = true;
+if (this.showConsensus) {
+this.alignment.addAnnotation (this.strucConsensus);
+}}}, $fz.isPrivate = true, $fz));
+Clazz.overrideMethod (c$, "calcPanelHeight", 
+function () {
+var anns = this.getAlignment ().getAlignmentAnnotation ();
+var height = 0;
+var charHeight = this.getCharHeight ();
+if (anns != null) {
+var graphgrp =  new java.util.BitSet ();
+for (var aa, $aa = 0, $$aa = anns; $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) {
+if (aa == null) {
+System.err.println ("Null annotation row: ignoring.");
+continue;
+}if (!aa.visible) {
+continue;
+}if (aa.graphGroup > -1) {
+if (graphgrp.get (aa.graphGroup)) {
+continue;
+} else {
+graphgrp.set (aa.graphGroup);
+}}aa.height = 0;
+if (aa.hasText) {
+aa.height += charHeight;
+}if (aa.hasIcons) {
+aa.height += 16;
+}if (aa.graph > 0) {
+aa.height += aa.graphHeight;
+}if (aa.height == 0) {
+aa.height = 20;
+}height += aa.height;
+}
+}if (height == 0) {
+height = 20;
+}return height;
+});
+Clazz.overrideMethod (c$, "updateGroupAnnotationSettings", 
+function (applyGlobalSettings, preserveNewGroupSettings) {
+var updateCalcs = false;
+var conv = this.isShowGroupConservation ();
+var cons = this.isShowGroupConsensus ();
+var showprf = this.isShowSequenceLogo ();
+var showConsHist = this.isShowConsensusHistogram ();
+var normLogo = this.isNormaliseSequenceLogo ();
+var sortg = true;
+var aan = this.alignment.getAlignmentAnnotation ();
+var oldrfs =  new java.util.ArrayList ();
+if (aan != null) {
+for (var an = 0; an < aan.length; an++) {
+if (aan[an].autoCalculated && aan[an].groupRef != null) {
+oldrfs.add (aan[an].groupRef);
+this.alignment.deleteAnnotation (aan[an], false);
+}}
+}if (this.alignment.getGroups () != null) {
+for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
+updateCalcs = false;
+if (applyGlobalSettings || (!preserveNewGroupSettings && !oldrfs.contains (sg))) {
+sg.setshowSequenceLogo (showprf);
+sg.setShowConsensusHistogram (showConsHist);
+sg.setNormaliseSequenceLogo (normLogo);
+}if (conv) {
+updateCalcs = true;
+this.alignment.addAnnotation (sg.getConservationRow (), 0);
+}if (cons) {
+updateCalcs = true;
+this.alignment.addAnnotation (sg.getConsensus (), 0);
+}if (updateCalcs) {
+sg.recalcConservation ();
+}}
+}oldrfs.clear ();
+}, "~B,~B");
+Clazz.defineMethod (c$, "isDisplayReferenceSeq", 
+function () {
+return this.alignment.hasSeqrep () && this.viewStyle.isDisplayReferenceSeq ();
+});
+Clazz.defineMethod (c$, "setDisplayReferenceSeq", 
+function (displayReferenceSeq) {
+this.viewStyle.setDisplayReferenceSeq (displayReferenceSeq);
+}, "~B");
+Clazz.defineMethod (c$, "isColourByReferenceSeq", 
+function () {
+return this.alignment.hasSeqrep () && this.viewStyle.isColourByReferenceSeq ();
+});
+Clazz.overrideMethod (c$, "getSequenceColour", 
+function (seq) {
+var sqc = this.sequenceColours.get (seq);
+return (sqc == null ? java.awt.Color.white : sqc);
+}, "jalview.datamodel.SequenceI");
+Clazz.overrideMethod (c$, "setSequenceColour", 
+function (seq, col) {
+if (col == null) {
+this.sequenceColours.remove (seq);
+} else {
+this.sequenceColours.put (seq, col);
+}}, "jalview.datamodel.SequenceI,java.awt.Color");
+Clazz.overrideMethod (c$, "updateSequenceIdColours", 
+function () {
+for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
+if (sg.idColour != null) {
+for (var s, $s = sg.getSequences (this.getHiddenRepSequences ()).iterator (); $s.hasNext () && ((s = $s.next ()) || true);) {
+this.sequenceColours.put (s, sg.idColour);
+}
+}}
+});
+Clazz.overrideMethod (c$, "clearSequenceColours", 
+function () {
+this.sequenceColours.clear ();
+});
+Clazz.defineMethod (c$, "getCodingComplement", 
+function () {
+return this.codingComplement;
+});
+Clazz.defineMethod (c$, "setCodingComplement", 
+function (av) {
+if (this === av) {
+System.err.println ("Ignoring recursive setCodingComplement request");
+} else {
+this.codingComplement = av;
+if (av.getCodingComplement () !== this) {
+av.setCodingComplement (this);
+}}}, "jalview.api.AlignViewportI");
+Clazz.overrideMethod (c$, "isNucleotide", 
+function () {
+return this.getAlignment () == null ? false : this.getAlignment ().isNucleotide ();
+});
+Clazz.overrideMethod (c$, "getFeaturesDisplayed", 
+function () {
+return this.featuresDisplayed;
+});
+Clazz.overrideMethod (c$, "setFeaturesDisplayed", 
+function (featuresDisplayedI) {
+this.featuresDisplayed = featuresDisplayedI;
+}, "jalview.api.FeaturesDisplayedI");
+Clazz.overrideMethod (c$, "areFeaturesDisplayed", 
+function () {
+return this.featuresDisplayed != null && this.featuresDisplayed.getRegisterdFeaturesCount () > 0;
+});
+Clazz.defineMethod (c$, "setShowSequenceFeatures", 
+function (b) {
+this.viewStyle.setShowSequenceFeatures (b);
+}, "~B");
+Clazz.defineMethod (c$, "isShowSequenceFeatures", 
+function () {
+return this.viewStyle.isShowSequenceFeatures ();
+});
+Clazz.defineMethod (c$, "setShowSequenceFeaturesHeight", 
+function (selected) {
+this.viewStyle.setShowSequenceFeaturesHeight (selected);
+}, "~B");
+Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight", 
+function () {
+return this.viewStyle.isShowSequenceFeaturesHeight ();
+});
+Clazz.defineMethod (c$, "setShowAnnotation", 
+function (b) {
+this.viewStyle.setShowAnnotation (b);
+}, "~B");
+Clazz.defineMethod (c$, "isShowAnnotation", 
+function () {
+return this.viewStyle.isShowAnnotation ();
+});
+Clazz.defineMethod (c$, "isRightAlignIds", 
+function () {
+return this.viewStyle.isRightAlignIds ();
+});
+Clazz.defineMethod (c$, "setRightAlignIds", 
+function (rightAlignIds) {
+this.viewStyle.setRightAlignIds (rightAlignIds);
+}, "~B");
+Clazz.defineMethod (c$, "getConservationSelected", 
+function () {
+return this.viewStyle.getConservationSelected ();
+});
+Clazz.defineMethod (c$, "setShowBoxes", 
+function (state) {
+this.viewStyle.setShowBoxes (state);
+}, "~B");
+Clazz.defineMethod (c$, "getTextColour", 
+function () {
+return this.viewStyle.getTextColour ();
+});
+Clazz.defineMethod (c$, "getTextColour2", 
+function () {
+return this.viewStyle.getTextColour2 ();
+});
+Clazz.defineMethod (c$, "getThresholdTextColour", 
+function () {
+return this.viewStyle.getThresholdTextColour ();
+});
+Clazz.defineMethod (c$, "isConservationColourSelected", 
+function () {
+return this.viewStyle.isConservationColourSelected ();
+});
+Clazz.defineMethod (c$, "isRenderGaps", 
+function () {
+return this.viewStyle.isRenderGaps ();
+});
+Clazz.defineMethod (c$, "isShowColourText", 
+function () {
+return this.viewStyle.isShowColourText ();
+});
+Clazz.defineMethod (c$, "setConservationColourSelected", 
+function (conservationColourSelected) {
+this.viewStyle.setConservationColourSelected (conservationColourSelected);
+}, "~B");
+Clazz.defineMethod (c$, "setShowColourText", 
+function (showColourText) {
+this.viewStyle.setShowColourText (showColourText);
+}, "~B");
+Clazz.defineMethod (c$, "setTextColour", 
+function (textColour) {
+this.viewStyle.setTextColour (textColour);
+}, "java.awt.Color");
+Clazz.defineMethod (c$, "setThresholdTextColour", 
+function (thresholdTextColour) {
+this.viewStyle.setThresholdTextColour (thresholdTextColour);
+}, "~N");
+Clazz.defineMethod (c$, "setTextColour2", 
+function (textColour2) {
+this.viewStyle.setTextColour2 (textColour2);
+}, "java.awt.Color");
+Clazz.overrideMethod (c$, "getViewStyle", 
+function () {
+return  new jalview.viewmodel.styles.ViewStyle (this.viewStyle);
+});
+Clazz.overrideMethod (c$, "setViewStyle", 
+function (settingsForView) {
+this.viewStyle =  new jalview.viewmodel.styles.ViewStyle (settingsForView);
+}, "jalview.api.ViewStyleI");
+Clazz.defineMethod (c$, "sameStyle", 
+function (them) {
+return this.viewStyle.sameStyle (them);
+}, "jalview.api.ViewStyleI");
+Clazz.defineMethod (c$, "getIdWidth", 
+function () {
+return this.viewStyle.getIdWidth ();
+});
+Clazz.defineMethod (c$, "setIdWidth", 
+function (i) {
+this.viewStyle.setIdWidth (i);
+}, "~N");
+Clazz.defineMethod (c$, "isCentreColumnLabels", 
+function () {
+return this.viewStyle.isCentreColumnLabels ();
+});
+Clazz.defineMethod (c$, "setCentreColumnLabels", 
+function (centreColumnLabels) {
+this.viewStyle.setCentreColumnLabels (centreColumnLabels);
+}, "~B");
+Clazz.defineMethod (c$, "setShowDBRefs", 
+function (showdbrefs) {
+this.viewStyle.setShowDBRefs (showdbrefs);
+}, "~B");
+Clazz.defineMethod (c$, "isShowDBRefs", 
+function () {
+return this.viewStyle.isShowDBRefs ();
+});
+Clazz.defineMethod (c$, "isShowNPFeats", 
+function () {
+return this.viewStyle.isShowNPFeats ();
+});
+Clazz.defineMethod (c$, "setShowNPFeats", 
+function (shownpfeats) {
+this.viewStyle.setShowNPFeats (shownpfeats);
+}, "~B");
+Clazz.defineMethod (c$, "addToHistoryList", 
+function (command) {
+if (this.historyList != null) {
+this.historyList.push (command);
+this.broadcastCommand (command, false);
+}}, "jalview.commands.CommandI");
+Clazz.defineMethod (c$, "broadcastCommand", 
+function (command, undo) {
+this.getStructureSelectionManager ().commandPerformed (command, undo, this.getVamsasSource ());
+}, "jalview.commands.CommandI,~B");
+Clazz.defineMethod (c$, "addToRedoList", 
+function (command) {
+if (this.redoList != null) {
+this.redoList.push (command);
+}this.broadcastCommand (command, true);
+}, "jalview.commands.CommandI");
+Clazz.defineMethod (c$, "clearRedoList", 
+function () {
+if (this.redoList != null) {
+this.redoList.clear ();
+}});
+Clazz.defineMethod (c$, "setHistoryList", 
+function (list) {
+this.historyList = list;
+}, "java.util.Deque");
+Clazz.defineMethod (c$, "getHistoryList", 
+function () {
+return this.historyList;
+});
+Clazz.defineMethod (c$, "setRedoList", 
+function (list) {
+this.redoList = list;
+}, "java.util.Deque");
+Clazz.defineMethod (c$, "getRedoList", 
+function () {
+return this.redoList;
+});
+Clazz.overrideMethod (c$, "getVamsasSource", 
+function () {
+return this;
+});
+Clazz.defineMethod (c$, "getSortAnnotationsBy", 
+function () {
+return this.sortAnnotationsBy;
+});
+Clazz.defineMethod (c$, "setSortAnnotationsBy", 
+function (sortAnnotationsBy) {
+this.sortAnnotationsBy = sortAnnotationsBy;
+}, "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder");
+Clazz.defineMethod (c$, "isShowAutocalculatedAbove", 
+function () {
+return this.showAutocalculatedAbove;
+});
+Clazz.defineMethod (c$, "setShowAutocalculatedAbove", 
+function (showAutocalculatedAbove) {
+this.showAutocalculatedAbove = showAutocalculatedAbove;
+}, "~B");
+Clazz.defineMethod (c$, "isScaleProteinAsCdna", 
+function () {
+return this.viewStyle.isScaleProteinAsCdna ();
+});
+Clazz.defineMethod (c$, "setScaleProteinAsCdna", 
+function (b) {
+this.viewStyle.setScaleProteinAsCdna (b);
+}, "~B");
+Clazz.defineMethod (c$, "isFollowHighlight", 
+function () {
+return this.followHighlight;
+});
+Clazz.overrideMethod (c$, "setFollowHighlight", 
+function (b) {
+this.followHighlight = b;
+}, "~B");
+Clazz.defineMethod (c$, "getStartRes", 
+function () {
+return this.startRes;
+});
+Clazz.overrideMethod (c$, "getEndRes", 
+function () {
+return this.endRes;
+});
+Clazz.defineMethod (c$, "getStartSeq", 
+function () {
+return this.startSeq;
+});
+Clazz.defineMethod (c$, "setStartRes", 
+function (res) {
+this.startRes = res;
+}, "~N");
+Clazz.defineMethod (c$, "setStartSeq", 
+function (seq) {
+this.startSeq = seq;
+}, "~N");
+Clazz.defineMethod (c$, "setEndRes", 
+function (res) {
+if (res > this.alignment.getWidth () - 1) {
+res = this.alignment.getWidth () - 1;
+}if (res < 0) {
+res = 0;
+}this.endRes = res;
+}, "~N");
+Clazz.defineMethod (c$, "setEndSeq", 
+function (seq) {
+if (seq > this.alignment.getHeight ()) {
+seq = this.alignment.getHeight ();
+}if (seq < 0) {
+seq = 0;
+}this.endSeq = seq;
+}, "~N");
+Clazz.defineMethod (c$, "getEndSeq", 
+function () {
+return this.endSeq;
+});
+Clazz.defineMethod (c$, "findComplementScrollTarget", 
+function (sr) {
+var complement = this.getCodingComplement ();
+if (complement == null || !complement.isFollowHighlight ()) {
+return 0;
+}var iAmProtein = !this.getAlignment ().isNucleotide ();
+var proteinAlignment = iAmProtein ? this.getAlignment () : complement.getAlignment ();
+if (proteinAlignment == null) {
+return 0;
+}var mappings = proteinAlignment.getCodonFrames ();
+var seqOffset = 0;
+var sequence = null;
+var middleColumn = this.getStartRes () + Clazz.doubleToInt ((this.getEndRes () - this.getStartRes ()) / 2);
+var hiddenSequences = this.getAlignment ().getHiddenSequences ();
+for (var seqNo = this.getStartSeq (); seqNo < this.getEndSeq (); seqNo++, seqOffset++) {
+sequence = this.getAlignment ().getSequenceAt (seqNo);
+if (hiddenSequences != null && hiddenSequences.isHidden (sequence)) {
+continue;
+}if (jalview.util.Comparison.isGap (sequence.getCharAt (middleColumn))) {
+continue;
+}var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (sequence, mappings);
+if (!seqMappings.isEmpty ()) {
+break;
+}}
+if (sequence == null) {
+return 0;
+}jalview.util.MappingUtils.addSearchResults (sr, sequence, sequence.findPosition (middleColumn), mappings);
+return seqOffset;
+}, "jalview.datamodel.SearchResults");
+});