Merge "Issue #1229 Changes for non-blocking ImagingDialog." into development
Former-commit-id:77de744b4e
[formerly 2a7f9d1d5bab1c3edc8c6ac2f424e0b8865bc4c6] Former-commit-id:74a9c05db5
This commit is contained in:
commit
3b3c636de4
3 changed files with 21 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -83,6 +83,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
|
|||
* show full colormap names, and added comments & 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue