Issue #1229 Alow TextWS to be a blocking dialog when stand alone.
Change-Id: I654f8528bb45be4be1deb58e96b073b4b46ef3d1 Former-commit-id:e287b4cf00
[formerly145b502c31
] [formerlyce8157b796
] [formerlye287b4cf00
[formerly145b502c31
] [formerlyce8157b796
] [formerly455bd4a23e
[formerlyce8157b796
[formerly defd0805252f955ca74743b1367ddf0f7e45b2db]]]] Former-commit-id:455bd4a23e
Former-commit-id:786ee2c492
[formerly9965ae1281
] [formerly 457216c7576c916832e4c4b7af4f3f52e7415d8b [formerlye8513d7cf3
]] Former-commit-id: 55c1fd183338d03026ef80456205c1e78bf89f3b [formerly8c90e1c4b8
] Former-commit-id:965437b87d
This commit is contained in:
parent
3433045261
commit
99be72df56
2 changed files with 24 additions and 3 deletions
|
@ -4,6 +4,7 @@ import org.eclipse.swt.widgets.Display;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
import com.raytheon.uf.common.serialization.SerializationUtil;
|
import com.raytheon.uf.common.serialization.SerializationUtil;
|
||||||
|
import com.raytheon.viz.ui.dialogs.CaveSWTDialogBase.CAVE;
|
||||||
import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
|
import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,6 +37,7 @@ import com.raytheon.viz.ui.personalities.awips.AbstractCAVEComponent;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Apr 28, 2011 mschenke Initial creation
|
* Apr 28, 2011 mschenke Initial creation
|
||||||
|
* Oct 02, 2012 1229 rferrel Make a blocking dialog.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -56,7 +58,7 @@ public class TextWorkstationComponent extends AbstractCAVEComponent {
|
||||||
protected void startInternal(String componentName) throws Exception {
|
protected void startInternal(String componentName) throws Exception {
|
||||||
SerializationUtil.getJaxbContext();
|
SerializationUtil.getJaxbContext();
|
||||||
TextWorkstationDlg textWorkstationDlg = new TextWorkstationDlg(
|
TextWorkstationDlg textWorkstationDlg = new TextWorkstationDlg(
|
||||||
new Shell(Display.getCurrent()));
|
new Shell(Display.getCurrent()), CAVE.NONE);
|
||||||
textWorkstationDlg.open();
|
textWorkstationDlg.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import java.util.TimeZone;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
import java.util.TimerTask;
|
import java.util.TimerTask;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.Assert;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
|
@ -88,6 +89,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* 03Nov2011 11450 rferrel Change how old products pruge so it is no longer
|
* 03Nov2011 11450 rferrel Change how old products pruge so it is no longer
|
||||||
* on times on two machines being in synch.
|
* on times on two machines being in synch.
|
||||||
* 26Sep2012 1196 lvenable Dialog refactor to not block.
|
* 26Sep2012 1196 lvenable Dialog refactor to not block.
|
||||||
|
* 02Oct2012 1229 rferrel Option to allow blocking when top dialog.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -141,10 +143,27 @@ public class TextWorkstationDlg extends CaveSWTDialog implements
|
||||||
/** Select user ID dialog */
|
/** Select user ID dialog */
|
||||||
private SelectUserIdDlg userIdDlg;
|
private SelectUserIdDlg userIdDlg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a non-blocking dialog
|
||||||
|
*
|
||||||
|
* @param parent
|
||||||
|
*/
|
||||||
public TextWorkstationDlg(Shell parent) {
|
public TextWorkstationDlg(Shell parent) {
|
||||||
|
this(parent, CAVE.DO_NOT_BLOCK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create dialog specifying NONE for blocking and DO_NOT_BLOCK for
|
||||||
|
* non-blocking dialog.
|
||||||
|
*
|
||||||
|
* @param parent
|
||||||
|
* @param block
|
||||||
|
* - CAVE.DO_NOT_BLOCK or CAVE.NONE
|
||||||
|
*/
|
||||||
|
public TextWorkstationDlg(Shell parent, int block) {
|
||||||
super(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE,
|
super(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE,
|
||||||
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.INDEPENDENT_SHELL
|
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.INDEPENDENT_SHELL | block);
|
||||||
| CAVE.DO_NOT_BLOCK);
|
Assert.isTrue(block == CAVE.DO_NOT_BLOCK || block == CAVE.NONE);
|
||||||
setText("Text Workstation");
|
setText("Text Workstation");
|
||||||
|
|
||||||
TextDisplayModel.getInstance().setTextAviation(
|
TextDisplayModel.getInstance().setTextAviation(
|
||||||
|
|
Loading…
Add table
Reference in a new issue