*/
public void fastPaint(int horizontal, int vertical)
{
- if (fastpainting || gg == null)
+ if (fastpainting || gg == null || img == null)
{
return;
}
public void drawPanelForPrinting(Graphics g1, int startRes, int endRes,
int startSeq, int endSeq)
{
+ drawPanel(g1, startRes, endRes, startSeq, endSeq, 0);
+
BufferedImage selectImage = drawSelectionGroup(startRes, endRes,
startSeq, endSeq);
- drawPanel(g1, startRes, endRes, startSeq, endSeq, 0);
- ((Graphics2D) g1).setComposite(
- AlphaComposite.getInstance(AlphaComposite.SRC_OVER));
- g1.drawImage(selectImage, 0, 0, this);
+ if (selectImage != null)
+ {
+ ((Graphics2D) g1).setComposite(AlphaComposite
+ .getInstance(AlphaComposite.SRC_OVER));
+ g1.drawImage(selectImage, 0, 0, this);
+ }
}
/**
hgap += charHeight;
}
- int cWidth = (canvasWidth - LABEL_EAST - LABEL_WEST) / charWidth;
+ int cWidth = (canvasWidth - labelWidthEast - labelWidthWest)
+ / charWidth;
int cHeight = av.getAlignment().getHeight() * charHeight;
int startx = startRes;
endx = maxwidth;
}
- g.translate(LABEL_WEST, 0);
+ g.translate(labelWidthWest, 0);
drawUnwrappedSelection(g, group, startx, endx, 0,
av.getAlignment().getHeight() - 1,
ypos);
- g.translate(-LABEL_WEST, 0);
+ g.translate(-labelWidthWest, 0);
// update vertical offset
ypos += cHeight + getAnnotationHeight() + hgap;
* marker.
*
* @param g1
+ * Graphics object to draw with
* @param startRes
* offset of the first column in the visible region (0..)
* @param endRes