Merge branch 'unidata_15.1.1' of github.com:Unidata/awips2 into unidata_15.1.1

Former-commit-id: 0a3cd8a2ce
This commit is contained in:
mjames-upc 2016-01-20 09:25:28 -07:00
commit 17bd09b1d8
5 changed files with 15 additions and 22 deletions

View file

@ -527,17 +527,6 @@
</reference>
</visibleWhen>
</command>
<command
commandId="com.raytheon.viz.ui.actions.magnificationbutton"
id="com.raytheon.viz.ui.actions.magnification"
label="Mag: ?.??"
style="pulldown">
<visibleWhen>
<reference
definitionId="com.raytheon.uf.viz.d2d.ui.inD2DActionSet">
</reference>
</visibleWhen>
</command>
</toolbar>
<toolbar
id="NC-1">

View file

@ -58,7 +58,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Oct 28, 2014 3767 bsteffen Automatically change filename if selected
* format does not support all options.
* Dec 4, 2014 DR16713 jgerth Support for date/time selection
*
* Jan 18, 2016 ---- mjames@ucar datetimeButton selected by default
*
* </pre>
*
* @author bsteffen
@ -141,8 +142,7 @@ public class ImageExportDialog extends CaveSWTDialog {
datetimeButton = new Button(group, SWT.CHECK);
datetimeButton.setLayoutData(gridData);
datetimeButton.setText("Include date and time in file name");
datetimeButton
.setSelection(options.getDateTimeSelection() == DateTimeSelection.DATETIME);
datetimeButton.setSelection(true);
datetimeButton
.setToolTipText("Append the date and time to the file name when Animate is not selected.");
}

View file

@ -80,6 +80,7 @@ import com.raytheon.viz.ui.editor.AbstractEditor;
* Jul 26, 2006 chammack Initial Creation.
* Jan 20, 2014 2312 bsteffen Move to image export plugin, animation.
* Dec 4, 2014 DR16713 jgerth Support for date and time in file name
* Jan 18, 2016 ---- mjames@ucar Append yyyy.MM.dd.HH.mm.ss to image filename
*
* </pre>
*
@ -213,21 +214,22 @@ public class ExportImageHandler extends AbstractImageCaptureHandler {
for (Map.Entry<DataTime, BufferedImage> entry : dtbiHash.entrySet()) {
i++;
BufferedImage bi = entry.getValue();
String timeStamp = new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date());
if (options.getDateTimeSelection() == DateTimeSelection.DATETIME) {
DataTime key = entry.getKey();
Date validTime = key.getValidTimeAsDate();
if (validTime != null && !isFakeTime(key)) {
path = basePath + "-" + sdf.format(validTime) + "." + suffix;
path = basePath + "-" + sdf.format(validTime) + "-" + timeStamp + "." + suffix;
if (path.equals(ppath)) {
path = basePath + "-" + sdf.format(validTime) + "-" + twoDigit.format(i).toString() + "." + suffix;
path = basePath + "-" + sdf.format(validTime) + "-" + twoDigit.format(i).toString() + "-" + timeStamp + "." + suffix;
}
} else {
path = basePath + "-" + twoDigit.format(i).toString() + "." + suffix;
path = basePath + "-" + twoDigit.format(i).toString() + "-" + timeStamp + "." + suffix;
}
} else if (dtbiHash.size() > 1) {
path = basePath + "-" + twoDigit.format(i).toString() + "." + suffix;
path = basePath + "-" + twoDigit.format(i).toString() + "-" + timeStamp + "." + suffix;
} else {
path = basePath + "." + suffix;
path = basePath + "-" + timeStamp + "." + suffix;
}
ppath = path;
stream = new FileImageOutputStream(new File(path));

View file

@ -39,6 +39,8 @@ import com.raytheon.uf.viz.core.datastructure.LoopProperties;
* Mar 10, 2014 2867 bsteffen Better frame range validation.
* Oct 28, 2014 3767 bsteffen Change default name to screenCapture.png
* Dec 4, 2014 DR16713 jgerth Support for date/time selection
* Jan 18, 2016 ---- mjames@ucar Save images to /awips2/export/<username> rather than
* /awips2/eclipse (and avoid guessing that /home/awips exists)
*
* </pre>
*
@ -85,7 +87,7 @@ public class ImageExportOptions {
}
private File fileLocation = new File("screenCapture.png");
private File fileLocation = new File("/awips2/export/" + System.getProperty("user.name") + "/screenCapture.png");
private ImageFormat imageFormat = ImageFormat.SEQUENCE;

View file

@ -5,10 +5,10 @@
<resource>
<loadProperties xsi:type="gridLoadProperties" displayType="CONTOUR" loadWithoutData="false">
<capabilities>
<capability xsi:type="colorableCapability" colorAsString="white"/>
<capability xsi:type="colorableCapability" colorAsString="gray50"/>
<capability xsi:type="densityCapability" density="1.0"/>
<capability xsi:type="magnificationCapability" magnification="1.0"/>
<capability xsi:type="outlineCapability" outlineWidth="2" outlineOn="true" lineStyle="SOLID"/>
<capability xsi:type="outlineCapability" outlineWidth="1" outlineOn="true" lineStyle="SOLID"/>
<capability xsi:type="displayTypeCapability" displayType="CONTOUR"/>
</capabilities>
<resourceType>PLAN_VIEW</resourceType>