*/
package jalview.appletgui;
-import jalview.analysis.NJTree;
+import jalview.analysis.TreeModel;
import jalview.api.AlignViewportI;
import jalview.api.FeatureSettingsModelI;
import jalview.bin.JalviewLite;
import jalview.renderer.ResidueShader;
import jalview.schemes.ColourSchemeProperty;
import jalview.schemes.UserColourScheme;
-import jalview.structure.CommandListener;
import jalview.structure.SelectionSource;
import jalview.structure.StructureSelectionManager;
import jalview.structure.VamsasSource;
import jalview.viewmodel.AlignmentViewport;
+import jalview.viewmodel.ViewportRanges;
import java.awt.Font;
public class AlignViewport extends AlignmentViewport implements
- SelectionSource, VamsasSource, CommandListener
+ SelectionSource
{
boolean cursorMode = false;
boolean validCharWidth = true;
- NJTree currentTree = null;
+ TreeModel currentTree = null;
public jalview.bin.JalviewLite applet;
calculator = new jalview.workers.AlignCalcManager();
this.applet = applet;
alignment = al;
+ ranges = new ViewportRanges(this.alignment);
// we always pad gaps
this.setPadGaps(true);
- this.startRes = 0;
- this.endRes = al.getWidth() - 1;
- this.startSeq = 0;
- this.endSeq = al.getHeight() - 1;
+
if (applet != null)
{
// get the width and height scaling factors if they were specified
showConsensus = applet.getDefaultParameter("showConsensus",
showConsensus);
+ showOccupancy = applet.getDefaultParameter("showOccupancy",
+ showOccupancy);
+
setShowUnconserved(applet.getDefaultParameter("showUnconserved",
getShowUnconserved()));
public void resetSeqLimits(int height)
{
- setEndSeq(height / getCharHeight());
+ ranges.setEndSeq(height / getCharHeight());
}
- public void setCurrentTree(NJTree tree)
+ public void setCurrentTree(TreeModel tree)
{
currentTree = tree;
}
- public NJTree getCurrentTree()
+ public TreeModel getCurrentTree()
{
return currentTree;
}