Issue #3767 Change default image export name to screenCapture.png.
Former-commit-id:baa1fc1f7f
[formerly4e24cde257
] [formerly1591c9cbb8
] [formerlybaa1fc1f7f
[formerly4e24cde257
] [formerly1591c9cbb8
] [formerly80c209fef7
[formerly1591c9cbb8
[formerly 021367d3212e185a2d8d4e5970fc268204bf070b]]]] Former-commit-id:80c209fef7
Former-commit-id:0476884815
[formerly89194b9816
] [formerly 99f53b8aeb02e9794b90d3491a2455d6323c9259 [formerly14dbd71e9d
]] Former-commit-id: fd2a838bcdafc89a7491a17dc63a52397be2a464 [formerly101c92c99c
] Former-commit-id:e74823bc2d
This commit is contained in:
parent
fca79dd44e
commit
36df1e299b
2 changed files with 20 additions and 7 deletions
|
@ -54,6 +54,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* Jan 20, 2014 2312 bsteffen Initial creation
|
||||
* Mar 10, 2014 2867 bsteffen Better frame range validation.
|
||||
* Oct 28, 2014 3767 bsteffen Automatically change filename if selected
|
||||
* format does not support all options.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -412,13 +414,23 @@ public class ImageExportDialog extends CaveSWTDialog {
|
|||
}
|
||||
}
|
||||
if (!goodSuffix) {
|
||||
MessageBox mb = new MessageBox(getShell(), SWT.ICON_ERROR | SWT.OK);
|
||||
mb.setText("Invalid Suffix");
|
||||
mb.setMessage("The file extension(" + suffix
|
||||
MessageBox mb = new MessageBox(getShell(), SWT.ICON_WARNING
|
||||
| SWT.YES | SWT.NO);
|
||||
mb.setText("Incompatible Format");
|
||||
ImageFormat format = options.getImageFormat();
|
||||
mb.setMessage("The format(" + suffix
|
||||
+ ") of the selected file is not valid for "
|
||||
+ options.getImageFormat().getDescription());
|
||||
mb.open();
|
||||
return false;
|
||||
+ format.getDescription()
|
||||
+ ". Would you like to continue and export the file in "
|
||||
+ format.getExtensions()[0] + " format?");
|
||||
int result = mb.open();
|
||||
if (result == SWT.YES) {
|
||||
suffix = format.getExtensions()[0];
|
||||
path = path.substring(0, path.lastIndexOf('.') + 1) + suffix;
|
||||
options.setFileLocation(new File(path));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
File file = options.getFileLocation();
|
||||
|
|
|
@ -37,6 +37,7 @@ import com.raytheon.uf.viz.core.datastructure.LoopProperties;
|
|||
* ------------- -------- ----------- --------------------------
|
||||
* Jan 20, 2014 2312 bsteffen Initial creation
|
||||
* Mar 10, 2014 2867 bsteffen Better frame range validation.
|
||||
* Oct 28, 2014 3767 bsteffen Change default name to screenCapture.png
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -79,7 +80,7 @@ public class ImageExportOptions {
|
|||
|
||||
}
|
||||
|
||||
private File fileLocation = new File("screenCapture.gif");
|
||||
private File fileLocation = new File("screenCapture.png");
|
||||
|
||||
private ImageFormat imageFormat = ImageFormat.SEQUENCE;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue