From 5155e038966617fa359a0b85f75cb2345c43e240 Mon Sep 17 00:00:00 2001 From: Roger Ferrel Date: Thu, 27 Sep 2012 16:31:11 -0500 Subject: [PATCH] Issue #1196 Added isDisposed to CaveJFACEDialog. Change-Id: I6ad1c3e1ba9015d87d04603a30ac8d02bb36abe5 Former-commit-id: fa0913508cdd930f482917232d2f1826b95edab4 [formerly d1e52778db97a79ebc907e9adfa56a8cf5a145d6] [formerly fa0913508cdd930f482917232d2f1826b95edab4 [formerly d1e52778db97a79ebc907e9adfa56a8cf5a145d6] [formerly bfd519cefe878320089e33a8e5aa2dbcf953ba77 [formerly 0eee43ff9fc99f027a295abebf64a98bbfeabe26]]] Former-commit-id: bfd519cefe878320089e33a8e5aa2dbcf953ba77 Former-commit-id: 54a1ad88b1a0072ec1c2caa7550ff5e60a9e32c5 [formerly 59b174d6bd58795775274267b9ea902f701b42f8] Former-commit-id: 8dda0a658faa494151733a5e75244fb227c28262 --- .../com/raytheon/viz/ui/dialogs/CaveJFACEDialog.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/CaveJFACEDialog.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/CaveJFACEDialog.java index 44b248c4dc..2d714ddb53 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/CaveJFACEDialog.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/CaveJFACEDialog.java @@ -216,6 +216,17 @@ public class CaveJFACEDialog extends Dialog implements return (getShell() != null && !getShell().isDisposed()); } + /** + * Returns if the dialog is disposed, a null dialog will not mean it is + * disposed as it may not have been opened yet. + * + * @return + */ + public final boolean isDisposed() { + Shell shell = getShell(); + return (shell != null && shell.isDisposed()); + } + /** * Add a callback to the dialog. This callback will be called when the * dialog is disposed.