X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignmentPanel.java;h=8f2dd04fc8bdd8683bc5e2fe80fb8df8f188932b;hb=27e20b88d0c73ced06e9c20a6e0fa14e27fed179;hp=3d612307d8ba89ed73c2c0680cb26728402bd4a4;hpb=9c00e25bfdf274009a471eba895f39e2fac4c0ac;p=jalview.git diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 3d61230..8f2dd04 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -1075,6 +1075,11 @@ public class AlignmentPanel extends GAlignmentPanel implements void makeAlignmentImage(int type, File file) { + long progress=System.currentTimeMillis(); + if (alignFrame!=null) { + alignFrame.setProgressBar("Saving "+(type == jalview.util.ImageMaker.PNG ? "PNG image":"EPS file") , progress); + } + try { int maxwidth = av.getAlignment().getWidth(); if (av.hasHiddenColumns()) { @@ -1113,19 +1118,17 @@ public class AlignmentPanel extends GAlignmentPanel implements { jalview.util.ImageMaker im; + final String imageAction,imageTitle; if (type == jalview.util.ImageMaker.PNG) { - im = new jalview.util.ImageMaker(this, jalview.util.ImageMaker.PNG, - "Create PNG image from alignment", width, height, file, - null); - } - else - { - im = new jalview.util.ImageMaker(this, jalview.util.ImageMaker.EPS, - "Create EPS file from alignment", width, height, file, - alignFrame.getTitle()); + imageAction="Create PNG image from alignment"; + imageTitle=null; + } else { + imageAction="Create EPS file from alignment"; + imageTitle=alignFrame.getTitle(); } - + im = new jalview.util.ImageMaker(this, type, imageAction, width, height, file, + imageTitle); if (av.getWrapAlignment()) { if (im.getGraphics() != null) @@ -1153,6 +1156,13 @@ public class AlignmentPanel extends GAlignmentPanel implements { ex.printStackTrace(); } + } + finally { + if (alignFrame!=null) + { + alignFrame.setProgressBar("Export complete.", progress); + } + } } /**