Search in sources :

Example 1 with EnergyModelStatisticsLTEPanel

use of com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsLTEPanel in project VideoOptimzer by attdevsupport.

the class StatisticsTab method layoutEnergyEffecencySimulation.

/**
 * 3G, LTE, and WiFi render different attributes for the energy sub-panel on the statics tab.
 * This takes care of ensuring the right ones are used.
 *
 * @param rrcStateMachineType
 */
private void layoutEnergyEffecencySimulation(RrcStateMachineType rrcStateMachineType) {
    switch(rrcStateMachineType) {
        case Type3G:
            energyModelStatistics3GPanel = new EnergyModelStatistics3GPanel();
            if (energyModelStatisticsLTEPanel != null) {
                mainPanel.remove(energyModelStatisticsLTEPanel);
            }
            if (energyModelStatisticsWiFiPanel != null) {
                mainPanel.remove(energyModelStatisticsWiFiPanel);
            }
            energyModelStatisticsLTEPanel = null;
            energyModelStatisticsWiFiPanel = null;
            mainPanel.add(energyModelStatistics3GPanel, new GridBagConstraints(0, 15, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 10, 10), 0, 0));
            break;
        case LTE:
            energyModelStatisticsLTEPanel = new EnergyModelStatisticsLTEPanel();
            if (energyModelStatistics3GPanel != null) {
                mainPanel.remove(energyModelStatistics3GPanel);
            }
            if (energyModelStatisticsWiFiPanel != null) {
                mainPanel.remove(energyModelStatisticsWiFiPanel);
            }
            energyModelStatistics3GPanel = null;
            energyModelStatisticsWiFiPanel = null;
            mainPanel.add(energyModelStatisticsLTEPanel, new GridBagConstraints(0, 15, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(10, 10, 10, 10), 0, 0));
            break;
        case WiFi:
            energyModelStatisticsWiFiPanel = new EnergyModelStatisticsWiFiPanel();
            if (energyModelStatistics3GPanel != null) {
                mainPanel.remove(energyModelStatistics3GPanel);
            }
            if (energyModelStatisticsLTEPanel != null) {
                mainPanel.remove(energyModelStatisticsLTEPanel);
            }
            energyModelStatistics3GPanel = null;
            energyModelStatisticsLTEPanel = null;
            mainPanel.add(energyModelStatisticsWiFiPanel, new GridBagConstraints(0, 15, 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.");
    }
}
Also used : GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) EnergyModelStatistics3GPanel(com.att.aro.ui.view.statistics.energy.EnergyModelStatistics3GPanel) EnergyModelStatisticsLTEPanel(com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsLTEPanel) AROUIPanelException(com.att.aro.ui.exception.AROUIPanelException) EnergyModelStatisticsWiFiPanel(com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsWiFiPanel)

Example 2 with EnergyModelStatisticsLTEPanel

use of com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsLTEPanel in project VideoOptimzer by attdevsupport.

the class StatisticsTab method layoutDataPanel.

/**
 * Adds the various Panels for the Statistics tab.
 *
 * @return the mainPanel The JPanel containing the entire screen.
 */
public JPanel layoutDataPanel() {
    if (mainPanel == null) {
        mainPanel = new JPanel(new GridBagLayout());
        mainPanel.setBackground(UIManager.getColor(AROUIManager.PAGE_BACKGROUND_KEY));
        Insets insets = new Insets(10, 10, 10, 10);
        mainPanel.setOpaque(false);
        mainPanel.setBorder(new RoundedBorder(new Insets(10, 10, 10, 10), Color.WHITE));
        // load graphic header and Export button
        String headerTitle = MessageFormat.format(ResourceBundleHelper.getMessageString("statistics.title"), ApplicationConfig.getInstance().getAppBrandName(), ApplicationConfig.getInstance().getAppShortName());
        ImagePanel logoHeader = UIComponent.getInstance().getLogoHeader(headerTitle);
        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BorderLayout());
        buttonPanel.setOpaque(false);
        buttonPanel.add(getExportBtn(), BorderLayout.EAST);
        // logoHeader.add(getJsonExportBtn(), BorderLayout.WEST);
        logoHeader.add(buttonPanel, BorderLayout.EAST);
        container.add(logoHeader, BorderLayout.NORTH);
        int gridy = -1;
        // top summary
        dateTraceAppDetailPanel = new DateTraceAppDetailPanel();
        mainPanel.add(dateTraceAppDetailPanel, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        // TCP(Session) Statistics
        tcpSessionStatistics = new TCPSessionStatisticsPanel();
        mainPanel.add(tcpSessionStatistics, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        attenuationConstantPanel = new AttenuationConstantPanel();
        mainPanel.add(attenuationConstantPanel, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        ++gridy;
        // End Point Summary
        endPointSummaryPanel = new EndPointSummaryPanel();
        mainPanel.add(endPointSummaryPanel, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        // gridy 5
        // Radio Resource Control State Machine Simulation (default to LTE)
        rrcStateMachineSimulationPanelLTE = new RRCStateMachineSimulationPanelLTE();
        mainPanel.add(rrcStateMachineSimulationPanelLTE, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        // gridy 7
        // Burst Analysis
        burstAnalysisPanel = new BurstAnalysisPanel();
        mainPanel.add(burstAnalysisPanel, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        // gridy 9
        // HTTP Cache Statistics
        httpCacheStatistics = new HTTPCacheStatistics();
        mainPanel.add(httpCacheStatistics, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        layoutDivider(++gridy, insets);
        // gridy 11
        // Energy Efficiency Simulation (default to LTE)
        energyModelStatisticsLTEPanel = new EnergyModelStatisticsLTEPanel();
        mainPanel.add(energyModelStatisticsLTEPanel, new GridBagConstraints(0, ++gridy, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insets, 0, 0));
        rrcStateMachineType = RrcStateMachineType.LTE;
    }
    return mainPanel;
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) BurstAnalysisPanel(com.att.aro.ui.view.statistics.burstanalysis.BurstAnalysisPanel) EndPointSummaryPanel(com.att.aro.ui.view.statistics.endpointsummary.EndPointSummaryPanel) AttenuationConstantPanel(com.att.aro.ui.view.statistics.attenuation.AttenuationConstantPanel) BorderLayout(java.awt.BorderLayout) EnergyModelStatisticsLTEPanel(com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsLTEPanel) RoundedBorder(com.att.aro.ui.commonui.RoundedBorder) ImagePanel(com.att.aro.ui.commonui.ImagePanel) RRCStateMachineSimulationPanelLTE(com.att.aro.ui.view.statistics.statemachine.RRCStateMachineSimulationPanelLTE)

Aggregations

EnergyModelStatisticsLTEPanel (com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsLTEPanel)2 GridBagConstraints (java.awt.GridBagConstraints)2 Insets (java.awt.Insets)2 ImagePanel (com.att.aro.ui.commonui.ImagePanel)1 RoundedBorder (com.att.aro.ui.commonui.RoundedBorder)1 AROUIPanelException (com.att.aro.ui.exception.AROUIPanelException)1 AttenuationConstantPanel (com.att.aro.ui.view.statistics.attenuation.AttenuationConstantPanel)1 BurstAnalysisPanel (com.att.aro.ui.view.statistics.burstanalysis.BurstAnalysisPanel)1 EndPointSummaryPanel (com.att.aro.ui.view.statistics.endpointsummary.EndPointSummaryPanel)1 EnergyModelStatistics3GPanel (com.att.aro.ui.view.statistics.energy.EnergyModelStatistics3GPanel)1 EnergyModelStatisticsWiFiPanel (com.att.aro.ui.view.statistics.energy.EnergyModelStatisticsWiFiPanel)1 RRCStateMachineSimulationPanelLTE (com.att.aro.ui.view.statistics.statemachine.RRCStateMachineSimulationPanelLTE)1 BorderLayout (java.awt.BorderLayout)1 GridBagLayout (java.awt.GridBagLayout)1 JPanel (javax.swing.JPanel)1