Issue #1229 Changes for non-blocking TafMonitorDlg.
Reviewer comment changes. Change-Id: I54540db43041a837281e6abc3680ed8a22c38fce Former-commit-id:b6ec22777b
[formerly423099eb56
] [formerlyb6ec22777b
[formerly423099eb56
] [formerly0f1a6455f8
[formerly c684feebc7c80dc7b2f0e23c95dbab6efcc2f797]]] Former-commit-id:0f1a6455f8
Former-commit-id:9656e2eb09
[formerlya915dda620
] Former-commit-id:77b17181b0
This commit is contained in:
parent
f535c7a12a
commit
31fe8e9fc0
2 changed files with 33 additions and 18 deletions
|
@ -95,6 +95,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* 8/31/2011 10837 rferrel Added checks to see if the avnImage
|
* 8/31/2011 10837 rferrel Added checks to see if the avnImage
|
||||||
* file exists.
|
* file exists.
|
||||||
* 10/02/2012 1229 rferrel Made dialog non-blocking.
|
* 10/02/2012 1229 rferrel Made dialog non-blocking.
|
||||||
|
* 10/09/2012 1229 rferrel Changes for non-blocking TafMonitorDlg.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -356,7 +357,7 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart {
|
||||||
loadTafSiteConfig();
|
loadTafSiteConfig();
|
||||||
displayTafMonitorDialog();
|
displayTafMonitorDialog();
|
||||||
} else {
|
} else {
|
||||||
tafMonitorDlg.showDialog();
|
tafMonitorDlg.bringToTop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -585,7 +586,12 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void restartTafMonitor() {
|
public void restartTafMonitor() {
|
||||||
|
// This prevents tafMonitorDlg from closing this shell when closing the
|
||||||
|
// TaMonitorDlg prior to the restart.
|
||||||
|
dlgCount.incrementAndGet();
|
||||||
if (tafMonitorDlg.closeDisplay() == false) {
|
if (tafMonitorDlg.closeDisplay() == false) {
|
||||||
|
// adjust the count.
|
||||||
|
dlgCount.decrementAndGet();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,7 +624,12 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!emptyStationList) {
|
if (!emptyStationList) {
|
||||||
|
// This prevents tafMonitorDlg from closing this shell when closing
|
||||||
|
// the TaMonitorDlg prior to the restart.
|
||||||
|
dlgCount.incrementAndGet();
|
||||||
if (tafMonitorDlg.closeDisplay() == false) {
|
if (tafMonitorDlg.closeDisplay() == false) {
|
||||||
|
// adjust the count.
|
||||||
|
dlgCount.decrementAndGet();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -655,22 +666,25 @@ public class AviationDialog extends CaveSWTDialog implements IBackupRestart {
|
||||||
"Error no stations configured for " + product);
|
"Error no stations configured for " + product);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
tafMonitorDlg = new TafMonitorDlg(shell, stationList,
|
if (tafMonitorDlg == null || tafMonitorDlg.getShell() == null
|
||||||
productDisplayList);
|
|| tafMonitorDlg.isDisposed()) {
|
||||||
tafMonitorDlg.open();
|
tafMonitorDlg = new TafMonitorDlg(shell, stationList,
|
||||||
tafMonitorDlg = null;
|
productDisplayList);
|
||||||
|
tafMonitorDlg.setCloseCallback(new ICloseCallback() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
|
tafMonitorDlg = null;
|
||||||
|
if (dlgCount.decrementAndGet() == 0
|
||||||
|
&& !productDisplayList.isEmpty()) {
|
||||||
|
shell.dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tafMonitorDlg.open();
|
||||||
|
} else {
|
||||||
|
tafMonitorDlg.bringToTop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dlgCount.decrementAndGet() == 0 && !productDisplayList.isEmpty()) {
|
|
||||||
shell.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFocus() {
|
|
||||||
shell.setFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVisible(boolean visible) {
|
|
||||||
shell.setVisible(visible);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* 20JUL2012 14570 gzhang/zhao Added methods for highlighting in TAF viewer
|
* 20JUL2012 14570 gzhang/zhao Added methods for highlighting in TAF viewer
|
||||||
* 10/02/2012 1229 rferrel Changes to work with non-blocking WeatherPlotDialog.
|
* 10/02/2012 1229 rferrel Changes to work with non-blocking WeatherPlotDialog.
|
||||||
* 10/04/2012 1229 rferrel Changes for non-blocking ClimateMenuDlg.
|
* 10/04/2012 1229 rferrel Changes for non-blocking ClimateMenuDlg.
|
||||||
|
* 10/09/2012 1229 rferrel Made dialog non-blocking.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -252,7 +253,7 @@ public class TafMonitorDlg extends CaveSWTDialog {
|
||||||
List<String> productDispalyList) {
|
List<String> productDispalyList) {
|
||||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
||||||
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.MODE_INDEPENDENT
|
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.MODE_INDEPENDENT
|
||||||
| CAVE.INDEPENDENT_SHELL);
|
| CAVE.INDEPENDENT_SHELL | CAVE.DO_NOT_BLOCK);
|
||||||
setText("AvnFPS Monitor");
|
setText("AvnFPS Monitor");
|
||||||
|
|
||||||
this.stationList = stationList;
|
this.stationList = stationList;
|
||||||
|
|
Loading…
Add table
Reference in a new issue