Merge branch 'omaha_14.3.1' of ssh://www.awips2omaha.com:29418/AWIPS2_baseline into master_14.3.1
Former-commit-id:05aa513de3
[formerlye4ce5f5af5
] [formerlyf3b80f319d
] [formerly05aa513de3
[formerlye4ce5f5af5
] [formerlyf3b80f319d
] [formerly327491a3a8
[formerlyf3b80f319d
[formerly 4be7b001bc98e6fe81b3e66940d025fd7511060b]]]] Former-commit-id:327491a3a8
Former-commit-id:165f82baa6
[formerly4b47c8a5b8
] [formerly 5457b558fea660ea182777aee2d28845ca9b22b7 [formerly196e5e37ac
]] Former-commit-id: 18b51643bb2fa9df166ef6c18ae525114e0a5c31 [formerly319b2f9b15
] Former-commit-id:2c716cdca3
This commit is contained in:
commit
373307cb12
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