use of com.att.aro.ui.utils.CommonHelper in project VideoOptimzer by attdevsupport.
the class BpTestStatisticsPanel method setSpeedThrottleValue.
private void setSpeedThrottleValue(CollectOptions collectOptions) {
JLabel downlinkLabelTemp = getLabelMap().get(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.downlink"));
JLabel uplinkLabelTemp = getLabelMap().get(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.uplink"));
if (collectOptions.isAttnrProfile()) {
downlinkLabelTemp.setText("Attenuation Profile: ");
downlinkLabel.setText(collectOptions.getAttnrProfileName());
uplinkLabelTemp.setVisible(false);
uplinkLabel.setVisible(false);
} else {
int dsDelay = collectOptions.getDsDelay();
int usDelay = collectOptions.getUsDelay();
int speedThrottleDL = collectOptions.getThrottleDL();
int speedThrottleUL = collectOptions.getThrottleUL();
downlinkLabelTemp.setText(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.downlink"));
uplinkLabelTemp.setText(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.uplink"));
uplinkLabelTemp.setVisible(true);
uplinkLabel.setVisible(true);
CommonHelper attenuator = new CommonHelper();
if (dsDelay > 0 || usDelay > 0) {
this.downlinkLabel.setText(attenuator.transferSignalSignDownload(dsDelay) + " - " + numFormat.format(dsDelay) + " ms");
this.uplinkLabel.setText(attenuator.transferSignalSignUpload(usDelay) + " - " + numFormat.format(usDelay) + " ms");
} else {
if (speedThrottleDL < 0) {
this.downlinkLabel.setText(ResourceBundleHelper.getMessageString("waterfall.na"));
} else {
this.downlinkLabel.setText(attenuator.numberTransferSignalDL(speedThrottleDL) + " - " + attenuator.messageConvert(speedThrottleDL));
}
if (speedThrottleUL < 0) {
this.uplinkLabel.setText(ResourceBundleHelper.getMessageString("waterfall.na"));
} else {
this.uplinkLabel.setText(attenuator.numberTransferSignalUL(speedThrottleUL) + " - " + attenuator.messageConvert(speedThrottleUL));
}
}
}
}
use of com.att.aro.ui.utils.CommonHelper in project VideoOptimzer by attdevsupport.
the class DeviceNetworkProfilePanel method refresh.
public void refresh(AROTraceData aModel) {
this.dateValueLabel.setText(aModel.getAnalyzerResult().getTraceresult().getTraceDateTime().toString());
File directory = new File(aModel.getAnalyzerResult().getTraceresult().getTraceDirectory());
this.traceValueLabel.setText(getTracePath(directory.getName()));
this.byteCountTotalLabel.setText(Long.toString(aModel.getAnalyzerResult().getStatistic().getTotalByte()));
this.profileValueLabel.setText(aModel.getAnalyzerResult().getProfile().getName());
if (TraceResultType.TRACE_DIRECTORY.equals(aModel.getAnalyzerResult().getTraceresult().getTraceResultType())) {
TraceDirectoryResult tracedirectoryResult = (TraceDirectoryResult) aModel.getAnalyzerResult().getTraceresult();
this.networkTypeValueLabel.setText(tracedirectoryResult.getNetworkTypesList());
CollectOptions collectOptions = tracedirectoryResult.getCollectOptions();
if (collectOptions != null) {
if (collectOptions.isAttnrProfile()) {
this.downlinkLabel.setText("Attenuation Profile: ");
this.downlinkValueLabel.setText(collectOptions.getAttnrProfileName());
this.uplinkLabel.setVisible(false);
this.uplinkValueLabel.setVisible(false);
} else {
int dsDelay = collectOptions.getDsDelay();
int usDelay = collectOptions.getUsDelay();
int speedThrottleDL = collectOptions.getThrottleDL();
int speedThrottleUL = collectOptions.getThrottleUL();
this.downlinkLabel.setText(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.downlink"));
this.uplinkLabel.setText(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.uplink"));
this.uplinkLabel.setVisible(true);
this.uplinkValueLabel.setVisible(true);
CommonHelper attenuator = new CommonHelper();
NumberFormat numFormat = NumberFormat.getIntegerInstance();
if (dsDelay > 0 || usDelay > 0) {
this.downlinkValueLabel.setText(attenuator.transferSignalSignDownload(dsDelay) + " - " + numFormat.format(dsDelay) + " ms");
this.uplinkValueLabel.setText(attenuator.transferSignalSignUpload(usDelay) + " - " + numFormat.format(usDelay) + " ms");
} else {
// check dl and ul
if (speedThrottleDL < 0) {
this.downlinkValueLabel.setText(ResourceBundleHelper.getMessageString("waterfall.na"));
} else {
this.downlinkValueLabel.setText(attenuator.numberTransferSignalDL(speedThrottleDL) + " - " + attenuator.messageConvert(speedThrottleDL));
}
if (speedThrottleUL < 0) {
this.uplinkValueLabel.setText(ResourceBundleHelper.getMessageString("waterfall.na"));
} else {
this.uplinkValueLabel.setText(attenuator.numberTransferSignalUL(speedThrottleUL) + " - " + attenuator.messageConvert(speedThrottleUL));
}
}
}
}
} else {
this.networkTypeValueLabel.setText("");
this.downlinkLabel.setText(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.downlink"));
this.uplinkLabel.setText(ResourceBundleHelper.getMessageString("bestPractice.header.attenuator.uplink"));
this.uplinkLabel.setVisible(true);
this.uplinkValueLabel.setVisible(true);
this.downlinkValueLabel.setText("");
this.uplinkValueLabel.setText("");
}
}
use of com.att.aro.ui.utils.CommonHelper in project VideoOptimzer by attdevsupport.
the class AttenuationConstantPanel method refresh.
private void refresh(CollectOptions collectOptions) {
int dsDelay = collectOptions.getDsDelay();
int usDelay = collectOptions.getUsDelay();
int speedThrottleDL = collectOptions.getThrottleDL();
int speedThrottleUL = collectOptions.getThrottleUL();
CommonHelper attenuator = new CommonHelper();
NumberFormat numFormat = NumberFormat.getIntegerInstance();
if (dsDelay > 0 || usDelay > 0) {
tabPanelCommon.setText(LabelKeys.bestPractice_header_attenuator_downlink, attenuator.transferSignalSignDownload(dsDelay) + " - " + numFormat.format(dsDelay) + " ms");
tabPanelCommon.setText(LabelKeys.bestPractice_header_attenuator_uplink, attenuator.transferSignalSignUpload(usDelay) + " - " + numFormat.format(usDelay) + " ms");
} else {
if (speedThrottleDL < 0) {
tabPanelCommon.setText(LabelKeys.bestPractice_header_attenuator_downlink, ResourceBundleHelper.getMessageString("waterfall.na"));
} else {
tabPanelCommon.setText(LabelKeys.bestPractice_header_attenuator_downlink, attenuator.numberTransferSignalDL(speedThrottleDL) + " - " + attenuator.messageConvert(speedThrottleDL));
}
if (speedThrottleUL < 0) {
tabPanelCommon.setText(LabelKeys.bestPractice_header_attenuator_uplink, ResourceBundleHelper.getMessageString("waterfall.na"));
} else {
tabPanelCommon.setText(LabelKeys.bestPractice_header_attenuator_uplink, attenuator.numberTransferSignalUL(speedThrottleUL) + " - " + attenuator.messageConvert(speedThrottleUL));
}
}
}
Aggregations