From b2ee32e743a003cbd2f614c159c2ee53e596e03e 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: adc37587ed47b3e0aa871b216b4dfa51a4d66fa8 [formerly fa0913508cdd930f482917232d2f1826b95edab4] [formerly d1e52778db97a79ebc907e9adfa56a8cf5a145d6] [formerly bfd519cefe878320089e33a8e5aa2dbcf953ba77 [formerly d1e52778db97a79ebc907e9adfa56a8cf5a145d6 [formerly 0eee43ff9fc99f027a295abebf64a98bbfeabe26]]] Former-commit-id: bfd519cefe878320089e33a8e5aa2dbcf953ba77 Former-commit-id: ef72f178f9df39ff086b54de96ca644132123d6a [formerly 59b174d6bd58795775274267b9ea902f701b42f8] Former-commit-id: 54a1ad88b1a0072ec1c2caa7550ff5e60a9e32c5 --- .../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.