import jalview.bin.Jalview;
import jalview.gui.EPSOptions;
+import jalview.gui.IProgressIndicator;
import jalview.gui.SVGOptions;
import jalview.io.JalviewFileChooser;
}
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());
.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)
{
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);
}
}
}