X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Futil%2FImageMaker.java;h=b7aa4ca2b530e4f4cfa4af64b65e1d048eef61d2;hb=e1767448d422ab26a6920bae2173804eda662e31;hp=e1543bf1898ba057a9944a3703c1918b8821edac;hpb=e5ff23b5bf5882361505c6f07846d1b8e1051e37;p=jalview.git diff --git a/src/jalview/util/ImageMaker.java b/src/jalview/util/ImageMaker.java index e1543bf..b7aa4ca 100755 --- a/src/jalview/util/ImageMaker.java +++ b/src/jalview/util/ImageMaker.java @@ -22,6 +22,7 @@ package jalview.util; import jalview.bin.Jalview; import jalview.gui.EPSOptions; +import jalview.gui.IProgressIndicator; import jalview.gui.SVGOptions; import jalview.io.JalviewFileChooser; @@ -90,12 +91,20 @@ public class ImageMaker } public ImageMaker(Component parent, TYPE type, String title, int width, - int height, File file, String fileTitle) + int height, File file, String fileTitle, + IProgressIndicator pIndicator, long pSessionId, boolean headless) { this.type = type; if (file == null) { + if (pIndicator != null && !headless) + { + pIndicator.setProgressBar( + MessageManager.formatMessage( + "status.waiting_for_user_to_select_output_file", + type.name), pSessionId); + } JalviewFileChooser chooser; chooser = type.getChooser(); chooser.setFileView(new jalview.io.JalviewFileView()); @@ -109,6 +118,15 @@ public class ImageMaker .getSelectedFile().getParent()); file = chooser.getSelectedFile(); } + else + { + if (pIndicator != null && !headless) + { + pIndicator.setProgressBar(MessageManager.formatMessage( + "status.cancelled_image_export_operation", type.name), + pSessionId); + } + } } if (file != null) @@ -128,10 +146,19 @@ public class ImageMaker { setupPNG(width, height); } - + if (pIndicator != null && !headless) + { + pIndicator.setProgressBar( +MessageManager.formatMessage( + "status.export_complete", type.getName()), + pSessionId); + } } catch (Exception ex) { System.out.println("Error creating " + type.getName() + " file."); + + pIndicator.setProgressBar(MessageManager.formatMessage( + "info.error_creating_file", type.getName()), pSessionId); } } }