X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignViewport.java;h=a1319102611fb96b08cb01abe00e75390e3e1fdf;hb=933794f42ed55d57850424e3459a54cd2d92c933;hp=499faafeaaea75c3a142c08cff73ca43ba8845f8;hpb=d93045ad69901a63115168c2a1e2ed2dbe1a92e2;p=jalview.git diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 499faaf..a131910 100644 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -22,7 +22,7 @@ package jalview.gui; import jalview.analysis.AlignmentUtils; import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; -import jalview.analysis.NJTree; +import jalview.analysis.TreeModel; import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; import jalview.api.FeatureColourI; @@ -46,12 +46,12 @@ import jalview.schemes.ColourSchemeI; import jalview.schemes.ColourSchemeProperty; import jalview.schemes.ResidueColourScheme; import jalview.schemes.UserColourScheme; -import jalview.structure.CommandListener; import jalview.structure.SelectionSource; import jalview.structure.StructureSelectionManager; import jalview.structure.VamsasSource; import jalview.util.MessageManager; import jalview.viewmodel.AlignmentViewport; +import jalview.viewmodel.ViewportRanges; import jalview.ws.params.AutoCalcSetting; import java.awt.Container; @@ -72,11 +72,11 @@ import javax.swing.JInternalFrame; * @version $Revision: 1.141 $ */ public class AlignViewport extends AlignmentViewport implements - SelectionSource, CommandListener + SelectionSource { Font font; - NJTree currentTree = null; + TreeModel currentTree = null; boolean cursorMode = false; @@ -238,10 +238,7 @@ public class AlignViewport extends AlignmentViewport implements void init() { - this.startRes = 0; - this.endRes = alignment.getWidth() - 1; - this.startSeq = 0; - this.endSeq = alignment.getHeight() - 1; + ranges = new ViewportRanges(this.alignment); applyViewProperties(); String fontName = Cache.getDefault("FONT_NAME", "SansSerif"); @@ -384,11 +381,6 @@ public class AlignViewport extends AlignmentViewport implements super.setViewStyle(settingsForView); setFont(new Font(viewStyle.getFontName(), viewStyle.getFontStyle(), viewStyle.getFontSize()), false); - if (residueShading != null) - { - residueShading.setConservationApplied(settingsForView - .isConservationColourSelected()); - } } /** @@ -499,7 +491,7 @@ public class AlignViewport extends AlignmentViewport implements * @param tree * DOCUMENT ME! */ - public void setCurrentTree(NJTree tree) + public void setCurrentTree(TreeModel tree) { currentTree = tree; } @@ -509,7 +501,7 @@ public class AlignViewport extends AlignmentViewport implements * * @return DOCUMENT ME! */ - public NJTree getCurrentTree() + public TreeModel getCurrentTree() { return currentTree; } @@ -860,7 +852,7 @@ public class AlignViewport extends AlignmentViewport implements } } - setEndSeq(getAlignment().getHeight()); + ranges.setEndSeq(getAlignment().getHeight()); firePropertyChange("alignment", null, getAlignment().getSequences()); }