Omaha #3161 - Added SWT dialog trim to the dialogs for thin client.

Former-commit-id: b3f0099029 [formerly 02037fc2df] [formerly 588d3084da] [formerly b3f0099029 [formerly 02037fc2df] [formerly 588d3084da] [formerly 07a7a00256 [formerly 588d3084da [formerly 3d267d269db54c12852b6b6e8c529d826fad1d90]]]]
Former-commit-id: 07a7a00256
Former-commit-id: 4f413032e3 [formerly e5f1eaf67d] [formerly fc579be7cecbd579b95c1f5d5f7bbe974dc68c31 [formerly c6e53f6a9b]]
Former-commit-id: 049ab47ed6895126be0b8ff0b09a75d6c325e763 [formerly 6046a2cbe1]
Former-commit-id: 44f67ce5ad
This commit is contained in:
Lee Venable 2014-06-30 13:15:31 -05:00
parent daa232b3d2
commit c65c39934d

View file

@ -57,6 +57,8 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* Oct 31, 2011 8510 rferrel made PRIMARY_MODEL and add check for nonblank productID.
* Sep 20, 2012 1196 rferrel No longer Blocks
* 12/07/2012 15555 m.gamazaychikov Fixed the implementation for New Proximity Alarm.
* Jun 30, 2014 #3161 lvenable Added SWT dialog trim to the dialogs for thin client.
*
* </pre>
*
* @author mnash
@ -109,7 +111,7 @@ public class NewAlarmDlg extends CaveSWTDialog {
*/
protected NewAlarmDlg(Shell parentShell, String alarm_or_alert,
AlarmAlertProduct product) {
super(parentShell, SWT.PRIMARY_MODAL | SWT.RESIZE,
super(parentShell, SWT.DIALOG_TRIM | SWT.PRIMARY_MODAL | SWT.RESIZE,
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.DO_NOT_BLOCK);
if ("PROXIMITY".equals(alarm_or_alert)) {
productType = ProductType.Proximity_Alarm;
@ -332,33 +334,30 @@ public class NewAlarmDlg extends CaveSWTDialog {
aorData = new GridData(SWT.DEFAULT, SWT.CENTER, false, false);
AOR.setLayoutData(aorData);
/*
* DR15555 - Set the AOR selection to:
* 1. true - for new alarm
* 2. product's state - for existing alarm
* DR15555 - Set the AOR selection to: 1. true - for new alarm 2.
* product's state - for existing alarm
*/
if (prod.getProductId() != "") {
AOR.setSelection(prod.isAor());
}
else {
AOR.setSelection(true);
AOR.setBackground(Display.getCurrent().getSystemColor(
} else {
AOR.setSelection(true);
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_YELLOW));
}
AOR.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
if (AOR.getSelection() == true) {
/*
* DR15555 - handle the AOR selection:
* - set the background yellow
* - set the AORDistance text to empty string
* - set the ugcList text to empty string
*/
/*
* DR15555 - handle the AOR selection: - set the background
* yellow - set the AORDistance text to empty string - set
* the ugcList text to empty string
*/
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_YELLOW));
AORDistance.setText("");
ugcList.setText("");
} else {
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
@ -378,31 +377,28 @@ public class NewAlarmDlg extends CaveSWTDialog {
aorData.widthHint = 60;
AORDistance.setLayoutData(aorData);
/*
* DR15555 - Set the AORDistance selection to:
* 1. empty string - for new alarm
* 2. product's distance - for existing alarm
* DR15555 - Set the AORDistance selection to: 1. empty string - for new
* alarm 2. product's distance - for existing alarm
*/
if (prod.getProductId() != "") {
AORDistance.setText(prod.getAorDistance());
}
else {
AORDistance.setText("");
} else {
AORDistance.setText("");
}
AORDistance.addListener(SWT.KeyDown, new Listener() {
@Override
public void handleEvent(Event e) {
/*
* DR15555 - handle the AOR selection:
* - set the AOR background gray
* - un-select the AOR
* - set the ugcList text to empty string
*/
AOR.setSelection(false);
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
ugcList.setText("");
}
public void handleEvent(Event e) {
/*
* DR15555 - handle the AOR selection: - set the AOR background
* gray - un-select the AOR - set the ugcList text to empty
* string
*/
AOR.setSelection(false);
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
ugcList.setText("");
}
});
distanceLabel = new Combo(aor, SWT.READ_ONLY);
@ -411,8 +407,7 @@ public class NewAlarmDlg extends CaveSWTDialog {
aorData.horizontalAlignment = SWT.RIGHT;
distanceLabel.setLayoutData(aorData);
/*
* DR15555 - Set the distanceLabel selection to:
* 1. 'mi' - for new alarm
* DR15555 - Set the distanceLabel selection to: 1. 'mi' - for new alarm
* 2. product's label - for existing alarm
*/
if (prod.getProductId() != "") {
@ -432,29 +427,26 @@ public class NewAlarmDlg extends CaveSWTDialog {
ugcList = new Text(ugc, SWT.SINGLE | SWT.BORDER);
ugcList.setLayoutData(gd);
/*
* DR15555 - Set the ugcList selection to:
* 1. empty string - for new alarm
* 2. product's ugcList - for existing alarm
* DR15555 - Set the ugcList selection to: 1. empty string - for new
* alarm 2. product's ugcList - for existing alarm
*/
if (prod.getProductId() != "") {
ugcList.setText(prod.getUgcList());
}
else {
ugcList.setText("");
} else {
ugcList.setText("");
}
ugcList.addListener(SWT.KeyDown, new Listener() {
@Override
public void handleEvent(Event e) {
/*
* DR15555 - handle the ugcList selection:
* - set the AOR background gray
* - un-select the AOR
* - set the AORDistance text to empty string
*/
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
AOR.setSelection(false);
AORDistance.setText("");
/*
* DR15555 - handle the ugcList selection: - set the AOR
* background gray - un-select the AOR - set the AORDistance
* text to empty string
*/
AOR.setBackground(Display.getCurrent().getSystemColor(
SWT.COLOR_WIDGET_BACKGROUND));
AOR.setSelection(false);
AORDistance.setText("");
}
});