Issue #1229 Changes for non-blocking MessageViewerDlg.

Reviewer comment corrections.

Change-Id: I5e7b6969a9d426fbd8b5f320dbd6914c23d0fcd0

Former-commit-id: c68776fdb5 [formerly 8fffc0ba1e] [formerly 1849ac40d5] [formerly c68776fdb5 [formerly 8fffc0ba1e] [formerly 1849ac40d5] [formerly 38ad9ea5bb [formerly 1849ac40d5 [formerly 5cbd3685e7a612394fd6b0e1315656727f320726]]]]
Former-commit-id: 38ad9ea5bb
Former-commit-id: a60cf9498a [formerly d14610bf35] [formerly fe1307b02d2f96d59cb7edddc6f7ea95cd260846 [formerly 415d85cd54]]
Former-commit-id: e02aa762079e1a0d65fa7d62121e8af428c6b301 [formerly a269951f3e]
Former-commit-id: be85ae4337
This commit is contained in:
Roger Ferrel 2012-10-12 08:07:41 -05:00
parent 6cb5edeebc
commit f0943da36e
2 changed files with 6 additions and 16 deletions

View file

@ -69,6 +69,7 @@ import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
* 8/11/2008 1314 grichard Used PathManager for pathnames.
* 10/04/2012 1229 rferrel Added dispose check needed for
* non-blocking dialogs.
* 10/12/2012 1229 rferrel Changes for non-blocking MessageViewerDlg.
*
* </pre>
*
@ -423,12 +424,12 @@ public class MessageStatusComp extends Composite implements IStatusSettable {
* Create the message viewer dialog.
*/
private void createMessageViewerDialog() {
if (msgViewerDlg == null || msgViewerDlg.getShell().isDisposed()) {
if (msgViewerDlg == null || msgViewerDlg.getShell() == null
|| msgViewerDlg.isDisposed()) {
msgViewerDlg = new MessageViewerDlg(this, msgType);
msgViewerDlg.open();
msgViewerDlg = null;
} else {
msgViewerDlg.showDialog();
msgViewerDlg.bringToTop();
}
}

View file

@ -47,6 +47,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* 28 FEB 2008 938 lvenable Initial creation.
* 4/8/2008 934 grichard Added IStatusViewable interface.
* 9/12/2008 1444 grichard Accommodate separate message logs.
* 10/12/2012 1229 rferrel Make dialog non-blocking.
*
* </pre>
*
@ -81,7 +82,7 @@ public class MessageViewerDlg extends CaveSWTDialog {
*/
public MessageViewerDlg(Composite parent, StatusMessageType msgType) {
super(parent.getShell(), SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MODELESS,
CAVE.PERSPECTIVE_INDEPENDENT);
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.DO_NOT_BLOCK);
setText("Message Log");
this.msgType = msgType;
@ -178,16 +179,4 @@ public class MessageViewerDlg extends CaveSWTDialog {
}
msgList.setSelection(0);
}
/**
* Show the dialog.
*/
public void showDialog() {
if (shell.isVisible() == false) {
shell.setVisible(true);
}
shell.setActive();
}
}