Issue #1229 Changes for non-blocking ImagingDialog.

Change-Id: Iddcbf248949a082f734f6b5de8d8941089746468

Former-commit-id: 4c906e7d5f [formerly 3d15bf8be1] [formerly c73acb0c30] [formerly 460acb4337 [formerly c73acb0c30 [formerly 185024d06da214041273674716a7efce4b2a98f1]]]
Former-commit-id: 460acb4337
Former-commit-id: 213c6a4d6d36c7d33d3c45f9001f6de42f956f28 [formerly b42cae4034]
Former-commit-id: a9cb110036
This commit is contained in:
Roger Ferrel 2012-10-17 13:53:29 -05:00
parent 810861c25a
commit f470c8fb1d
3 changed files with 21 additions and 10 deletions

View file

@ -37,6 +37,7 @@ import com.raytheon.viz.ui.dialogs.ImagingDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 22, 2006 chammack Initial Creation.
* Oct 17, 2012 1229 rferrel Changes for non-blocking ImagingDialog.
*
* </pre>
*
@ -56,7 +57,7 @@ public class ImagePropertiesAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
if (dialog == null) {
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
IDisplayPaneContainer container = EditorUtil
.getActiveVizContainer();
if (container != null) {
@ -64,11 +65,12 @@ public class ImagePropertiesAction extends AbstractHandler {
.getCurrentWindow().getShell(), container);
// initalize
dialog.open();
} else {
dialog = null;
}
} else {
dialog.refreshComponents();
dialog.open();
dialog.bringToTop();
}
return null;

View file

@ -32,6 +32,7 @@ import com.raytheon.viz.ui.dialogs.ImagingDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 22, 2006 chammack Initial Creation.
* Oct 17, 2012 1229 rferrel Changes for non-blocking ImagingDialog.
*
* </pre>
*
@ -39,6 +40,7 @@ import com.raytheon.viz.ui.dialogs.ImagingDialog;
* @version 1
*/
public class ImagingAction extends AbstractRightClickAction {
private ImagingDialog dialog;
/*
* (non-Javadoc)
@ -47,10 +49,14 @@ public class ImagingAction extends AbstractRightClickAction {
*/
@Override
public void run() {
AbstractVizResource<?, ?> rsc = getTopMostSelectedResource();
ImagingDialog id = new ImagingDialog(VizWorkbenchManager.getInstance()
.getCurrentWindow().getShell(), rsc);
id.open();
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
AbstractVizResource<?, ?> rsc = getTopMostSelectedResource();
dialog = new ImagingDialog(VizWorkbenchManager.getInstance()
.getCurrentWindow().getShell(), rsc);
dialog.open();
} else {
dialog.bringToTop();
}
}
/*

View file

@ -83,6 +83,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
* show full colormap names, and added comments &amp; Javadoc.
* Aug 20, 2008 dglazesk Updated for the new ColorMap interface
* Feb 10, 2011 #7842 bkowal set caveStyle for dialog to INDEPENDENT SHELL
* Oct 17, 2012 #1229 rferrel Make dialog non-blocking.
*
* </pre>
*
@ -92,7 +93,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
public class ImagingDialog extends CaveSWTDialog implements
IVizEditorChangedListener, IRenderableDisplayChangedListener,
AddListener, RemoveListener, IResourceDataChanged {
private static final transient IUFStatusHandler statusHandler = UFStatus
private final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(ImagingDialog.class);
private static enum Type {
@ -149,7 +150,7 @@ public class ImagingDialog extends CaveSWTDialog implements
*/
private Button combineNextImage;
private static final String UNSAVED_CMAP_DISPLAY_NAME = "Untitled Colormap";
private final String UNSAVED_CMAP_DISPLAY_NAME = "Untitled Colormap";
private boolean fromControl = false;
@ -196,7 +197,8 @@ public class ImagingDialog extends CaveSWTDialog implements
* @param dialogTitle
*/
public ImagingDialog(Shell parentShell, IDisplayPaneContainer initialEditor) {
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.INDEPENDENT_SHELL);
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.INDEPENDENT_SHELL
| CAVE.DO_NOT_BLOCK);
setText("Imaging...");
this.currentEditor = initialEditor;
@ -207,7 +209,8 @@ public class ImagingDialog extends CaveSWTDialog implements
}
public ImagingDialog(Shell parentShell, AbstractVizResource<?, ?> rscToEdit) {
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.INDEPENDENT_SHELL);
super(parentShell, SWT.DIALOG_TRIM | SWT.MIN, CAVE.INDEPENDENT_SHELL
| CAVE.DO_NOT_BLOCK);
setText("Imaging...");
this.rscToEdit = rscToEdit;
}