Omaha #3161 - Added SWT dialog trim to the dialogs for thin client.
Former-commit-id: 3d267d269db54c12852b6b6e8c529d826fad1d90
This commit is contained in:
parent
098322ded4
commit
588d3084da
1 changed files with 43 additions and 51 deletions
|
@ -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("");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue