Issue #1298 Changes for non-blocking SetValueDialog.

Change-Id: Ida7350ff46cadb910972043a3882ef8d0d6ba20f

Former-commit-id: 1d5bd95866 [formerly 5c94dd5727420ff612ff1fa5bbdb06a041e89459]
Former-commit-id: dceb2cde5d
This commit is contained in:
Roger Ferrel 2012-11-13 14:41:21 -06:00
parent 32f088d986
commit 29eb436b19
3 changed files with 26 additions and 17 deletions

View file

@ -60,6 +60,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* 05Aug2008 #1407 ebabin Dim delta button for wx/discrete types.
* Oct 25, 2012 #1287 rferrel Code clean up part of non-blocking dialog.
* Oct 13, 2012 #1298 rferrel Changes for non-blocking SetDeltaDialog.
* Changes for non-blocking SetValueDialog.
* </pre>
*
* @author njensen
@ -111,7 +112,7 @@ public class EditActionsDialog extends CaveJFACEDialog implements
public EditActionsDialog(Shell parentShell) {
super(parentShell);
title = "Edit Actions";
setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE | SWT.RESIZE);
setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS | SWT.RESIZE);
dataManager = DataManager.getCurrentInstance();
parm = dataManager.getSpatialDisplayManager().getActivatedParm();
@ -328,12 +329,7 @@ public class EditActionsDialog extends CaveJFACEDialog implements
}
private void showPickupDialog() {
Shell shell = getParentShell();
SetValueDialog svd = new SetValueDialog(shell, dataManager);
svd.setBlockOnOpen(false);
svd.open();
SetValueDialog.openDialog();
}
/*

View file

@ -33,6 +33,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord.GridType;
import com.raytheon.viz.gfe.core.DataManager;
@ -52,6 +53,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jun 18, 2009 #1318 randerso Ported AWIPS I pickup value dialogs
* Nov 13, 2012 #1298 rferrel Changes for non-blocking dialog.
*
* </pre>
*
@ -62,9 +64,11 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
public class SetValueDialog extends CaveJFACEDialog implements
IDisplayedParmListChangedListener, IActivatedParmChangedListener {
private static final int DISMISS_ID = IDialogConstants.CLIENT_ID + 1;
private static SetValueDialog dialog;
private static final int ASSIGN_ID = IDialogConstants.CLIENT_ID + 0;
private final int DISMISS_ID = IDialogConstants.CLIENT_ID + 1;
private final int ASSIGN_ID = IDialogConstants.CLIENT_ID + 0;
private DataManager dataManager;
@ -78,15 +82,26 @@ public class SetValueDialog extends CaveJFACEDialog implements
private Composite valueFrame;
public static void openDialog() {
if (dialog == null) {
Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
DataManager dataManager = DataManager.getCurrentInstance();
dialog = new SetValueDialog(parent, dataManager);
dialog.setBlockOnOpen(false);
}
dialog.open();
}
/**
* Constructor
* Constructor is private use openDialog
*
* @param parentShell
* parent shell
* @param dataManager
* DataManager for the associated window
*/
public SetValueDialog(Shell parentShell, DataManager dataManager) {
private SetValueDialog(Shell parentShell, DataManager dataManager) {
super(parentShell);
this.dataManager = dataManager;
@ -191,6 +206,8 @@ public class SetValueDialog extends CaveJFACEDialog implements
setValue = null;
}
SetValueDialog.dialog = null;
return super.close();
}

View file

@ -99,6 +99,7 @@ import com.raytheon.viz.ui.input.InputAdapter;
* 06/03/2011 #8919 rferrel No longer display color bar when
* VisMode is GRAPHIC
* 11/13/20112 #1298 rferrel Changes for non-blocking SetDeltaDialog.
* Changes for non-blocking SetValueDialog.
*
* </pre>
*
@ -535,12 +536,7 @@ public class GFEColorbarResource extends
}
private void showPickupDialog() {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
SetValueDialog svd = new SetValueDialog(shell, dManager);
svd.setBlockOnOpen(false);
svd.open();
SetValueDialog.openDialog();
}
private class SetPickupAction extends AbstractRightClickAction {