Displays a file save dialog with 'title' as the title, 'defaultName' as the initial file name, and 'extension' (e.g. ".tif") as the default extension.
(String title, String defaultName, String extension)
| 36 | 'extension' (e.g. ".tif") as the default extension. |
| 37 | */ |
| 38 | public SaveDialog(String title, String defaultName, String extension) { |
| 39 | this.title = title; |
| 40 | ext = extension; |
| 41 | if (isMacro()) |
| 42 | return; |
| 43 | String defaultDir = OpenDialog.getDefaultDirectory(); |
| 44 | defaultName = setExtension(defaultName, extension); |
| 45 | IJ.showStatus(title); |
| 46 | if (Prefs.useJFileChooser) |
| 47 | jSave(title, defaultDir, defaultName); |
| 48 | else |
| 49 | save(title, defaultDir, defaultName); |
| 50 | IJ.showStatus(""); |
| 51 | if (name!=null && dir!=null) |
| 52 | OpenDialog.setDefaultDirectory(dir); |
| 53 | IJ.showStatus(title+": "+dir+name); |
| 54 | } |
| 55 | |
| 56 | /** Displays a file save dialog, using the specified |
| 57 | default directory and file name and extension. */ |
nothing calls this directly
no test coverage detected