*/
package jalview.gui;
-import jalview.datamodel.SequenceI;
-import jalview.viewmodel.ViewportListenerI;
-import jalview.viewmodel.ViewportRanges;
-
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import javax.swing.JPanel;
+import jalview.datamodel.SequenceI;
+import jalview.viewmodel.ViewportListenerI;
+import jalview.viewmodel.ViewportRanges;
+
/**
* DOCUMENT ME!
*
AnnotationPanel ap;
private Font idfont;
+ private boolean allowFastPaint;
/**
* Creates a new IdCanvas object.
{
return;
}
-
g.setColor(Color.white);
g.fillRect(0, 0, getWidth(), getHeight());
- if (fastPaint)
+ if (allowFastPaint && fastPaint)
{
fastPaint = false;
g.drawImage(image, 0, 0, this);
if (hasHiddenRows || alignViewport.isDisplayReferenceSeq())
{
g.setFont(getHiddenFont(sequence, alignViewport));
+ fm = g.getFontMetrics();
}
// Selected sequence colours
int alignmentWidth = alignViewport.getAlignment().getWidth();
final int alheight = alignViewport.getAlignment().getHeight();
-
-// int annotationHeight = 0;
/* (former)
* assumption: SeqCanvas.calculateWrappedGeometry has been called
{
ap = new AnnotationPanel(alignViewport);
}
-// annotationHeight = ap.adjustPanelHeight();
labels = new AnnotationLabels(alignViewport);
}
-// int hgap = charHeight;
-// if (alignViewport.getScaleAboveWrapped())
-// {
-// hgap += charHeight;
-// }
-//
-// /*
-// * height of alignment + gap + annotations (if shown)
-// */
-// int cHeight = alheight * charHeight + hgap
-// + annotationHeight;
-//
ViewportRanges ranges = alignViewport.getRanges();
int rowSize = ranges.getViewportWidth();
*/
public void setNoFastPaint()
{
- fastPaint = false;
+ allowFastPaint = false;
}
}