Merge "Issue #1229 Changes for non-blocking /SendDialog." into development
Former-commit-id:7c76c9e169
[formerly7c76c9e169
[formerly 0f10e8442ad8cef0cb13e68aec158f8a6bb3d23e]] Former-commit-id:469a155107
Former-commit-id:38d4ac0f89
This commit is contained in:
commit
8fc59ae4bb
2 changed files with 73 additions and 49 deletions
|
@ -217,6 +217,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* 08AGU2012 15613 zhao Modified highlightTAF()
|
* 08AGU2012 15613 zhao Modified highlightTAF()
|
||||||
* 04OCT2012 1229 rferrel Changes for non-blocking LoaderDialog.
|
* 04OCT2012 1229 rferrel Changes for non-blocking LoaderDialog.
|
||||||
* 09OCT2012 1229 rferrel Changes for non-blocking QcDialog.
|
* 09OCT2012 1229 rferrel Changes for non-blocking QcDialog.
|
||||||
|
* 09OCT2012 1229 rferrel Changes for non-blocking SendDialog.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -522,6 +523,8 @@ public class TafViewerEditorDlg extends Dialog implements ITafSettable,
|
||||||
|
|
||||||
private QcDialog qcDlg;
|
private QcDialog qcDlg;
|
||||||
|
|
||||||
|
private SendDialog sendDlg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -896,6 +899,10 @@ public class TafViewerEditorDlg extends Dialog implements ITafSettable,
|
||||||
qcDlg.bringToTop();
|
qcDlg.bringToTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sendDlg != null && sendDlg.getShell() != null
|
||||||
|
&& sendDlg.isDisposed() == false) {
|
||||||
|
sendDlg.bringToTop();
|
||||||
|
}
|
||||||
shell.setActive();
|
shell.setActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -911,6 +918,9 @@ public class TafViewerEditorDlg extends Dialog implements ITafSettable,
|
||||||
if (qcDlg != null) {
|
if (qcDlg != null) {
|
||||||
qcDlg.hide();
|
qcDlg.hide();
|
||||||
}
|
}
|
||||||
|
if (sendDlg != null) {
|
||||||
|
sendDlg.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setVisible(boolean state) {
|
private void setVisible(boolean state) {
|
||||||
|
@ -1776,14 +1786,27 @@ public class TafViewerEditorDlg extends Dialog implements ITafSettable,
|
||||||
printForecast(editorTafTabComp.getTextEditorControl()
|
printForecast(editorTafTabComp.getTextEditorControl()
|
||||||
.getText());
|
.getText());
|
||||||
}
|
}
|
||||||
SendDialog sendDlg = new SendDialog(shell,
|
|
||||||
editorTafTabComp, msgStatComp, sendCollectMI
|
if (sendDlg == null || sendDlg.getShell() == null
|
||||||
.getSelection());
|
|| sendDlg.isDisposed()) {
|
||||||
sendDlg.open();
|
sendDlg = new SendDialog(shell, editorTafTabComp,
|
||||||
|
msgStatComp, sendCollectMI.getSelection());
|
||||||
|
sendDlg.setCloseCallback(new ICloseCallback() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void dialogClosed(Object returnValue) {
|
||||||
// sendDlg sets the "taf sent" field only
|
// sendDlg sets the "taf sent" field only
|
||||||
if (editorTafTabComp.isTafSent()) {
|
if (editorTafTabComp.isTafSent()) {
|
||||||
editorTafTabComp.updateTafSent(true);
|
editorTafTabComp.updateTafSent(true);
|
||||||
}
|
}
|
||||||
|
sendDlg = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
sendDlg.open();
|
||||||
|
} else {
|
||||||
|
sendDlg.bringToTop();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
putMessageToForecaster("Cannot send forecast: Press Syntax before transmission");
|
putMessageToForecaster("Cannot send forecast: Press Syntax before transmission");
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
||||||
* 4/15/2009 1982 grichard Provide feedback when saving a working TAF.
|
* 4/15/2009 1982 grichard Provide feedback when saving a working TAF.
|
||||||
* 12/08/2011 11745 rferrel Updated header time to transmission time.
|
* 12/08/2011 11745 rferrel Updated header time to transmission time.
|
||||||
* 08AUG2012 15613 zhao Determine proper BBB for transmission
|
* 08AUG2012 15613 zhao Determine proper BBB for transmission
|
||||||
|
* 09OCT2012 1229 rferrel Make dialog non-blocking.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -146,7 +147,7 @@ public class SendDialog extends CaveSWTDialog {
|
||||||
public SendDialog(Shell parent, EditorTafTabComp tabComp,
|
public SendDialog(Shell parent, EditorTafTabComp tabComp,
|
||||||
IStatusSettable msgStatComp, boolean sendCollective) {
|
IStatusSettable msgStatComp, boolean sendCollective) {
|
||||||
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
super(parent, SWT.DIALOG_TRIM | SWT.RESIZE,
|
||||||
CAVE.PERSPECTIVE_INDEPENDENT);
|
CAVE.PERSPECTIVE_INDEPENDENT | CAVE.DO_NOT_BLOCK);
|
||||||
setText("AvnFPS Send");
|
setText("AvnFPS Send");
|
||||||
|
|
||||||
this.tabComp = tabComp;
|
this.tabComp = tabComp;
|
||||||
|
@ -412,7 +413,6 @@ public class SendDialog extends CaveSWTDialog {
|
||||||
xmitBbb = getXmitBbb(type, siteId);
|
xmitBbb = getXmitBbb(type, siteId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update Header Time to transmission time.
|
// Update Header Time to transmission time.
|
||||||
tafText = TIMESTAMP_PATTERN.matcher(tafText).replaceFirst(
|
tafText = TIMESTAMP_PATTERN.matcher(tafText).replaceFirst(
|
||||||
xmitTimestamp);
|
xmitTimestamp);
|
||||||
|
@ -474,7 +474,8 @@ public class SendDialog extends CaveSWTDialog {
|
||||||
TafQueueRequest request = new TafQueueRequest();
|
TafQueueRequest request = new TafQueueRequest();
|
||||||
request.setType(Type.GET_LIST);
|
request.setType(Type.GET_LIST);
|
||||||
request.setState(TafQueueRecord.TafQueueState.SENT);
|
request.setState(TafQueueRecord.TafQueueState.SENT);
|
||||||
ServerResponse<java.util.List<String>> response = (ServerResponse<java.util.List<String>>) ThriftClient.sendRequest(request);
|
ServerResponse<java.util.List<String>> response = (ServerResponse<java.util.List<String>>) ThriftClient
|
||||||
|
.sendRequest(request);
|
||||||
java.util.List<String> payload = response.getPayload();
|
java.util.List<String> payload = response.getPayload();
|
||||||
String[] records = (String[]) payload.toArray(new String[0]);
|
String[] records = (String[]) payload.toArray(new String[0]);
|
||||||
int numRecords = records.length;
|
int numRecords = records.length;
|
||||||
|
|
Loading…
Add table
Reference in a new issue