ASM #235
Change-Id: Ic3a6237b0a1f9ddf06621c984d2f11b7e08d7adb Former-commit-id:0f1a16498a
[formerlyb7b5dc3497
] [formerlyc76099274a
] [formerly22808af7e2
[formerlyc76099274a
[formerly 678ad5b35f22b71f54200fbf5b88ebd9e4da9563]]] Former-commit-id:22808af7e2
Former-commit-id: 290d75607ac062f848df22d02ac8dedf681edbf4 [formerlycb508369cf
] Former-commit-id:26dd36e272
This commit is contained in:
parent
62ea2d7c4e
commit
6d24becad9
7 changed files with 32 additions and 8 deletions
|
@ -102,7 +102,8 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
|
||||||
* Mar 14, 2013 1457 mpduff Reset the gages on the resource.
|
* Mar 14, 2013 1457 mpduff Reset the gages on the resource.
|
||||||
* Apr 18, 2013 1920 mpduff Added updateGages method to reload the gage data,
|
* Apr 18, 2013 1920 mpduff Added updateGages method to reload the gage data,
|
||||||
* fix formatting of legend for Base field Height.
|
* fix formatting of legend for Base field Height.
|
||||||
* Jul 02, 2013 2160 mpduff Initialize newly displayed resources.
|
* Jul 02, 2013 2160 mpduff Initialize newly displayed resources.
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -207,6 +208,8 @@ public class MPEDisplayManager {
|
||||||
|
|
||||||
private AbstractVizResource<?, ?> displayedResource;
|
private AbstractVizResource<?, ?> displayedResource;
|
||||||
|
|
||||||
|
private boolean savedData = true;
|
||||||
|
|
||||||
public void setDisplayedResource(AbstractVizResource<?, ?> rsc) {
|
public void setDisplayedResource(AbstractVizResource<?, ?> rsc) {
|
||||||
displayedResource = rsc;
|
displayedResource = rsc;
|
||||||
if (displayedFieldResource != null
|
if (displayedFieldResource != null
|
||||||
|
@ -222,11 +225,11 @@ public class MPEDisplayManager {
|
||||||
* @return the dataSaved
|
* @return the dataSaved
|
||||||
*/
|
*/
|
||||||
public boolean isDataSaved() {
|
public boolean isDataSaved() {
|
||||||
// TODO: Does A1 MPE EVER have a time where you change edit dates and it
|
return savedData;
|
||||||
// doesn't prompt? If so, we need to check here if data is saved or not
|
}
|
||||||
// TODO: Also, any editing methods need to change displayed frame to
|
|
||||||
// stop looping so they can see what they are editing.
|
public void setSavedData(boolean saved) {
|
||||||
return false;
|
savedData = saved;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,6 +56,7 @@ import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Dec 11, 2012 mschenke Initial creation
|
* Dec 11, 2012 mschenke Initial creation
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -263,6 +264,7 @@ public class SaveBestEstimate {
|
||||||
// "%s\n", command_string ));
|
// "%s\n", command_string ));
|
||||||
// system ( command_string );
|
// system ( command_string );
|
||||||
}
|
}
|
||||||
|
MPEDisplayManager.getCurrent().setSavedData(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void mpegui_save_image(BufferedImage bi, String format,
|
private static void mpegui_save_image(BufferedImage bi, String format,
|
||||||
|
|
|
@ -61,6 +61,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Jan 8, 2009 snaples Initial creation
|
* Jan 8, 2009 snaples Initial creation
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -92,6 +93,8 @@ public class AddPseudoGageDialog extends CaveSWTDialog {
|
||||||
|
|
||||||
private MPEGageResource resource;
|
private MPEGageResource resource;
|
||||||
|
|
||||||
|
private MPEDisplayManager mgr;
|
||||||
|
|
||||||
private static final String psstr = "PSEUDO";
|
private static final String psstr = "PSEUDO";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -124,7 +127,8 @@ public class AddPseudoGageDialog extends CaveSWTDialog {
|
||||||
@Override
|
@Override
|
||||||
protected void initializeComponents(Shell shell) {
|
protected void initializeComponents(Shell shell) {
|
||||||
font = new Font(shell.getDisplay(), "Courier", 10, SWT.NORMAL);
|
font = new Font(shell.getDisplay(), "Courier", 10, SWT.NORMAL);
|
||||||
datetime = MPEDisplayManager.getCurrent().getCurrentEditDate();
|
mgr = MPEDisplayManager.getCurrent();
|
||||||
|
datetime = mgr.getCurrentEditDate();
|
||||||
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||||
|
|
||||||
|
@ -219,6 +223,7 @@ public class AddPseudoGageDialog extends CaveSWTDialog {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
writePGage();
|
writePGage();
|
||||||
|
mgr.setSavedData(false);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -74,6 +74,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* Jun 05, 2013 15961 lbousaidi added routines for set Bad/set not bad buttons
|
* Jun 05, 2013 15961 lbousaidi added routines for set Bad/set not bad buttons
|
||||||
* to reflect the state of the gages.
|
* to reflect the state of the gages.
|
||||||
* Jul 02, 2013 2160 mpduff Changed to not call deprecated resource.getData() method.
|
* Jul 02, 2013 2160 mpduff Changed to not call deprecated resource.getData() method.
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author randerso
|
* @author randerso
|
||||||
|
@ -155,10 +157,12 @@ public class Display7x7Dialog extends CaveSWTDialog {
|
||||||
private DisplayFieldData selectedFieldData;
|
private DisplayFieldData selectedFieldData;
|
||||||
|
|
||||||
private static boolean oldManedit = false;
|
private static boolean oldManedit = false;
|
||||||
|
private MPEDisplayManager mgr;
|
||||||
|
|
||||||
public Display7x7Dialog(Shell parentShell, MPEGageData data) {
|
public Display7x7Dialog(Shell parentShell, MPEGageData data) {
|
||||||
super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
super(parentShell, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
||||||
setText("Display 7 X 7 Gage Editing Utility");
|
setText("Display 7 X 7 Gage Editing Utility");
|
||||||
|
mgr = MPEDisplayManager.getCurrent();
|
||||||
selectedGage = data;
|
selectedGage = data;
|
||||||
gData = MPEDataManager.getInstance().getEditedGage(selectedGage);
|
gData = MPEDataManager.getInstance().getEditedGage(selectedGage);
|
||||||
ArrayList<String> bg = MPEDataManager.getInstance().readBadGageList();
|
ArrayList<String> bg = MPEDataManager.getInstance().readBadGageList();
|
||||||
|
@ -488,6 +492,7 @@ public class Display7x7Dialog extends CaveSWTDialog {
|
||||||
undoMissing.setEnabled(undoEn);
|
undoMissing.setEnabled(undoEn);
|
||||||
String wid = workingGage.getId();
|
String wid = workingGage.getId();
|
||||||
editGage.put(wid, workingGage);
|
editGage.put(wid, workingGage);
|
||||||
|
mgr.setSavedData(false);
|
||||||
|
|
||||||
if (!editGage.isEmpty()) {
|
if (!editGage.isEmpty()) {
|
||||||
Iterator<MPEGageData> x = editGage.values().iterator();
|
Iterator<MPEGageData> x = editGage.values().iterator();
|
||||||
|
@ -578,6 +583,7 @@ public class Display7x7Dialog extends CaveSWTDialog {
|
||||||
MPEGageData gd = x.next();
|
MPEGageData gd = x.next();
|
||||||
MPEDataManager.getInstance().addEditedGage(gd);
|
MPEDataManager.getInstance().addEditedGage(gd);
|
||||||
}
|
}
|
||||||
|
mgr.setSavedData(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -678,6 +684,7 @@ public class Display7x7Dialog extends CaveSWTDialog {
|
||||||
if ((!notBadGage.isEmpty() || !badGage.isEmpty())
|
if ((!notBadGage.isEmpty() || !badGage.isEmpty())
|
||||||
&& !editGage.isEmpty()) {
|
&& !editGage.isEmpty()) {
|
||||||
MPEDataManager.getInstance().writeBadGageList();
|
MPEDataManager.getInstance().writeBadGageList();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -938,7 +945,6 @@ public class Display7x7Dialog extends CaveSWTDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateGridField(DisplayFieldData fieldType) {
|
private void updateGridField(DisplayFieldData fieldType) {
|
||||||
MPEDisplayManager mgr = MPEDisplayManager.getCurrent();
|
|
||||||
if (selectedFieldData != fieldType) {
|
if (selectedFieldData != fieldType) {
|
||||||
selectedFieldData = fieldType;
|
selectedFieldData = fieldType;
|
||||||
mgr.displayFieldData(fieldType);
|
mgr.displayFieldData(fieldType);
|
||||||
|
|
|
@ -69,6 +69,8 @@ import com.raytheon.viz.mpe.ui.radartable.ReadBiasTableParam;
|
||||||
* Jul 14, 2009 snaples Initial creation
|
* Jul 14, 2009 snaples Initial creation
|
||||||
* Jun 18, 2013 16053 snaples Removed reference to setRadarEditFlag
|
* Jun 18, 2013 16053 snaples Removed reference to setRadarEditFlag
|
||||||
* Aug 06, 2013 16243 Changed the Gui to a ScrolledComposite.
|
* Aug 06, 2013 16243 Changed the Gui to a ScrolledComposite.
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author snaples
|
* @author snaples
|
||||||
|
@ -251,6 +253,8 @@ public class RadarBiasTableDialog extends Dialog {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
applyBiasUpdate(dt);
|
applyBiasUpdate(dt);
|
||||||
|
MPEDisplayManager mgr = MPEDisplayManager.getCurrent();
|
||||||
|
mgr.setSavedData(false);
|
||||||
shell.dispose();
|
shell.dispose();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -104,6 +104,7 @@ import com.raytheon.viz.mpe.ui.dialogs.gagetable.xml.GageTableSortType;
|
||||||
* May 28, 2009 2476 mpduff Initial creation.
|
* May 28, 2009 2476 mpduff Initial creation.
|
||||||
* Mar 08, 2013 15725 snaples Updated to fix resort issues when editing value.
|
* Mar 08, 2013 15725 snaples Updated to fix resort issues when editing value.
|
||||||
* Jan 28, 2014 16994 snaples Updated populateGridCombo to get correct filename prefix for matching up selection.
|
* Jan 28, 2014 16994 snaples Updated populateGridCombo to get correct filename prefix for matching up selection.
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -526,6 +527,7 @@ public class GageTableDlg extends JFrame implements IEditTimeChangedListener {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
saveChanges();
|
saveChanges();
|
||||||
|
displayManager.setSavedData(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* longer be divided by 100.
|
* longer be divided by 100.
|
||||||
* Sep 11, 2013 #2353 lvenable Fixed cursor memory leak.
|
* Sep 11, 2013 #2353 lvenable Fixed cursor memory leak.
|
||||||
* Jan 29, 2014 16561 snaples Updated processDrawPrecipValue to remove polygon wireframe after setting value.
|
* Jan 29, 2014 16561 snaples Updated processDrawPrecipValue to remove polygon wireframe after setting value.
|
||||||
|
* Feb 2, 2014 16201 snaples Added saved data flag support
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
|
@ -742,6 +743,7 @@ public class DrawPolygonDlg extends CaveSWTDialog {
|
||||||
PolygonEditManager.writePolygonEdits(displayedField, editDate,
|
PolygonEditManager.writePolygonEdits(displayedField, editDate,
|
||||||
polygonEdits);
|
polygonEdits);
|
||||||
resource.clearPolygons();
|
resource.clearPolygons();
|
||||||
|
dispMgr.setSavedData(false);
|
||||||
} finally {
|
} finally {
|
||||||
shell.setCursor(prevCursor);
|
shell.setCursor(prevCursor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue