Issue #1287 Changes for non-blocking but modal DisplayAttributesDialog.

Change-Id: I57df579cd29ffa2bb54589bf5862121857abedb0

Former-commit-id: 8152c49231 [formerly 8152c49231 [formerly 4dca1f343e38090c21e27f0470cc68042c22c811]]
Former-commit-id: b0c5e6472b
Former-commit-id: 8ac665a0ca
This commit is contained in:
Roger Ferrel 2012-10-22 15:34:21 -05:00
parent 729a2b227c
commit ed86da12d7
2 changed files with 18 additions and 8 deletions

View file

@ -27,7 +27,7 @@ import com.raytheon.viz.gfe.rsc.GFEResource;
import com.raytheon.viz.ui.cmenu.AbstractRightClickAction;
/**
* TODO Add Description
* Action to bring up the Dispaly attributes dialog.
*
* <pre>
*
@ -35,6 +35,7 @@ import com.raytheon.viz.ui.cmenu.AbstractRightClickAction;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 13, 2009 mschenke Initial creation
* Oct 22, 2012 1287 rferrel Changes for non-blocking DisplayAttributesDialog.
*
* </pre>
*
@ -46,6 +47,8 @@ public class DisplayAttributesAction extends AbstractRightClickAction {
private GFEResource rsc;
private DisplayAttributesDialog dialog;
/*
* (non-Javadoc)
*
@ -53,14 +56,18 @@ public class DisplayAttributesAction extends AbstractRightClickAction {
*/
@Override
public void run() {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
rsc = ((GFEResource) this.getSelectedRsc());
rsc = ((GFEResource) this.getSelectedRsc());
DisplayAttributesDialog dad = new DisplayAttributesDialog(shell, rsc);
dad.setBlockOnOpen(true);
dad.open();
dialog = new DisplayAttributesDialog(shell, rsc);
dialog.setBlockOnOpen(false);
dialog.open();
} else {
dialog.bringToTop();
}
}
/*

View file

@ -51,6 +51,8 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 11, 2008 Eric Babin Initial Creation
* Oct 22, 2012 1287 rferrel Make dialog application modal
* and non-blocking.
*
* </pre>
*
@ -84,7 +86,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog {
public DisplayAttributesDialog(Shell parent, GFEResource rsc) {
super(parent);
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
this.setShellStyle(SWT.TITLE | SWT.APPLICATION_MODAL | SWT.CLOSE);
this.parm = rsc.getParm();
@ -100,6 +102,7 @@ public class DisplayAttributesDialog extends CaveJFACEDialog {
startImageTypes = null;
startGraphicTypes = null;
setBlockOnOpen(false);
}
@Override