From 2b9c6a8948800edf58dd055631920654729fd675 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 21 Mar 2005 09:55:17 +0000 Subject: [PATCH] correct eps png bug missing last 2 lines --- src/jalview/gui/AlignFrame.java | 33 +++++++-------------------------- src/jalview/gui/AlignmentPanel.java | 28 ++++++++++++++++++++++++---- 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 867de61..ca9903c 100755 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -116,31 +116,12 @@ public class AlignFrame extends GAlignFrame protected void createPNG_actionPerformed(ActionEvent e) { - int height = (viewport.alignment.getWidth() / viewport.getChunkWidth() +1) * viewport.chunkHeight; - int width = alignPanel.seqPanel.getWidth() + alignPanel.idPanel.getWidth(); - - if(!viewport.getWrapAlignment()) - { - height = viewport.alignment.getHeight() * viewport.charHeight; - width = alignPanel.idPanel.getWidth() + viewport.alignment.getWidth() * viewport.charWidth; - } - - alignPanel.makePNG( width, height); + alignPanel.makePNG(); } protected void epsFile_actionPerformed(ActionEvent e) { - int height = (viewport.alignment.getWidth() / viewport.getChunkWidth() +1) * viewport.chunkHeight; - int width = alignPanel.seqPanel.getWidth() + alignPanel.idPanel.getWidth(); - - if(!viewport.getWrapAlignment()) - { - height = viewport.alignment.getHeight() * viewport.charHeight; - width = alignPanel.idPanel.getWidth() + viewport.alignment.getWidth() * viewport.charWidth; - } - - alignPanel.makeEPS( width, height); - + alignPanel.makeEPS(); } @@ -1051,7 +1032,7 @@ if ( viewport.getConservationSelected() ) // Need visual-delay indication here. public void run() { - jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss(); + /* jalview.ws.Jemboss jemboss = new jalview.ws.Jemboss(); Vector sv = viewport.getAlignment().getSequences(); SequenceI[] seqs = new SequenceI[sv.size()]; @@ -1097,12 +1078,12 @@ if ( viewport.getConservationSelected() ) } public void jpredMenuItem_actionPerformed(ActionEvent e) { - JInternalFrame frame = new JInternalFrame(); - JPredClient ct = new JPredClient((SequenceI) - viewport.getAlignment().getSequences().elementAt(0)); + // JInternalFrame frame = new JInternalFrame(); +// JPredClient ct = new JPredClient((SequenceI) + /// viewport.getAlignment().getSequences().elementAt(0)); } - +*/}} protected void LoadtreeMenuItem_actionPerformed(ActionEvent e) { // Pick the tree file JalviewFileChooser chooser = new JalviewFileChooser(jalview.bin.Cache. diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 4a2e3f1..76fc8d5 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -434,7 +434,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene } // draw main sequence panel - pg.translate(idWidth,0); + pg.translate(idWidth+4,0); pg.setClip(0,0,pwidth-idWidth, pheight); seqPanel.seqCanvas.drawPanel(pg,startRes,endRes,startSeq,endSeq,startRes,startSeq,0); @@ -492,7 +492,7 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene } // draw main sequence panel - pg.translate(idWidth,0); + pg.translate(idWidth+4,0); seqPanel.seqCanvas.drawWrappedPanel(pg, pwidth-idWidth, pheight, pi*noChunksOnPage*chunkWidth); @@ -501,8 +501,17 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene } - public void makeEPS(int width, int height) + public void makeEPS() { + int height = (av.alignment.getWidth() / av.getChunkWidth() +1) * av.chunkHeight; + int width = seqPanel.getWidth() + idPanel.getWidth(); + + if (!av.getWrapAlignment()) + { + height = (av.alignment.getHeight()+1) * av.charHeight + 30; + width = idPanel.getWidth() + av.alignment.getWidth() * av.charWidth; + } + try { jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(jalview.bin.Cache.getProperty( @@ -534,8 +543,19 @@ public class AlignmentPanel extends GAlignmentPanel implements AdjustmentListene } } - public void makePNG(int width, int height) + public void makePNG() { + int height = (av.alignment.getWidth() / av.getChunkWidth() +1) * av.chunkHeight; + int width = seqPanel.getWidth() + idPanel.getWidth(); + + if (!av.getWrapAlignment()) + { + height = (av.alignment.getHeight()+1) * av.charHeight + 30; + width = idPanel.getWidth() + av.alignment.getWidth() * av.charWidth; + } + + + try { jalview.io.JalviewFileChooser chooser = new jalview.io.JalviewFileChooser(jalview.bin.Cache.getProperty( -- 1.7.10.2