Issue #1298 Changes for non-blocking NewToolDialog.
Change-Id: I83bcbf9cf19785811d35b97d04442f404429fdb5 Former-commit-id:499100c5b6
[formerly6ec9c1fac4
] [formerly9c9a068908
] [formerly499100c5b6
[formerly6ec9c1fac4
] [formerly9c9a068908
] [formerlyf48474fc82
[formerly9c9a068908
[formerly b24c130aa9c612822dda92a9820912b0cd7bc852]]]] Former-commit-id:f48474fc82
Former-commit-id:0ff9252024
[formerly398f71471d
] [formerly bd145bd7ef91d95a7d99e1c2c708c0288c079123 [formerlyb11413b7f0
]] Former-commit-id: ed15417823f2dbb45b3e4174ea8470994e981549 [formerly6b0c3820d8
] Former-commit-id:577c2b88ab
This commit is contained in:
parent
fd08ca5acc
commit
16a23467c4
2 changed files with 8 additions and 32 deletions
|
@ -41,18 +41,18 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
|||
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
import com.raytheon.viz.gfe.core.parm.Parm;
|
||||
import com.raytheon.viz.gfe.core.script.NewInputValidator;
|
||||
import com.raytheon.viz.gfe.smarttool.SmartToolEdit;
|
||||
import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
||||
|
||||
/**
|
||||
* Dialog for creating new smart tools
|
||||
* Dialog for creating new smart tools.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 20, 2008 njensen Initial creation
|
||||
* Nov 12, 2012 1298 rferrel Changes for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -74,6 +74,7 @@ public class NewToolDialog extends CaveJFACEDialog {
|
|||
super(aShell);
|
||||
title = aTitle;
|
||||
this.validator = validator;
|
||||
setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -133,13 +134,9 @@ public class NewToolDialog extends CaveJFACEDialog {
|
|||
@Override
|
||||
protected void createButtonsForButtonBar(Composite parent) {
|
||||
|
||||
// okButton = createButton(parent, IDialogConstants.OK_ID,
|
||||
// IDialogConstants.OK_LABEL, true);
|
||||
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL,
|
||||
true);
|
||||
|
||||
// cancelButton = createButton(parent, IDialogConstants.CANCEL_ID,
|
||||
// IDialogConstants.CANCEL_LABEL, false);
|
||||
createButton(parent, IDialogConstants.CANCEL_ID,
|
||||
IDialogConstants.CANCEL_LABEL, false);
|
||||
}
|
||||
|
@ -164,8 +161,6 @@ public class NewToolDialog extends CaveJFACEDialog {
|
|||
top.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
|
||||
|
||||
Label label = new Label(top, SWT.NONE);
|
||||
// label.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false,
|
||||
// false));
|
||||
label.setText("Name");
|
||||
|
||||
text = new Text(top, SWT.BORDER);
|
||||
|
@ -193,22 +188,6 @@ public class NewToolDialog extends CaveJFACEDialog {
|
|||
parms.setSelection(0);
|
||||
}
|
||||
|
||||
// Group typeGroup = new Group(comp, SWT.BORDER);
|
||||
// typeGroup.setText("Tool Type:");
|
||||
//
|
||||
// Button numericButton = new Button(typeGroup, SWT.RADIO);
|
||||
// numericButton.setText("numeric");
|
||||
// numericButton.setLayoutData(new GridData(SWT.BEGINNING,
|
||||
// SWT.BEGINNING,
|
||||
// false, false));
|
||||
// numericButton.setBounds(10, 20, 120, 30);
|
||||
//
|
||||
// Button pointButton = new Button(typeGroup, SWT.RADIO);
|
||||
// pointButton.setText("point-based");
|
||||
// pointButton.setBounds(10, 50, 120, 30);
|
||||
//
|
||||
// typeGroup.pack();
|
||||
|
||||
applyDialogFont(composite);
|
||||
return composite;
|
||||
}
|
||||
|
@ -237,12 +216,4 @@ public class NewToolDialog extends CaveJFACEDialog {
|
|||
private boolean isInputValid() {
|
||||
return (validator.isValid(text.getText()) == null);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Shell shell = new Shell(SWT.DIALOG_TRIM);
|
||||
NewToolDialog d = new NewToolDialog(shell, "MyTool",
|
||||
new NewInputValidator());
|
||||
d.open();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import com.raytheon.viz.gfe.dialogs.NewToolDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 21, 2008 njensen Initial creation
|
||||
* Nov 12, 2012 1298 rferrel Changes for non-blocking NewToolDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,8 +52,12 @@ public class NewAction extends AbstractSmartToolAction {
|
|||
if (!utility) {
|
||||
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.
|
||||
NewToolDialog d = new NewToolDialog(shell, "MyTool",
|
||||
new NewInputValidator());
|
||||
d.setBlockOnOpen(false);
|
||||
d.open();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue