- 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());
- chooser.setDialogTitle(title);
- chooser.setToolTipText(MessageManager.getString("action.save"));
- int value = chooser.showSaveDialog(parent);
-
- if (value == jalview.io.JalviewFileChooser.APPROVE_OPTION)
- {
- jalview.bin.Cache.setProperty("LAST_DIRECTORY", chooser
- .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)
- {
- try
- {
- out = new FileOutputStream(file);
- if (type == TYPE.SVG)
- {
- setupSVG(width, height, fileTitle);
- }
- else if (type == TYPE.EPS)
- {
- setupEPS(width, height, fileTitle);
- }
- else if (type == TYPE.PNG)
- {
- 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);
- }
+ case SVG:
+ setupSVG(width, height, useLineart);
+ break;
+ case EPS:
+ setupEPS(width, height, fileTitle, useLineart);
+ break;
+ case PNG:
+ setupPNG(width, height, userBis);
+ break;
+ default: