Issue #1229 Changes for non-blocking ResourceEditorDlg.

Change-Id: I2cc2bb30efd3236ec1c207e72f59352d6a266764

Former-commit-id: 4208dafcfa [formerly e49a28b546] [formerly 4208dafcfa [formerly e49a28b546] [formerly 5a3b0339b9 [formerly 50739bb740c150b10c3cbde3581fe57fbd48295e]]]
Former-commit-id: 5a3b0339b9
Former-commit-id: 713f85c33d [formerly f699a83fec]
Former-commit-id: c34c6c02b7
This commit is contained in:
Roger Ferrel 2012-10-10 08:23:21 -05:00
parent 0c1532b6db
commit e24e7e5d1c
2 changed files with 23 additions and 9 deletions

View file

@ -133,6 +133,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 10/02/2012 1229 rferrel Changes to work with non-blocking WeatherPlotDialog.
* 10/04/2012 1229 rferrel Changes for non-blocking ClimateMenuDlg.
* 10/09/2012 1229 rferrel Made dialog non-blocking.
* 10/10/2012 1229 rferrel Changes for non-blocking ResourceEditorDlg.
*
* </pre>
*
@ -486,13 +487,12 @@ public class TafMonitorDlg extends CaveSWTDialog {
setupMenuItem.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
if (resDlg == null) {
if (resDlg == null || resDlg.getShell() == null
|| resDlg.isDisposed()) {
resDlg = new ResourceEditorDlg(shell);
resDlg.open();
resDlg = null;
} else {
resDlg.showDialog();
resDlg.bringToTop();
}
}
});

View file

@ -37,6 +37,23 @@ import org.eclipse.swt.widgets.Shell;
import com.raytheon.viz.aviation.AviationDialog;
import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
/**
* This is a dialog changing the values for the AvnFPS resources.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Initial creation
* Oct 10, 2012 1229 rferrel Make dialog non-blocking.
*
* </pre>
*
* @author rferrel
* @version 1.0
*/
public class ResourceEditorDlg extends CaveSWTDialog implements IResize {
private ScrolledComposite scrolledComp;
@ -52,7 +69,8 @@ public class ResourceEditorDlg extends CaveSWTDialog implements IResize {
private ResourceEditorHelpDlg helpDlg;
public ResourceEditorDlg(Shell parent) {
super(parent, SWT.SHELL_TRIM, CAVE.PERSPECTIVE_INDEPENDENT);
super(parent, SWT.SHELL_TRIM, CAVE.PERSPECTIVE_INDEPENDENT
| CAVE.DO_NOT_BLOCK);
setText("AvnFPS Resource Editor");
}
@ -198,8 +216,4 @@ public class ResourceEditorDlg extends CaveSWTDialog implements IResize {
scrolledComp.setMinSize(resourceComp.computeSize(SWT.DEFAULT,
SWT.DEFAULT));
}
public void showDialog() {
shell.setFocus();
}
}