import java.io.PrintWriter;
import java.util.List;
-import javax.swing.SwingUtilities;
-
/**
* The main panel of an AlignFrame, containing holders for the IdPanel,
* SeqPanel, AnnotationLabels (a JPanel), and AnnotationPanel.
// This is only called if file loaded is a jar file that
// was wrapped when saved and user has wrap alignment true
// as preference setting
- SwingUtilities.invokeLater(new Runnable()
+ Jalview.execRunnable(new Runnable()
{
@Override
public void run()
public int printWrappedAlignment(int pageWidth, int pageHeight, int pageNumber,
Graphics g) throws PrinterException
{
+
int annotationHeight = 0;
if (av.isShowAnnotation())
{
int totalHeight = cHeight * (maxwidth / resWidth + 1);
+ g = g.create();
+
g.setColor(Color.white);
g.fillRect(0, 0, pageWidth, pageHeight);
g.setFont(av.getFont());
*/
g.translate(0, -pageNumber * pageHeight);
- g.setClip(0, pageNumber * pageHeight, pageWidth, pageHeight);
+ // BH 2020.03.19 avoiding g.setClip
+ g.clipRect(0, pageNumber * pageHeight, pageWidth, pageHeight);
/*
* draw sequence ids and annotation labels (if shown)
getSeqPanel().seqCanvas.drawWrappedPanelForPrinting(g, pageWidth - idWidth,
totalHeight, 0);
+ g.dispose();
if ((pageNumber * pageHeight) < totalHeight)
{
return Printable.PAGE_EXISTS;