- 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();
- }
- }
-
- 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);
- }
-
- } catch (Exception ex)
- {
- System.out.println("Error creating " + type.getName() + " file.");
- }
+ case SVG:
+ setupSVG(width, height, useLineart);
+ break;
+ case EPS:
+ setupEPS(width, height, fileTitle, useLineart);
+ break;
+ case PNG:
+ setupPNG(width, height, userBis);
+ break;
+ default: