From: amwaterhouse Date: Wed, 6 Apr 2005 17:11:08 +0000 (+0000) Subject: annoation in print version X-Git-Tag: Release_2_0~486 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=9340addc932216a64599577711bc9043b5f039da;p=jalview.git annoation in print version --- diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 04b596a..b3ad3ad 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -203,6 +203,8 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene scalePanelHolder.setVisible(!wrap); hscroll.setVisible(!wrap); idwidthAdjuster.setVisible(!wrap); + + av.setShowAnnotation(!wrap); annotationScroller.setVisible(!wrap); annotationSpaceFillerHolder.setVisible(!wrap); idSpaceFillerPanel1.setVisible(!wrap); @@ -360,10 +362,17 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene if(overviewPanel!=null) overviewPanel.setBoxPosition(); - seqPanel.seqCanvas.fastPaint(av.getStartRes()-oldX, av.getStartSeq()-oldY); - idPanel.idCanvas.fastPaint( av.getStartSeq()-oldY ); - scalePanel.repaint(); - annotationPanel.fastPaint(av.getStartRes()-oldX); + if(av.getWrapAlignment()) + repaint(); + else + { + seqPanel.seqCanvas.fastPaint(av.getStartRes() - oldX, + av.getStartSeq() - oldY); + idPanel.idCanvas.fastPaint(av.getStartSeq() - oldY); + scalePanel.repaint(); + if (av.getShowAnnotation()) + annotationPanel.fastPaint(av.getStartRes() - oldX); + } } @@ -454,9 +463,17 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene // draw main sequence panel pg.translate(idWidth,0); - pg.setClip(0,0,pwidth-idWidth, pheight); seqPanel.seqCanvas.drawPanel(pg,startRes,endRes,startSeq,endSeq,startRes,startSeq,0); + + if(av.getShowAnnotation()) + { + pg.translate(-idWidth,(endSeq-startSeq)*av.charHeight); + alabels.drawComponent((Graphics2D)pg); + pg.translate(idWidth,0); + annotationPanel.drawComponent((Graphics2D) pg, startRes, endRes+1); + } + return Printable.PAGE_EXISTS; } @@ -530,6 +547,10 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene height = (av.alignment.getHeight()+1) * av.charHeight + 30; width = idPanel.getWidth() + av.alignment.getWidth() * av.charWidth; } + if(av.getShowAnnotation()) + { + height += annotationPanel.getPreferredSize().height; + } try { @@ -573,7 +594,13 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene width = idPanel.getWidth() + av.alignment.getWidth() * av.charWidth; } + if(av.getShowAnnotation()) + { + height += annotationPanel.getPreferredSize().height; + } + +System.out.println(width +" "+height); try {