*/
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.commands.CommandI;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.Sequence;
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 java.awt.Font;
+import java.awt.FontMetrics;
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;
public AlignViewport(AlignmentI al, JalviewLite applet)
{
- super();
+ super(al);
calculator = new jalview.workers.AlignCalcManager();
this.applet = applet;
- alignment = al;
+
// 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
}
}
}
- setFont(font);
+ setFont(font, true);
MAC = new jalview.util.Platform().isAMac();
showConsensus = applet.getDefaultParameter("showConsensus",
showConsensus);
+ showOccupancy = applet.getDefaultParameter("showOccupancy",
+ showOccupancy);
+
setShowUnconserved(applet.getDefaultParameter("showUnconserved",
getShowUnconserved()));
private float heightScale = 1, widthScale = 1;
- public void setFont(Font f)
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void setFont(Font f, boolean setGrid)
{
font = f;
if (nullFrame == null)
nullFrame.addNotify();
}
- java.awt.FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font);
- setCharHeight((int) (heightScale * fm.getHeight()));
- setCharWidth((int) (widthScale * fm.charWidth('M')));
+ if (setGrid)
+ {
+ FontMetrics fm = nullFrame.getGraphics().getFontMetrics(font);
+ setCharHeight((int) (heightScale * fm.getHeight()));
+ setCharWidth((int) (widthScale * fm.charWidth('M')));
+ }
if (isUpperCasebold())
{
Font f2 = new Font(f.getName(), Font.BOLD, f.getSize());
- fm = nullFrame.getGraphics().getFontMetrics(f2);
+ FontMetrics fm = nullFrame.getGraphics().getFontMetrics(f2);
setCharWidth((int) (widthScale * (fm.stringWidth("MMMMMMMMMMM") / 10)));
}
}
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;
}
{
getStructureSelectionManager().sendSelection(
new SequenceGroup(getSelectionGroup()),
- new ColumnSelection(getColumnSelection()), this);
+ new ColumnSelection(getColumnSelection()),
+ new HiddenColumns(getAlignment().getHiddenColumns()), this);
}
/**
int seqOffset = findComplementScrollTarget(sr);
if (!sr.isEmpty())
{
- complementPanel.setFollowingComplementScroll(true);
+ complementPanel.setToScrollComplementPanel(false);
complementPanel.scrollToCentre(sr, seqOffset);
+ complementPanel.setToScrollComplementPanel(true);
}
}
// TODO implement for applet
}
+ @Override
+ public boolean isNormaliseHMMSequenceLogo()
+ {
+ // TODO Auto-generated method stub
+ return normaliseHMMSequenceLogo;
+ }
+
}