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())
{
{
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)
{
ex.printStackTrace();
}
+ }
+ finally {
+ if (alignFrame!=null)
+ {
+ alignFrame.setProgressBar("Export complete.", progress);
+ }
+ }
}
/**