Issue #1287 Changes for non-blocking DefineSamplesViaLatLongDialog.

Change-Id: Id9b6d7feec00ae483f80cfa386ad31fdce3d8dea

Former-commit-id: c4d2f21061 [formerly db4f7b17cf] [formerly 8d8850174e] [formerly c4d2f21061 [formerly db4f7b17cf] [formerly 8d8850174e] [formerly 122012d767 [formerly 8d8850174e [formerly a90e1b6f168e54d3a1a6581b692e84288de537f3]]]]
Former-commit-id: 122012d767
Former-commit-id: adf86701f8 [formerly 8cd67ae67d] [formerly 5716e0025ee7897a90582f9af6f7c2693779dd1a [formerly 6aab2f1d8b]]
Former-commit-id: 7a9d5553e2a48852313065289057ca0f501e7f92 [formerly fba81ec4b0]
Former-commit-id: 077baaca1c
This commit is contained in:
Roger Ferrel 2012-10-24 09:30:03 -05:00
parent c17a798acd
commit f8fe4a66a4
2 changed files with 13 additions and 7 deletions

View file

@ -36,6 +36,7 @@ import com.raytheon.viz.gfe.dialogs.DefineSamplesViaLatLongDialog;
* ------------ ---------- ----------- --------------------------
* Feb 15, 2008 Eric Babin Initial Creation
* Apr 9, 2009 1288 rjpeter Removed explicit refresh of SpatialDisplayManager.
* Oct 24, 2012 1287 rferrel Changes for non-blocking DefineSamplesViaLatLongDialog.
*
* </pre>
*
@ -44,6 +45,7 @@ import com.raytheon.viz.gfe.dialogs.DefineSamplesViaLatLongDialog;
*/
public class ShowDefineSamplesLatLongAction extends AbstractHandler {
private DefineSamplesViaLatLongDialog dialog;
/*
* (non-Javadoc)
@ -54,13 +56,16 @@ public class ShowDefineSamplesLatLongAction extends AbstractHandler {
*/
@Override
public Object execute(ExecutionEvent arg0) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
DefineSamplesViaLatLongDialog dialog = new DefineSamplesViaLatLongDialog(
shell);
dialog.setBlockOnOpen(true);
dialog.open();
dialog = new DefineSamplesViaLatLongDialog(shell);
dialog.setBlockOnOpen(false);
dialog.open();
} else {
dialog.bringToTop();
}
return null;
}

View file

@ -43,6 +43,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* ------------ ---------- ----------- --------------------------
* Feb 15, 2008 Eric Babin Initial Creation
* 04/10/2009 #1290 rjpeter Moved field validation to when ok pressed.
* Oct 24, 2012 #1287 rferrel Change shell style.
* </pre>
*
* @author ebabin
@ -61,7 +62,7 @@ public class DefineSamplesViaLatLongDialog extends CaveJFACEDialog {
public DefineSamplesViaLatLongDialog(Shell parent) {
super(parent);
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.MODELESS);
}
@Override