diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java index e67b757133..3256257545 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/dialogs/DisplayAttributesDialog.java @@ -66,7 +66,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog { public DisplayAttributesDialog(Shell parent, AbstractTemporalEditorBar bar, Parm parm) { super(parent); - this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE); + this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.CLOSE); this.bar = bar; this.parm = parm; origParmDispAtt = bar.getParmDisplayAttributes(parm); @@ -243,8 +243,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog { MessageBox mb = new MessageBox(getShell(), SWT.ICON_WARNING | SWT.OK); mb.setText("Graphic Attributes Error"); - mb - .setMessage("You must select at least one graphic type"); + mb.setMessage("You must select at least one graphic type"); mb.open(); } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java index 9c4c032148..81f0ff1aa0 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/temporaleditor/mousehandler/TitleBarMouseHandler.java @@ -38,6 +38,7 @@ import com.raytheon.viz.gfe.temporaleditor.AbstractTemporalEditorBar; import com.raytheon.viz.gfe.temporaleditor.TemporalEditorUtil; import com.raytheon.viz.gfe.temporaleditor.dialogs.DisplayAttributesDialog; import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog; +import com.raytheon.viz.ui.dialogs.ICloseCallback; /** * MouseHandler to resize temporal editor bars. @@ -47,6 +48,7 @@ import com.raytheon.viz.gfe.temporaleditor.dialogs.MoveWeatherElementDialog; * Date Ticket# Engineer Description * ------------ ---------- ------------- -------------------------- * May 28, 2009 #2159 Richard Peter Initial Creation. + * Nov 14, 2012 #1298 rferrel Changes for non-blocking DisplayAttributesDialog. * * * @author rjpeter @@ -122,11 +124,20 @@ public class TitleBarMouseHandler extends MouseHandler { public void run() { Shell shell = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(); + // The dialog being opened is modal to the parent + // dialog. This will prevent the launching of another + // dialog until the modal dialog is closed. DisplayAttributesDialog dialog = new DisplayAttributesDialog( shell, teBar, parm); - dialog.setBlockOnOpen(true); + dialog.setBlockOnOpen(false); + dialog.setCloseCallback(new ICloseCallback() { + + @Override + public void dialogClosed(Object returnValue) { + teBar.redraw(); + } + }); dialog.open(); - teBar.redraw(); } }); }