Merge "Issue #1287 Changes for non-blocking TimeScalePeriodsDialog." into development
Former-commit-id:2cf0d131a3
[formerly01bd16bbd7
] [formerlyeb660ac54d
] [formerly4bc57aec7e
[formerlyeb660ac54d
[formerly edfda206905211559bfd5b384ccae129d11bb5cb]]] Former-commit-id:4bc57aec7e
Former-commit-id: 048afb4ea87af480a3169c6b815de7e73cf86e14 [formerly79a5d07605
] Former-commit-id:55186d5a74
This commit is contained in:
commit
f111a337c7
2 changed files with 17 additions and 10 deletions
|
@ -30,7 +30,7 @@ import com.raytheon.viz.gfe.core.ISelectTimeRangeManager;
|
|||
import com.raytheon.viz.gfe.dialogs.TimeScalePeriodsDialog;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Action class to display the Time Scale Periods dialog.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -38,6 +38,7 @@ import com.raytheon.viz.gfe.dialogs.TimeScalePeriodsDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 23, 2009 randerso Initial creation
|
||||
* Oct 29, 2012 1287 rferrel Changes for non-blocking TimeScalePeriodsDialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -46,6 +47,7 @@ import com.raytheon.viz.gfe.dialogs.TimeScalePeriodsDialog;
|
|||
*/
|
||||
|
||||
public class ShowTimeScalePeriodsDialog extends AbstractHandler {
|
||||
private TimeScalePeriodsDialog dialog;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -61,16 +63,20 @@ public class ShowTimeScalePeriodsDialog extends AbstractHandler {
|
|||
return null;
|
||||
}
|
||||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
if (dialog == null || dialog.getShell() == null || dialog.isDisposed()) {
|
||||
|
||||
ISelectTimeRangeManager selectTRmgr = dataManager
|
||||
.getSelectTimeRangeManager();
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
TimeScalePeriodsDialog dialog = new TimeScalePeriodsDialog(shell,
|
||||
selectTRmgr);
|
||||
dialog.setBlockOnOpen(true);
|
||||
dialog.open();
|
||||
ISelectTimeRangeManager selectTRmgr = dataManager
|
||||
.getSelectTimeRangeManager();
|
||||
|
||||
dialog = new TimeScalePeriodsDialog(shell, selectTRmgr);
|
||||
dialog.setBlockOnOpen(false);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,7 @@ import com.raytheon.viz.ui.dialogs.CaveJFACEDialog;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 23, 2009 randerso Initial creation
|
||||
* Oct 29, 2012 1287 rferrel Code clean up for non-blocking dialog.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -63,7 +64,7 @@ public class TimeScalePeriodsDialog extends CaveJFACEDialog {
|
|||
ISelectTimeRangeManager selectTRmgr) {
|
||||
super(parent);
|
||||
|
||||
this.setShellStyle(SWT.TITLE | SWT.CLOSE);
|
||||
this.setShellStyle(SWT.DIALOG_TRIM);
|
||||
this.selectTRmgr = selectTRmgr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue