/*******************************************************************************
 * Copyright 2012-2015 Esri
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0
 *  
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 ******************************************************************************/
package com.esri.vehiclecommander.view;

import com.esri.core.geometry.Point;
import com.esri.core.gps.Satellite;
import com.esri.core.map.Graphic;
import com.esri.core.symbol.advanced.SymbolProperties;
import com.esri.map.Layer;
import com.esri.map.LayerInitializeCompleteEvent;
import com.esri.map.LayerInitializeCompleteListener;
import com.esri.militaryapps.controller.LocationController;
import com.esri.militaryapps.controller.LocationController.LocationMode;
import com.esri.militaryapps.controller.LocationListener;
import com.esri.militaryapps.controller.PositionReportController;
import com.esri.militaryapps.controller.SpotReportController;
import com.esri.militaryapps.model.Location;
import com.esri.militaryapps.model.LocationProvider;
import com.esri.militaryapps.model.SpotReport;
import com.esri.militaryapps.model.SpotReport.Activity;
import com.esri.militaryapps.model.SpotReport.Size;
import com.esri.vehiclecommander.controller.AdvancedSymbolController;
import com.esri.vehiclecommander.controller.AppConfigController;
import com.esri.vehiclecommander.controller.AppConfigDialog;
import com.esri.vehiclecommander.controller.MapController;
import com.esri.vehiclecommander.controller.MapControllerListenerAdapter;
import com.esri.vehiclecommander.controller.MgrsLayerController;
import com.esri.vehiclecommander.controller.RouteController;
import com.esri.vehiclecommander.controller.RouteListener;
import com.esri.vehiclecommander.util.Utilities;
import java.awt.CardLayout;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JToggleButton;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.filechooser.FileNameExtensionFilter;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.xml.sax.SAXException;

/**
 * The application's main menu.
 */
public class MainMenuJPanel extends RoundedJPanel implements LocationListener, RouteListener {

    private static final long serialVersionUID = 8752811864834332672L;
    private static final Font BUTTON_FONT = new Font("Arial", Font.BOLD, 18);

    private final Frame app;
    private final MapController mapController;
    private final SpotReport spotReport;
    private final SpotReportController spotReportController;
    private final AppConfigController appConfigController;
    private final AdvancedSymbolController mil2525CSymbolController;
    private final MgrsLayerController mgrsLayerController;
    private final RouteController routeController;
    private final PositionReportController positionReportController;
    private final Map<JToggleButton, Integer> waypointButtonToGraphicId = new HashMap<JToggleButton, Integer>();
    private final Map<Integer, JToggleButton> graphicIdToWaypointButton = new HashMap<Integer, JToggleButton>();
    
    private AppConfigDialog appConfigDialog = null;
    private JFileChooser mpkFileChooser = null;
    private JFileChooser gpxFileChooser = null;
    private boolean initializedEquipmentBrowse = false;
    private String selectedCategory = null;
    private JToggleButton selectedWaypointButton = null;
    private boolean initializedEquipmentButtons = false;

    /**
     * Creates the MainMenuJPanel but does not add it to the application.
     * @param app The application that is opening this MainMenuJPanel
     * @param mapController the application's MapController.
     * @param locationController the application's LocationController.
     * @param appConfigController the application's AppConfigController.
     * @param mil2525CSymbolController the application's MIL-STD-2525C symbol controller.
     */
    public MainMenuJPanel(Frame app, final MapController mapController, AppConfigController appConfigController,
            AdvancedSymbolController mil2525CSymbolController, RouteController routeController,
            PositionReportController positionReportController) {
        this.mgrsLayerController = new MgrsLayerController(mapController, appConfigController);
        this.app = app;
        this.mapController = mapController;
        if (null != mapController.getLocationController()) {
            mapController.getLocationController().addListener(this);
        }
        this.mil2525CSymbolController = mil2525CSymbolController;
        this.spotReport = new SpotReport();
        this.spotReportController = new SpotReportController(mapController, appConfigController.getMessageController());
        this.appConfigController = appConfigController;
        this.routeController = routeController;
        this.positionReportController = positionReportController;
        initComponents();

        ActionListener equipmentButtonListener = new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                setSpotReportEquipment(SpotReport.Equipment.valueOf(e.getActionCommand()));
            }
        };
        ((EquipmentListJPanel) equipmentListJPanel_srEquipmentSearchResults).addButtonListener(equipmentButtonListener);
        ((EquipmentListJPanel) equipmentListJPanel_srEquipmentCategoryResults).addButtonListener(equipmentButtonListener);

        mapController.addListener(new MapControllerListenerAdapter() {

            @Override
            public void layersChanged(boolean isOverlay) {
                refreshTOC();
            }
        });
    }
    
    private synchronized void initEquipmentButtons(JButton[] buttons) {
        if (!initializedEquipmentButtons) {
            for (JButton button : buttons) {
                button.setIcon(new ImageIcon(MainMenuJPanel.this.mil2525CSymbolController.getSymbolImage(button.getText())));
            }
            initializedEquipmentButtons = true;
        }
    }

    /**
     * This method is called from within the constructor to
     * initialize the form.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        buttonGroup_gpsMode = new javax.swing.ButtonGroup();
        buttonGroup_waypoints = new javax.swing.ButtonGroup();
        jPanel_main = new javax.swing.JPanel();
        jButton_reports = new javax.swing.JButton();
        jButton_overlays = new javax.swing.JButton();
        jButton_waypoints = new javax.swing.JButton();
        jButton_buddies = new javax.swing.JButton();
        jButton_observations = new javax.swing.JButton();
        jButton_navigation = new javax.swing.JButton();
        jButton_options = new javax.swing.JButton();
        jButton_quitApplication = new javax.swing.JButton();
        jButton_close = new javax.swing.JButton();
        jLabel_mainMenu = new javax.swing.JLabel();
        jPanel_reports = new javax.swing.JPanel();
        jButton_spotReport = new javax.swing.JButton();
        jButton_reportsBack = new javax.swing.JButton();
        jLabel_reports = new javax.swing.JLabel();
        jPanel_spotReport = new javax.swing.JPanel();
        jButton_spotReportBack = new javax.swing.JButton();
        jLabel_spotReport = new javax.swing.JLabel();
        jButton_srSize = new javax.swing.JButton();
        jButton_srActivity = new javax.swing.JButton();
        jButton_srLocation = new javax.swing.JButton();
        jButton_srUnit = new javax.swing.JButton();
        jButton_srTime = new javax.swing.JButton();
        jButton_srEquipment = new javax.swing.JButton();
        jButton_srSend = new javax.swing.JButton();
        jPanel_srSize = new javax.swing.JPanel();
        jButton_srSizeBack = new javax.swing.JButton();
        jLabel_srSize = new javax.swing.JLabel();
        jButton_srSizeTeam = new javax.swing.JButton();
        jButton_srSizeSquad = new javax.swing.JButton();
        jButton_srSizeSection = new javax.swing.JButton();
        jButton_srSizePlatoon = new javax.swing.JButton();
        jButton_srSizeCompany = new javax.swing.JButton();
        jButton_srSizeBattalion = new javax.swing.JButton();
        jButton_srSizeRegiment = new javax.swing.JButton();
        jButton_srSizeBrigade = new javax.swing.JButton();
        jButton_srSizeDivision = new javax.swing.JButton();
        jButton_srSizeCorps = new javax.swing.JButton();
        jButton_srSizeArmy = new javax.swing.JButton();
        jButton_srSizeArmyGroup = new javax.swing.JButton();
        jButton_srSizeRegion = new javax.swing.JButton();
        jButton_srSizeCommand = new javax.swing.JButton();
        jPanel_srActivity = new javax.swing.JPanel();
        jButton_srActivityBack = new javax.swing.JButton();
        jLabel_srActivity = new javax.swing.JLabel();
        jButton_srActivityAttacking = new javax.swing.JButton();
        jButton_srActivityDefending = new javax.swing.JButton();
        jButton_srActivityMoving = new javax.swing.JButton();
        jButton_srActivityStationary = new javax.swing.JButton();
        jButton_srActivityCache = new javax.swing.JButton();
        jButton_srActivityCivilian = new javax.swing.JButton();
        jButton_srActivityPersonnelRecovery = new javax.swing.JButton();
        jPanel_srLocation = new javax.swing.JPanel();
        jButton_srLocationBack = new javax.swing.JButton();
        jLabel_srLocation = new javax.swing.JLabel();
        jToggleButton_srLocationFromMap = new javax.swing.JToggleButton();
        jButton_srLocationMGRS = new javax.swing.JButton();
        jButton_srLocationLatLon = new javax.swing.JButton();
        jButton_srLocationOffset = new javax.swing.JButton();
        jPanel_srUnit = new javax.swing.JPanel();
        jButton_srUnitBack = new javax.swing.JButton();
        jLabel_srUnit = new javax.swing.JLabel();
        jButton_srUnitConventional = new javax.swing.JButton();
        jButton_srUnitIrregular = new javax.swing.JButton();
        jButton_srUnitCoalition = new javax.swing.JButton();
        jButton_srUnitHostNation = new javax.swing.JButton();
        jButton_srUnitNGO = new javax.swing.JButton();
        jButton_srUnitCivilian = new javax.swing.JButton();
        jButton_srUnitFacility = new javax.swing.JButton();
        jPanel_srTime = new javax.swing.JPanel();
        jButton_srTimeBack = new javax.swing.JButton();
        jLabel_srTime = new javax.swing.JLabel();
        jButton_srTimeNow = new javax.swing.JButton();
        jButton_srTimeOther = new javax.swing.JButton();
        jPanel_srEquipment = new javax.swing.JPanel();
        jButton_srEquipmentBack = new javax.swing.JButton();
        jLabel_srEquipment = new javax.swing.JLabel();
        jButton_srEquipmentSearch = new javax.swing.JButton();
        jScrollPane_srEquipmentPresets = new javax.swing.JScrollPane();
        jPanel_srEquipmentPresets = new javax.swing.JPanel();
        jButton_srEquipmentMissileLauncherH = new javax.swing.JButton();
        jButton_srEquipmentGrenadeLauncherH = new javax.swing.JButton();
        jButton_srEquipmentHowitzerH = new javax.swing.JButton();
        jButton_srEquipmentArmoredPersonnelCarrierH = new javax.swing.JButton();
        jButton_srEquipmentGroundVehicleH = new javax.swing.JButton();
        jButton_srEquipmentArmoredTankH = new javax.swing.JButton();
        jButton_srEquipmentRifleH = new javax.swing.JButton();
        jButton_srEquipmentIEDH = new javax.swing.JButton();
        jButton_srEquipmentBrowse = new javax.swing.JButton();
        jPanel_srEquipmentSearch = new javax.swing.JPanel();
        jButton_srEquipmentSearchBack = new javax.swing.JButton();
        jLabel_srEquipmentSearch = new javax.swing.JLabel();
        jTextField_srEquipmentSearchField = new javax.swing.JTextField();
        jScrollPane_srEquipmentSearchResults = new javax.swing.JScrollPane();
        jScrollPane_srEquipmentSearchResults.getViewport().setOpaque(false);
        equipmentListJPanel_srEquipmentSearchResults = new EquipmentListJPanel(mil2525CSymbolController);
        jPanel_srEquipmentBrowseCategories = new javax.swing.JPanel();
        jButton_srEquipmentBrowseCategoriesBack = new javax.swing.JButton();
        jLabel_srEquipmentBrowseCategories = new javax.swing.JLabel();
        jScrollPane_srEquipmentCategories = new javax.swing.JScrollPane();
        jScrollPane_srEquipmentSearchResults.getViewport().setOpaque(false);
        jPanel_srEquipmentCategories = new javax.swing.JPanel();
        jPanel_srEquipmentCategory = new javax.swing.JPanel();
        jButton_srEquipmentCategoryBack = new javax.swing.JButton();
        jLabel_srEquipmentCategory = new javax.swing.JLabel();
        jScrollPane_srEquipmentCategoryResults = new javax.swing.JScrollPane();
        jScrollPane_srEquipmentSearchResults.getViewport().setOpaque(false);
        equipmentListJPanel_srEquipmentCategoryResults = new EquipmentListJPanel(mil2525CSymbolController);
        jPanel_overlays = new javax.swing.JPanel();
        jButton_mapPackage = new javax.swing.JButton();
        jButton_overlaysBack = new javax.swing.JButton();
        jLabel_overlays = new javax.swing.JLabel();
        jScrollPane_toc = new javax.swing.JScrollPane();
        jScrollPane_toc.getViewport().setOpaque(false);
        jPanel_toc = new javax.swing.JPanel();
        jPanel_waypoints = new javax.swing.JPanel();
        jButton_waypointsBack = new javax.swing.JButton();
        jLabel_waypoints = new javax.swing.JLabel();
        jScrollPane_waypointsList = new javax.swing.JScrollPane();
        jScrollPane_toc.getViewport().setOpaque(false);
        jPanel_waypointsList = new javax.swing.JPanel();
        jPanel_navigation = new javax.swing.JPanel();
        jButton_navigationBack = new javax.swing.JButton();
        jLabel_navigation = new javax.swing.JLabel();
        jLabel_navMgrs = new javax.swing.JLabel();
        jTextField_navMgrs = new javax.swing.JTextField();
        jButton_navGoToMgrs = new javax.swing.JButton();
        jLabel_mgrsMessage = new javax.swing.JLabel();
        jPanel_options = new javax.swing.JPanel();
        jButton_optionsBack = new javax.swing.JButton();
        jLabel_options = new javax.swing.JLabel();
        jButton_aboutMe = new javax.swing.JButton();
        jToggleButton_showMe = new javax.swing.JToggleButton();
        jToggleButton_sendMyLocation = new javax.swing.JToggleButton();
        jButton_resetMap = new javax.swing.JButton();
        jButton_gpsOptions = new javax.swing.JButton();
        jPanel_gpsOptions = new javax.swing.JPanel();
        jButton_gpsOptionsBack = new javax.swing.JButton();
        jLabel_gpsOptions = new javax.swing.JLabel();
        jButton_chooseGPXFile = new javax.swing.JButton();
        jRadioButton_onboardGPS = new javax.swing.JRadioButton();
        jRadioButton_simulatedGPS = new javax.swing.JRadioButton();
        jLabel_gpsStatus = new javax.swing.JLabel();

        setOpaque(false);
        setLayout(new java.awt.CardLayout());

        jPanel_main.setOpaque(false);

        jButton_reports.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_reports.setText("Reports");
        jButton_reports.setFocusable(false);
        jButton_reports.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_reports.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_reports.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_reports.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_reportsActionPerformed(evt);
            }
        });

        jButton_overlays.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_overlays.setText("Overlays");
        jButton_overlays.setFocusable(false);
        jButton_overlays.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_overlays.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_overlays.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_overlays.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_overlaysActionPerformed(evt);
            }
        });

        jButton_waypoints.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_waypoints.setText("Waypoints");
        jButton_waypoints.setFocusable(false);
        jButton_waypoints.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_waypoints.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_waypoints.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_waypoints.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_waypointsActionPerformed(evt);
            }
        });

        jButton_buddies.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_buddies.setText("Buddies");
        jButton_buddies.setFocusable(false);
        jButton_buddies.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_buddies.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_buddies.setPreferredSize(new java.awt.Dimension(150, 60));

        jButton_observations.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_observations.setText("Observations");
        jButton_observations.setFocusable(false);
        jButton_observations.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_observations.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_observations.setPreferredSize(new java.awt.Dimension(150, 60));

        jButton_navigation.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_navigation.setText("Navigation");
        jButton_navigation.setFocusable(false);
        jButton_navigation.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_navigation.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_navigation.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_navigation.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_navigationActionPerformed(evt);
            }
        });

        jButton_options.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_options.setText("Options");
        jButton_options.setFocusable(false);
        jButton_options.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_options.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_options.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_options.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_optionsActionPerformed(evt);
            }
        });

        jButton_quitApplication.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_quitApplication.setText("Quit App");
        jButton_quitApplication.setFocusable(false);
        jButton_quitApplication.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_quitApplication.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_quitApplication.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_quitApplication.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_quitApplicationActionPerformed(evt);
            }
        });

        jButton_close.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/X-Normal.png"))); // NOI18N
        jButton_close.setBorderPainted(false);
        jButton_close.setContentAreaFilled(false);
        jButton_close.setFocusable(false);
        jButton_close.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton_close.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/X-Pressed.png"))); // NOI18N
        jButton_close.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_closeActionPerformed(evt);
            }
        });

        jLabel_mainMenu.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel_mainMenu.setText("Main Menu");

        javax.swing.GroupLayout jPanel_mainLayout = new javax.swing.GroupLayout(jPanel_main);
        jPanel_main.setLayout(jPanel_mainLayout);
        jPanel_mainLayout.setHorizontalGroup(
            jPanel_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_mainLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton_close, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel_mainMenu, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_reports, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_overlays, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_waypoints, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_buddies, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_observations, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_options, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_navigation, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(jPanel_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel_mainLayout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jButton_quitApplication, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPanel_mainLayout.setVerticalGroup(
            jPanel_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_mainLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton_close)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel_mainMenu)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_reports, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_overlays, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_waypoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_buddies, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_observations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_navigation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_options, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(143, Short.MAX_VALUE))
            .addGroup(jPanel_mainLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel_mainLayout.createSequentialGroup()
                    .addContainerGap(633, Short.MAX_VALUE)
                    .addComponent(jButton_quitApplication, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()))
        );

        add(jPanel_main, "Main Card");

        jPanel_reports.setOpaque(false);

        jButton_spotReport.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_spotReport.setText("Spot Report");
        jButton_spotReport.setFocusable(false);
        jButton_spotReport.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_spotReport.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_spotReport.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_spotReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_spotReportActionPerformed(evt);
            }
        });

        jButton_reportsBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Normal.png"))); // NOI18N
        jButton_reportsBack.setBorderPainted(false);
        jButton_reportsBack.setContentAreaFilled(false);
        jButton_reportsBack.setFocusable(false);
        jButton_reportsBack.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton_reportsBack.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Pressed.png"))); // NOI18N
        jButton_reportsBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_reportsBackActionPerformed(evt);
            }
        });

        jLabel_reports.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel_reports.setText("Reports");

        javax.swing.GroupLayout jPanel_reportsLayout = new javax.swing.GroupLayout(jPanel_reports);
        jPanel_reports.setLayout(jPanel_reportsLayout);
        jPanel_reportsLayout.setHorizontalGroup(
            jPanel_reportsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_reportsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel_reportsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton_reportsBack, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel_reports, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_spotReport, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel_reportsLayout.setVerticalGroup(
            jPanel_reportsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_reportsLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton_reportsBack)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel_reports)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_spotReport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(539, Short.MAX_VALUE))
        );

        add(jPanel_reports, "Reports Card");

        jPanel_spotReport.setOpaque(false);
        jPanel_spotReport.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                jPanel_spotReportComponentShown(evt);
            }
        });

        jButton_spotReportBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Normal.png"))); // NOI18N
        jButton_spotReportBack.setBorderPainted(false);
        jButton_spotReportBack.setContentAreaFilled(false);
        jButton_spotReportBack.setFocusable(false);
        jButton_spotReportBack.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton_spotReportBack.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Pressed.png"))); // NOI18N
        jButton_spotReportBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_spotReportBackActionPerformed(evt);
            }
        });

        jLabel_spotReport.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel_spotReport.setText("Spot Report");

        jButton_srSize.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSize.setText("Size: N/A");
        jButton_srSize.setFocusable(false);
        jButton_srSize.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSize.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSize.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSize.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeActionPerformed(evt);
            }
        });

        jButton_srActivity.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivity.setText("Activity: N/A");
        jButton_srActivity.setFocusable(false);
        jButton_srActivity.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivity.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivity.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivity.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityActionPerformed(evt);
            }
        });

        jButton_srLocation.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srLocation.setText("Location: N/A");
        jButton_srLocation.setFocusable(false);
        jButton_srLocation.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srLocation.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srLocation.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srLocation.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srLocationActionPerformed(evt);
            }
        });

        jButton_srUnit.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srUnit.setText("Unit: N/A");
        jButton_srUnit.setFocusable(false);
        jButton_srUnit.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srUnit.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srUnit.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srUnit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srUnitActionPerformed(evt);
            }
        });

        jButton_srTime.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srTime.setText("Time: N/A");
        jButton_srTime.setFocusable(false);
        jButton_srTime.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srTime.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srTime.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srTime.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srTimeActionPerformed(evt);
            }
        });

        jButton_srEquipment.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srEquipment.setText("Equipment: N/A");
        jButton_srEquipment.setFocusable(false);
        jButton_srEquipment.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srEquipment.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srEquipment.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srEquipment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srEquipmentActionPerformed(evt);
            }
        });

        jButton_srSend.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSend.setText("Send");
        jButton_srSend.setFocusable(false);
        jButton_srSend.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSend.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSend.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSend.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSendActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel_spotReportLayout = new javax.swing.GroupLayout(jPanel_spotReport);
        jPanel_spotReport.setLayout(jPanel_spotReportLayout);
        jPanel_spotReportLayout.setHorizontalGroup(
            jPanel_spotReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_spotReportLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel_spotReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton_spotReportBack, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel_spotReport, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSize, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivity, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srLocation, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srUnit, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srTime, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srEquipment, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSend, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel_spotReportLayout.setVerticalGroup(
            jPanel_spotReportLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_spotReportLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton_spotReportBack)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel_spotReport)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srLocation, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srUnit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srEquipment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 138, Short.MAX_VALUE)
                .addComponent(jButton_srSend, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        add(jPanel_spotReport, "Spot Report Card");

        jPanel_srSize.setOpaque(false);

        jButton_srSizeBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Normal.png"))); // NOI18N
        jButton_srSizeBack.setBorderPainted(false);
        jButton_srSizeBack.setContentAreaFilled(false);
        jButton_srSizeBack.setFocusable(false);
        jButton_srSizeBack.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton_srSizeBack.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Pressed.png"))); // NOI18N
        jButton_srSizeBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeBackActionPerformed(evt);
            }
        });

        jLabel_srSize.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel_srSize.setText("Size");

        jButton_srSizeTeam.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeTeam.setText(Size.TEAM.toString());
        jButton_srSizeTeam.setFocusable(false);
        jButton_srSizeTeam.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeTeam.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeTeam.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeTeam.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeTeamActionPerformed(evt);
            }
        });

        jButton_srSizeSquad.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeSquad.setText(Size.SQUAD.toString());
        jButton_srSizeSquad.setFocusable(false);
        jButton_srSizeSquad.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeSquad.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeSquad.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeSquad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeSquadActionPerformed(evt);
            }
        });

        jButton_srSizeSection.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeSection.setText(Size.SECTION.toString());
        jButton_srSizeSection.setFocusable(false);
        jButton_srSizeSection.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeSection.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeSection.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeSection.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeSectionActionPerformed(evt);
            }
        });

        jButton_srSizePlatoon.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizePlatoon.setText(Size.PLATOON.toString());
        jButton_srSizePlatoon.setFocusable(false);
        jButton_srSizePlatoon.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizePlatoon.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizePlatoon.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizePlatoon.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizePlatoonActionPerformed(evt);
            }
        });

        jButton_srSizeCompany.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeCompany.setText(Size.COMPANY.toString());
        jButton_srSizeCompany.setFocusable(false);
        jButton_srSizeCompany.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCompany.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCompany.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCompany.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeCompanyActionPerformed(evt);
            }
        });

        jButton_srSizeBattalion.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeBattalion.setText(Size.BATTALION.toString());
        jButton_srSizeBattalion.setFocusable(false);
        jButton_srSizeBattalion.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeBattalion.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeBattalion.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeBattalion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeBattalionActionPerformed(evt);
            }
        });

        jButton_srSizeRegiment.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeRegiment.setText(Size.REGIMENT.toString());
        jButton_srSizeRegiment.setFocusable(false);
        jButton_srSizeRegiment.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeRegiment.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeRegiment.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeRegiment.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeRegimentActionPerformed(evt);
            }
        });

        jButton_srSizeBrigade.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeBrigade.setText(Size.BRIGADE.toString());
        jButton_srSizeBrigade.setFocusable(false);
        jButton_srSizeBrigade.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeBrigade.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeBrigade.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeBrigade.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeBrigadeActionPerformed(evt);
            }
        });

        jButton_srSizeDivision.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeDivision.setText(Size.DIVISION.toString());
        jButton_srSizeDivision.setFocusable(false);
        jButton_srSizeDivision.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeDivision.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeDivision.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeDivision.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeDivisionActionPerformed(evt);
            }
        });

        jButton_srSizeCorps.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeCorps.setText(Size.CORPS.toString());
        jButton_srSizeCorps.setFocusable(false);
        jButton_srSizeCorps.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCorps.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCorps.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCorps.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeCorpsActionPerformed(evt);
            }
        });

        jButton_srSizeArmy.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeArmy.setText(Size.ARMY.toString());
        jButton_srSizeArmy.setFocusable(false);
        jButton_srSizeArmy.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeArmy.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeArmy.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeArmy.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeArmyActionPerformed(evt);
            }
        });

        jButton_srSizeArmyGroup.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeArmyGroup.setText(Size.ARMY_GROUP.toString());
        jButton_srSizeArmyGroup.setFocusable(false);
        jButton_srSizeArmyGroup.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeArmyGroup.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeArmyGroup.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeArmyGroup.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeArmyGroupActionPerformed(evt);
            }
        });

        jButton_srSizeRegion.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeRegion.setText(Size.REGION.toString());
        jButton_srSizeRegion.setFocusable(false);
        jButton_srSizeRegion.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeRegion.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeRegion.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeRegion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeRegionActionPerformed(evt);
            }
        });

        jButton_srSizeCommand.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srSizeCommand.setText(Size.COMMAND.toString());
        jButton_srSizeCommand.setFocusable(false);
        jButton_srSizeCommand.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCommand.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCommand.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srSizeCommand.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srSizeCommandActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel_srSizeLayout = new javax.swing.GroupLayout(jPanel_srSize);
        jPanel_srSize.setLayout(jPanel_srSizeLayout);
        jPanel_srSizeLayout.setHorizontalGroup(
            jPanel_srSizeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_srSizeLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel_srSizeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton_srSizeBack, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel_srSize, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeTeam, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeSquad, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeSection, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizePlatoon, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeCompany, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeBattalion, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeRegiment, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeBrigade, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeDivision, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeCorps, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeArmy, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeArmyGroup, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeRegion, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srSizeCommand, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel_srSizeLayout.setVerticalGroup(
            jPanel_srSizeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_srSizeLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton_srSizeBack)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel_srSize)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeTeam, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeSquad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeSection, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizePlatoon, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeCompany, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeBattalion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeRegiment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeBrigade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeDivision, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeCorps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeArmy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeArmyGroup, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeRegion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srSizeCommand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(jPanel_srSize, "Spot Report Size Card");

        jPanel_srActivity.setOpaque(false);

        jButton_srActivityBack.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Normal.png"))); // NOI18N
        jButton_srActivityBack.setBorderPainted(false);
        jButton_srActivityBack.setContentAreaFilled(false);
        jButton_srActivityBack.setFocusable(false);
        jButton_srActivityBack.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jButton_srActivityBack.setPressedIcon(new javax.swing.ImageIcon(getClass().getResource("/com/esri/vehiclecommander/resources/Back-Pressed.png"))); // NOI18N
        jButton_srActivityBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityBackActionPerformed(evt);
            }
        });

        jLabel_srActivity.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jLabel_srActivity.setText("Activity");

        jButton_srActivityAttacking.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityAttacking.setText("Attacking");
        jButton_srActivityAttacking.setFocusable(false);
        jButton_srActivityAttacking.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityAttacking.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityAttacking.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityAttacking.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityAttackingActionPerformed(evt);
            }
        });

        jButton_srActivityDefending.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityDefending.setText("Defending");
        jButton_srActivityDefending.setFocusable(false);
        jButton_srActivityDefending.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityDefending.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityDefending.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityDefending.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityDefendingActionPerformed(evt);
            }
        });

        jButton_srActivityMoving.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityMoving.setText("Moving");
        jButton_srActivityMoving.setFocusable(false);
        jButton_srActivityMoving.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityMoving.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityMoving.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityMoving.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityMovingActionPerformed(evt);
            }
        });

        jButton_srActivityStationary.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityStationary.setText("Stationary");
        jButton_srActivityStationary.setFocusable(false);
        jButton_srActivityStationary.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityStationary.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityStationary.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityStationary.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityStationaryActionPerformed(evt);
            }
        });

        jButton_srActivityCache.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityCache.setText("Cache");
        jButton_srActivityCache.setFocusable(false);
        jButton_srActivityCache.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityCache.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityCache.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityCache.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityCacheActionPerformed(evt);
            }
        });

        jButton_srActivityCivilian.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityCivilian.setText("Civilian");
        jButton_srActivityCivilian.setFocusable(false);
        jButton_srActivityCivilian.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityCivilian.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityCivilian.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityCivilian.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityCivilianActionPerformed(evt);
            }
        });

        jButton_srActivityPersonnelRecovery.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        jButton_srActivityPersonnelRecovery.setText("Personnel Recovery");
        jButton_srActivityPersonnelRecovery.setFocusable(false);
        jButton_srActivityPersonnelRecovery.setMaximumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityPersonnelRecovery.setMinimumSize(new java.awt.Dimension(150, 60));
        jButton_srActivityPersonnelRecovery.setPreferredSize(new java.awt.Dimension(150, 60));
        jButton_srActivityPersonnelRecovery.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_srActivityPersonnelRecoveryActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel_srActivityLayout = new javax.swing.GroupLayout(jPanel_srActivity);
        jPanel_srActivity.setLayout(jPanel_srActivityLayout);
        jPanel_srActivityLayout.setHorizontalGroup(
            jPanel_srActivityLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_srActivityLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel_srActivityLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton_srActivityBack, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel_srActivity, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityAttacking, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityDefending, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityMoving, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityStationary, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityCache, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityCivilian, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
                    .addComponent(jButton_srActivityPersonnelRecovery, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel_srActivityLayout.setVerticalGroup(
            jPanel_srActivityLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel_srActivityLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton_srActivityBack)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel_srActivity)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityAttacking, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityDefending, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityMoving, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityStationary, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityCache, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityCivilian, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton_srActivityPersonnelRecovery, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(143, Short.MAX_VALUE))
        );

        add(jPanel_srActivity, "Spot Report Activity Card");

        jPanel_srLocation.setOpaque(false);

        jButton_srLo