Merge "Issue #1298 Changes to make EmptyEditAreaWarningDialog and TimeRangeWarningDialog modal and blocking." into development

Former-commit-id: 074543d75e [formerly f368b93484] [formerly 297d2bbc9c [formerly badb1ba2ed966e920a0dce9d1612dc07e4a21049]]
Former-commit-id: 297d2bbc9c
Former-commit-id: 24dd8a1bc7
This commit is contained in:
Lee Venable 2012-11-07 12:31:39 -06:00 committed by Gerrit Code Review
commit 412c29f116
3 changed files with 12 additions and 4 deletions

View file

@ -40,6 +40,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 3, 2008 njensen Initial creation
* Nov 7, 2012 1298 rferrel Part of non-blocking made dialog modal.
*
* </pre>
*
@ -64,7 +65,7 @@ public class EmptyEditAreaWarningDialog extends CaveJFACEDialog {
public EmptyEditAreaWarningDialog(Shell parentShell) {
super(parentShell);
this.title = "Empty Edit Area Warning";
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
}
/*

View file

@ -40,6 +40,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Dec 1, 2009 1426 ryu Initial creation
* Nov 7, 2012 1298 rferrel Part of non-blocking made dialog modal.
*
* </pre>
*
@ -63,7 +64,7 @@ public class TimeRangeWarningDialog extends CaveJFACEDialog {
public TimeRangeWarningDialog(Shell parentShell) {
super(parentShell);
this.title = "Time Range Warning";
this.setShellStyle(SWT.TITLE | SWT.MODELESS | SWT.CLOSE);
this.setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
}
/*

View file

@ -33,7 +33,6 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.dataplugin.gfe.StatusConstants;
import com.raytheon.uf.common.dataplugin.gfe.reference.ReferenceData;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
@ -61,6 +60,8 @@ import com.raytheon.viz.gfe.dialogs.TimeRangeWarningDialog;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 3, 2010 njensen Initial creation
* Nov 7, 2012 1298 rferrel Keep EmptyEditAreaWarningDialog blocking.
* Keep TimeRangeWarningdialog blocking.
*
* </pre>
*
@ -69,7 +70,8 @@ import com.raytheon.viz.gfe.dialogs.TimeRangeWarningDialog;
*/
public class EditActionProcessor {
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(EditActionProcessor.class);
private final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(EditActionProcessor.class);
private DataManager dataMgr;
@ -454,9 +456,11 @@ public class EditActionProcessor {
VizApp.runSync(new Runnable() {
@Override
public void run() {
// Simple warning keep as a blocking dialog.
TimeRangeWarningDialog prompt = new TimeRangeWarningDialog(
PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell());
prompt.setBlockOnOpen(true);
returnCode = prompt.open();
}
});
@ -471,9 +475,11 @@ public class EditActionProcessor {
VizApp.runSync(new Runnable() {
@Override
public void run() {
// Simple warning keep as a blocking dialog.
EmptyEditAreaWarningDialog prompt = new EmptyEditAreaWarningDialog(
PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getShell());
prompt.setBlockOnOpen(true);
returnCode = prompt.open();
}
});