use of com.att.aro.ui.view.statistics.statemachine.RRCStateMachineSimulationPanelWiFi in project VideoOptimzer by attdevsupport.
the class StatisticsTab method layoutRrcStateMachineSimulator.
/**
* 3G, LTE, and WiFi render different attributes for the RRC sub-panel on the statics tab.
* This takes care of ensuring the right ones are used.
*
* @param rrcStateMachineType
*/
private void layoutRrcStateMachineSimulator(RrcStateMachineType rrcStateMachineType) {
switch(rrcStateMachineType) {
case Type3G:
rrcStateMachineSimulationPanel3G = new RRCStateMachineSimulationPanel3G();
if (rrcStateMachineSimulationPanelLTE != null) {
mainPanel.remove(rrcStateMachineSimulationPanelLTE);
}
if (rrcStateMachineSimulationPanelWiFi != null) {
mainPanel.remove(rrcStateMachineSimulationPanelWiFi);
}
rrcStateMachineSimulationPanelLTE = null;
rrcStateMachineSimulationPanelWiFi = null;
mainPanel.add(rrcStateMachineSimulationPanel3G, new GridBagConstraints(0, 9, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 10, 10), 0, 0));
break;
case LTE:
rrcStateMachineSimulationPanelLTE = new RRCStateMachineSimulationPanelLTE();
if (rrcStateMachineSimulationPanel3G != null) {
mainPanel.remove(rrcStateMachineSimulationPanel3G);
}
if (rrcStateMachineSimulationPanelWiFi != null) {
mainPanel.remove(rrcStateMachineSimulationPanelWiFi);
}
rrcStateMachineSimulationPanel3G = null;
rrcStateMachineSimulationPanelWiFi = null;
mainPanel.add(rrcStateMachineSimulationPanelLTE, new GridBagConstraints(0, 9, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 10, 10), 0, 0));
break;
case WiFi:
rrcStateMachineSimulationPanelWiFi = new RRCStateMachineSimulationPanelWiFi();
if (rrcStateMachineSimulationPanel3G != null) {
mainPanel.remove(rrcStateMachineSimulationPanel3G);
}
if (rrcStateMachineSimulationPanelLTE != null) {
mainPanel.remove(rrcStateMachineSimulationPanelLTE);
}
rrcStateMachineSimulationPanel3G = null;
rrcStateMachineSimulationPanelLTE = null;
mainPanel.add(rrcStateMachineSimulationPanelWiFi, new GridBagConstraints(0, 9, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 10, 10), 0, 0));
break;
default:
throw new AROUIPanelException("Energy render implementation not available.");
}
}
Aggregations