Issue #1353 Changes for non-blocking AttributesDlg.
Change-Id: I10c64bc287d7b5f79836ce14567df9cb05e4aa5d Former-commit-id: da1fcd1d3d1716a1742b2e394d5d28b7d641ec3e
This commit is contained in:
parent
67243cacf8
commit
bdaf7fa39e
3 changed files with 48 additions and 29 deletions
|
@ -2288,7 +2288,9 @@ public class FFFGDlg extends CaveSWTDialog implements ISourceCompAction,
|
|||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
populateDialog();
|
||||
if (!shell.isDisposed()) {
|
||||
populateDialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -42,6 +42,23 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData.COLUMN_NA
|
|||
import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPResource;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
/**
|
||||
* Display FFMP Basin Table Attributes.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Initial creation
|
||||
* Dec 6, 2012 rferrel Change to non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author rferrel
|
||||
* @version 1.0
|
||||
*/
|
||||
public class AttributesDlg extends CaveSWTDialog {
|
||||
|
||||
private Button rateChk;
|
||||
|
@ -80,7 +97,7 @@ public class AttributesDlg extends CaveSWTDialog {
|
|||
|
||||
public AttributesDlg(Shell parent, FFMPResource resource,
|
||||
AttributesDlgData attrData, IAttributeDisplay attributeDisplayCb) {
|
||||
super(parent);
|
||||
super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK);
|
||||
this.parent = parent;
|
||||
this.resource = resource;
|
||||
setText("Attributes");
|
||||
|
@ -306,10 +323,10 @@ public class AttributesDlg extends CaveSWTDialog {
|
|||
attrData.setColumnVisible(key, chk.getSelection());
|
||||
if (key.equalsIgnoreCase("QPF")) {
|
||||
String qpfType = "xxxxxx";
|
||||
for (Button button: qpfRdoBtns) {
|
||||
for (Button button : qpfRdoBtns) {
|
||||
if (button.getSelection()) {
|
||||
qpfType = button.getText();
|
||||
// split window requires redraw on change
|
||||
// split window requires redraw on change
|
||||
updateData = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -84,8 +84,6 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPLoaderStatus;
|
|||
import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPResource;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPTableDataLoader;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPTableDataUpdate;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.xml.FFMPConfigBasinXML;
|
||||
import com.raytheon.uf.viz.monitor.ffmp.xml.FFMPTableColumnXML;
|
||||
import com.raytheon.uf.viz.monitor.listeners.IMonitorListener;
|
||||
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||
|
||||
|
@ -102,6 +100,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* for rapid slider changes.
|
||||
* Aug 01, 2012 14168 mpduff Only allow items into the Thresholds menu if
|
||||
* ColorCell is true.
|
||||
* Dec 06, 2012 1353 rferrel Code clean up.
|
||||
* Changes for non-blocking AttributesDlg.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -112,7 +112,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
ITimeDurationAction, IAttributeDisplay, IThreshDisplay,
|
||||
ITableSelection, IMonitorListener, ISourceUpdate {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
private final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(FfmpBasinTableDlg.class);
|
||||
|
||||
private List<FFMPTableDataLoader> retrievalQueue = new ArrayList<FFMPTableDataLoader>();
|
||||
|
@ -164,15 +164,15 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
|
||||
private Label groupLbl;
|
||||
|
||||
private final ArrayList<MenuItem> cwaMenuItems = new ArrayList<MenuItem>();
|
||||
private final List<MenuItem> cwaMenuItems = new ArrayList<MenuItem>();
|
||||
|
||||
private final ArrayList<MenuItem> layerMenuItems = new ArrayList<MenuItem>();
|
||||
private final List<MenuItem> layerMenuItems = new ArrayList<MenuItem>();
|
||||
|
||||
private final ArrayList<MenuItem> d2dMenuItems = new ArrayList<MenuItem>();
|
||||
private final List<MenuItem> d2dMenuItems = new ArrayList<MenuItem>();
|
||||
|
||||
private final ArrayList<MenuItem> clickMenuItems = new ArrayList<MenuItem>();
|
||||
private final List<MenuItem> clickMenuItems = new ArrayList<MenuItem>();
|
||||
|
||||
private final ArrayList<FFMPListener> ffmpListeners = new ArrayList<FFMPListener>();
|
||||
private final List<FFMPListener> ffmpListeners = new ArrayList<FFMPListener>();
|
||||
|
||||
private final String timeDurationStr = "Time Duration (hrs.)";
|
||||
|
||||
|
@ -190,9 +190,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
|
||||
private boolean killDialog = false;
|
||||
|
||||
private final ArrayList<String> cwas = new ArrayList<String>();
|
||||
private final List<String> cwas = new ArrayList<String>();
|
||||
|
||||
private ArrayList<MenuItem> sourceMenuItems = new ArrayList<MenuItem>();
|
||||
private List<MenuItem> sourceMenuItems = new ArrayList<MenuItem>();
|
||||
|
||||
private Date date = null;
|
||||
|
||||
|
@ -551,7 +551,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
|
||||
new MenuItem(d2dMenu, SWT.SEPARATOR);
|
||||
|
||||
ArrayList<String> guidanceList = resource.getProduct()
|
||||
List<String> guidanceList = resource.getProduct()
|
||||
.getAvailableGuidanceTypes();
|
||||
sourceMenuItems.clear();
|
||||
|
||||
|
@ -725,7 +725,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
ArrayList<String> cwaList = new ArrayList<String>();
|
||||
List<String> cwaList = new ArrayList<String>();
|
||||
|
||||
String cwaName = LocalizationManager.getInstance().getCurrentSite()
|
||||
.toUpperCase();
|
||||
|
@ -1157,7 +1157,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
private ConfigSummaryData createSummaryData() {
|
||||
ConfigSummaryData cfgSumData;
|
||||
ArrayList<String> includedCWAs = new ArrayList<String>();
|
||||
List<String> includedCWAs = new ArrayList<String>();
|
||||
String layer = "";
|
||||
String clickAction = "";
|
||||
String displayType = "";
|
||||
|
@ -1191,8 +1191,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
|
||||
cfgSumData = new ConfigSummaryData(layer, linkToFrameMI.getSelection(),
|
||||
worstCaseMI.getSelection(), maintainLayerMI.getSelection(),
|
||||
basinsInParentMI.getSelection(), includedCWAs, clickAction,
|
||||
displayType, autoRefreshMI.getSelection());
|
||||
basinsInParentMI.getSelection(),
|
||||
(ArrayList<String>) includedCWAs, clickAction, displayType,
|
||||
autoRefreshMI.getSelection());
|
||||
|
||||
return cfgSumData;
|
||||
}
|
||||
|
@ -1245,13 +1246,11 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
}
|
||||
|
||||
private void displayAttributesDlg() {
|
||||
attrData = ffmpTable.getVisibleColumns();
|
||||
if (this.attributeDlg == null) {
|
||||
if (attributeDlg == null) {
|
||||
attrData = ffmpTable.getVisibleColumns();
|
||||
attributeDlg = new AttributesDlg(shell, resource, attrData, this);
|
||||
attributeDlg.open();
|
||||
attributeDlg = null;
|
||||
|
||||
}
|
||||
attributeDlg.open();
|
||||
}
|
||||
|
||||
private void displayThresholdsDialog(ThreshColNames colName) {
|
||||
|
@ -1437,7 +1436,8 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
}
|
||||
}
|
||||
|
||||
FFMPCWAChangeEvent fcce = new FFMPCWAChangeEvent(cwas);
|
||||
FFMPCWAChangeEvent fcce = new FFMPCWAChangeEvent(
|
||||
(ArrayList<String>) cwas);
|
||||
Iterator<FFMPListener> iter = ffmpListeners.iterator();
|
||||
|
||||
while (iter.hasNext()) {
|
||||
|
@ -1835,7 +1835,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
if (fieldCfg == menuCfg) {
|
||||
d2dMenuItems.get(i).setSelection(true);
|
||||
if ((menuCfg == FIELDS.DIFF) || (menuCfg == FIELDS.RATIO)) {
|
||||
ArrayList<String> guidanceList = resource.getProduct()
|
||||
List<String> guidanceList = resource.getProduct()
|
||||
.getAvailableGuidanceTypes();
|
||||
for (int j = 0; j < guidanceList.size(); j++) {
|
||||
if (guidanceList.get(j).equals(guidSrc)) {
|
||||
|
@ -1944,7 +1944,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
* @param menuArray
|
||||
* Array of menu items.
|
||||
*/
|
||||
private void clearMenuItems(ArrayList<MenuItem> menuArray) {
|
||||
private void clearMenuItems(List<MenuItem> menuArray) {
|
||||
for (int i = 0; i < menuArray.size(); i++) {
|
||||
menuArray.get(i).setSelection(false);
|
||||
}
|
||||
|
@ -2130,7 +2130,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
if (fupdateData.getTableData() != null && groupLabelFlag) {
|
||||
resetData(fupdateData.getTableData());
|
||||
}
|
||||
|
||||
|
||||
groupLabelFlag = true;
|
||||
if (fupdateData.isFireGraph()) {
|
||||
fireGraphDataEvent(fupdateData.getGraphPfaf(), false,
|
||||
|
@ -2141,7 +2141,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
updateGapValueLabel(fupdateData.getGapValueLabel());
|
||||
|
||||
resetCursor();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue