Issue #1298 Changes for non-blocking NewTextProductDialog.

Change-Id: I0d04cdb18a07f2ea9cfa99e95708ff64a260d99d

Former-commit-id: 5ea786daaf [formerly ce6d6e277e] [formerly 3676829e8f] [formerly ee323d9c60 [formerly 3676829e8f [formerly b2d932d2f4bc6430fba99ecfa08fd2adb885b3ac]]]
Former-commit-id: ee323d9c60
Former-commit-id: 43f3c54726102723a37b2f0b8b134e1f63f433fd [formerly 73d9e78e92]
Former-commit-id: 88968c54e5
This commit is contained in:
Roger Ferrel 2012-11-12 13:20:05 -06:00
parent 3789a954e4
commit fe965f064e
2 changed files with 10 additions and 5 deletions

View file

@ -45,13 +45,14 @@ import com.raytheon.viz.gfe.textproduct.TextProductUtil;
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
/**
* Dialog for the define new text products
* Dialog for the define new text products.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sept 25, 2008 1562 askripsky Initial creation.
* Nov 12, 2012 1298 rferrel Changes for non-blocking dialog.
* </pre>
*
* @author askripsky
@ -62,9 +63,9 @@ public class NewTextProductDialog extends CaveJFACEDialog {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(NewTextProductDialog.class);
public static final int CANCEL_ID = 1;
private final int CANCEL_ID = 1;
public static final int OK_ID = 2;
private final int OK_ID = 2;
private String title;
@ -99,7 +100,7 @@ public class NewTextProductDialog extends CaveJFACEDialog {
super(parentShell);
this.title = title;
this.setShellStyle(SWT.DIALOG_TRIM);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
this.validator = validator;
}
@ -289,7 +290,6 @@ public class NewTextProductDialog extends CaveJFACEDialog {
private void initNameSelectionEntry() {
nameSelectionText = new Text(comp, SWT.BORDER);
// nameSelectionText.setTextLimit(50);
nameSelectionText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER,
true, true));
}

View file

@ -34,6 +34,7 @@ import com.raytheon.viz.gfe.dialogs.NewTextProductDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 30, 2008 1562 askripsky Initial creation
* Nov 12, 2012 1298 rferrel Changes for non-blocking NewTextProductDialog.
*
* </pre>
*
@ -58,8 +59,12 @@ public class NewAction extends Action {
// Do this...
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
// The dialog being opened is modal to the parent dialog. This will
// prevent the launching of another dialog until the modal dialog is
// closed.
NewTextProductDialog dlg = new NewTextProductDialog(shell,
"New Text Product", new NewInputValidator());
dlg.setBlockOnOpen(false);
dlg.open();
}
}