Issue #1229 - Change to use non-blocking.

Change-Id: I9989b5b37e39a553434d4c104bfe9577925a6bd7

Former-commit-id: 7569aac1ea [formerly d256be6980] [formerly 7569aac1ea [formerly d256be6980] [formerly cdbf9085f5 [formerly b68db18e4d20db986844bf3fdb44d74f31308539]]]
Former-commit-id: cdbf9085f5
Former-commit-id: 26e22665c2 [formerly 12ba9d630f]
Former-commit-id: 4511b4141a
This commit is contained in:
James Korman 2012-10-11 09:10:41 -05:00
parent 48a116c499
commit 22fbf6625a
2 changed files with 17 additions and 4 deletions

View file

@ -135,7 +135,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 10/09/2012 1229 rferrel Made dialog non-blocking.
* 10/10/2012 1229 rferrel Changes for non-blocking ResourceEditorDlg.
* 10/10/2012 1229 rferrel Changes for non-blocking TransmissionQueueDlg.
*
* 10/10/2012 1229 jkorman Changes for AlertDialog to support non-blocking.
* </pre>
*
* @author grichard
@ -193,6 +193,11 @@ public class TafMonitorDlg extends CaveSWTDialog {
*/
private ResourceEditorDlg resDlg;
/**
* Alert configuration dialog.
*/
private AlertDialog alertDialog;
/**
* Resource configuration manager.
*/
@ -508,8 +513,15 @@ public class TafMonitorDlg extends CaveSWTDialog {
alertMenuItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
AlertDialog alertDialog = new AlertDialog(shell);
// Do we need to create a new dialog?
if ((alertDialog == null) || (alertDialog.getShell() == null)
|| (alertDialog.isDisposed())) {
alertDialog = new AlertDialog(shell);
alertDialog.open();
} else {
// No, so use the existing dialog.
alertDialog.bringToTop();
}
}
});

View file

@ -45,6 +45,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 1/24/2008 817 grichard Initial creation.
* 20121010 1229 jkorman Added DO_NOT_BLOCK so dialog does not block on open.
*
* </pre>
*
@ -72,7 +73,7 @@ public class AlertDialog extends CaveSWTDialog {
* Parent Shell.
*/
public AlertDialog(Shell parent) {
super(parent, SWT.DIALOG_TRIM, CAVE.PERSPECTIVE_INDEPENDENT);
super(parent, SWT.DIALOG_TRIM, CAVE.PERSPECTIVE_INDEPENDENT | CAVE.DO_NOT_BLOCK);
setText("AvnFPS Alert Dialog");
}