package tmcsim.client.cadclientgui.screens;

import javax.swing.ImageIcon;
import javax.swing.JComponent;

import tmcsim.client.cadclientgui.data.CADData;
import tmcsim.client.cadclientgui.enums.IncidentEnums;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
public class IncidentInfo extends javax.swing.JFrame {
    /**
     * Creates new form IncidentInfo
     */
    public IncidentInfo() {
        declareComponents();
        initComponents();
        initLayout();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void declareComponents() {

        active = new ImageIcon("images/IncidentInfoImages/active.png");
        closed = new ImageIcon("images/IncidentInfoImages/closed.png");
        
        printButton = new javax.swing.JButton();
        jSplitPane2 = new javax.swing.JSplitPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        incidentNumberLabel = new javax.swing.JLabel();
        callTakenLabel = new javax.swing.JLabel();
        lastUpdatedLabel = new javax.swing.JLabel();
        callInitiatedLabel = new javax.swing.JLabel();
        timeInQLabel = new javax.swing.JLabel();
        totalElapsedTimeLabel = new javax.swing.JLabel();
        addressLabel = new javax.swing.JLabel();
        cityLabel = new javax.swing.JLabel();
        aptLabel = new javax.swing.JLabel();
        phoneLabel = new javax.swing.JLabel();
        crossStreetLabel = new javax.swing.JLabel();
        locationLabel = new javax.swing.JLabel();
        mapInfoLabel = new javax.swing.JLabel();
        respAreaLabel = new javax.swing.JLabel();
        sectorLabel = new javax.swing.JLabel();
        callerTypeLabel = new javax.swing.JLabel();
        problemLabel = new javax.swing.JLabel();
        problemCodeLabel = new javax.swing.JLabel();
        priorityDescLabel = new javax.swing.JLabel();
        buildingLabel = new javax.swing.JLabel();
        extLabel = new javax.swing.JLabel();
        divisionLabel = new javax.swing.JLabel();
        sectorCodeLabel = new javax.swing.JLabel();
        callerNameLabel = new javax.swing.JLabel();
        primaryUnitLabel = new javax.swing.JLabel();
        backupUnitsLabel = new javax.swing.JLabel();
        incidentNumberField = new javax.swing.JTextField();
        callInitiatedField = new javax.swing.JTextField();
        callTakenField = new javax.swing.JTextField();
        timeInQField = new javax.swing.JTextField();
        lastUpdatedField = new javax.swing.JTextField();
        totalElapsedTimeField = new javax.swing.JTextField();
        addressField = new javax.swing.JTextField();
        cityField = new javax.swing.JTextField();
        aptField = new javax.swing.JTextField();
        phoneField = new javax.swing.JTextField();
        crossStreetField = new javax.swing.JTextField();
        locationField = new javax.swing.JTextField();
        mapInfoField = new javax.swing.JTextField();
        respAreaField = new javax.swing.JTextField();
        sectorField = new javax.swing.JTextField();
        callerTypeField = new javax.swing.JTextField();
        problemField = new javax.swing.JTextField();
        problemCodeField = new javax.swing.JTextField();
        priorityDescField = new javax.swing.JTextField();
        primaryUnitField = new javax.swing.JTextField();
        statusBarLabel = new javax.swing.JLabel();
        buildingField = new javax.swing.JTextField();
        extField = new javax.swing.JTextField();
        divisionField = new javax.swing.JTextField();
        sectorCodeField = new javax.swing.JTextField();
        callerNameField = new javax.swing.JTextField();
        backupUnitsField = new javax.swing.JTextField();
        jScrollPane3 = new javax.swing.JScrollPane();
        jPanel2 = new javax.swing.JPanel();
        incidentCommentsLabel = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        incidentCommentsTable = new javax.swing.JTable();
    }
    
    private void initComponents() {
        setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);

        printButton.setText("Print");
        printButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                printButtonActionPerformed(evt);
            }
        });

        jSplitPane2.setDividerLocation(400);
        jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

        incidentNumberLabel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        incidentNumberLabel.setText("Incident Number:");

        callTakenLabel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        callTakenLabel.setText("Call Taken:");

        lastUpdatedLabel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        lastUpdatedLabel.setText("Last Updated:");

        callInitiatedLabel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        callInitiatedLabel.setText("Call Initiated:");

        timeInQLabel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        timeInQLabel.setText("Time in Q:");

        totalElapsedTimeLabel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        totalElapsedTimeLabel.setText("Total Elapsed Time:");

        statusBarLabel.setIcon(active);
        
        addressLabel.setText("Address:");

        cityLabel.setText("City:");

        aptLabel.setText("Apt:");

        phoneLabel.setText("Phone:");

        crossStreetLabel.setText("Cross Street:");

        locationLabel.setText("Location:");

        mapInfoLabel.setText("Map Info:");

        respAreaLabel.setText("Resp Area:");

        sectorLabel.setText("Sector:");

        callerTypeLabel.setText("Caller Type:");

        problemLabel.setText("Problem:");

        problemCodeLabel.setText("Problem Code:");

        priorityDescLabel.setText("Priority Desc:");

        buildingLabel.setText("Building:");

        extLabel.setText("Ext:");

        divisionLabel.setText("Division:");

        sectorCodeLabel.setText("Sector Code:");

        callerNameLabel.setText("Caller Name:");

        primaryUnitLabel.setText("PrimaryUnit");

        backupUnitsLabel.setText("BackupUnits");
        
        incidentNumberField.setEditable(false);

        callInitiatedField.setEditable(false);

        callTakenField.setEditable(false);

        timeInQField.setEditable(false);

        lastUpdatedField.setEditable(false);

        totalElapsedTimeField.setEditable(false);

        addressField.setEditable(false);

        cityField.setEditable(false);

        aptField.setEditable(false);

        phoneField.setEditable(false);

        crossStreetField.setEditable(false);

        locationField.setEditable(false);

        mapInfoField.setEditable(false);

        respAreaField.setEditable(false);
        respAreaField.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                respAreaFieldActionPerformed(evt);
            }
        });

        sectorField.setEditable(false);

        callerTypeField.setEditable(false);

        problemField.setEditable(false);

        problemCodeField.setEditable(false);

        priorityDescField.setEditable(false);

        primaryUnitField.setEditable(false);

        buildingField.setEditable(false);

        extField.setEditable(false);

        divisionField.setEditable(false);

        sectorCodeField.setEditable(false);

        callerNameField.setEditable(false);

        backupUnitsField.setEditable(false);
        
        jScrollPane1.setViewportView(jPanel1);

        jSplitPane2.setLeftComponent(jScrollPane1);

        incidentCommentsLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        incidentCommentsLabel.setText("Incident Comments");

        incidentCommentsTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Date/Time", "Disp", "Conf", "Comment"
            }
        ));
        jScrollPane2.setViewportView(incidentCommentsTable);
    }
    
    private void initLayout() {
        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(cityLabel)
                                    .addComponent(aptLabel)
                                    .addComponent(phoneLabel)
                                    .addComponent(respAreaLabel)
                                    .addComponent(sectorLabel)
                                    .addComponent(callerTypeLabel)
                                    .addComponent(locationLabel))
                                .addGap(39, 39, 39)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(locationField, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
                                            .addComponent(cityField, javax.swing.GroupLayout.Alignment.LEADING))
                                        .addGap(79, 79, 79)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(primaryUnitField, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(problemLabel)
                                            .addComponent(problemCodeLabel)))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                .addComponent(mapInfoField, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                    .addComponent(callerNameField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
                                                    .addComponent(sectorCodeField, javax.swing.GroupLayout.Alignment.TRAILING)
                                                    .addComponent(divisionField, javax.swing.GroupLayout.Alignment.TRAILING)))
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                    .addComponent(aptField)
                                                    .addComponent(phoneField)
                                                    .addComponent(crossStreetField)
                                                    .addComponent(respAreaField, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
                                                    .addComponent(sectorField)
                                                    .addComponent(callerTypeField))
                                                .addGap(18, 18, 18)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(divisionLabel)
                                                    .addComponent(sectorCodeLabel)
                                                    .addComponent(callerNameLabel)
                                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                            .addComponent(buildingLabel)
                                                            .addComponent(extLabel))
                                                        .addGap(18, 18, 18)
                                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                            .addComponent(buildingField, javax.swing.GroupLayout.DEFAULT_SIZE, 117, Short.MAX_VALUE)
                                                            .addComponent(extField))))))
                                        .addGap(79, 79, 79)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(primaryUnitLabel)
                                            .addComponent(backupUnitsLabel)
                                            .addComponent(backupUnitsField, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(jPanel1Layout.createSequentialGroup()
                                                .addComponent(priorityDescLabel)
                                                .addGap(18, 18, 18)
                                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(problemField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(problemCodeField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(priorityDescField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(addressLabel)
                                .addGap(54, 54, 54)
                                .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(crossStreetLabel)
                            .addComponent(mapInfoLabel))
                        .addGap(73, 73, 73))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(statusBarLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(callInitiatedLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(callInitiatedField))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(incidentNumberLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(incidentNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, 149, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(50, 50, 50)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGap(6, 6, 6)
                                        .addComponent(timeInQLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(timeInQField))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(callTakenLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(callTakenField, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(50, 50, 50)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(totalElapsedTimeLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(totalElapsedTimeField))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(lastUpdatedLabel)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(lastUpdatedField, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addGap(5, 5, 5))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(incidentNumberLabel)
                                .addComponent(incidentNumberField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(lastUpdatedLabel)
                                .addComponent(lastUpdatedField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(10, 10, 10)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(callInitiatedLabel)
                                    .addComponent(callInitiatedField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(totalElapsedTimeLabel)
                                    .addComponent(totalElapsedTimeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(callTakenLabel)
                            .addComponent(callTakenField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(timeInQLabel)
                            .addComponent(timeInQField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(4, 4, 4)))
                .addComponent(statusBarLabel)
                .addGap(7, 7, 7)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(addressLabel)
                            .addComponent(problemLabel)
                            .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cityLabel)
                            .addComponent(problemCodeLabel)
                            .addComponent(cityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(aptLabel)
                            .addComponent(priorityDescLabel)
                            .addComponent(buildingLabel)
                            .addComponent(aptField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(buildingField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(phoneLabel)
                            .addComponent(extLabel)
                            .addComponent(phoneField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(extField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(problemField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(problemCodeField, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(priorityDescField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(crossStreetLabel)
                    .addComponent(primaryUnitLabel)
                    .addComponent(crossStreetField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(locationLabel)
                    .addComponent(locationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(primaryUnitField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(mapInfoLabel)
                    .addComponent(backupUnitsLabel)
                    .addComponent(mapInfoField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(respAreaLabel)
                    .addComponent(divisionLabel)
                    .addComponent(respAreaField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(divisionField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(backupUnitsField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(sectorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sectorCodeLabel)
                    .addComponent(sectorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(sectorCodeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(callerTypeLabel)
                    .addComponent(callerNameLabel)
                    .addComponent(callerTypeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(callerNameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(61, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(incidentCommentsLabel)
                        .addGap(0, 788, Short.MAX_VALUE))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(incidentCommentsLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(502, Short.MAX_VALUE))
        );

        jScrollPane3.setViewportView(jPanel2);

        jSplitPane2.setRightComponent(jScrollPane3);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(printButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 927, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jSplitPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(printButton, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>                        

    private void printButtonActionPerformed(java.awt.event.ActionEvent evt) {                                            
        // TODO add your handling code here:
    }                                           

    private void respAreaFieldActionPerformed(java.awt.event.ActionEvent evt) {                                              
        // TODO add your handling code here:
    }                                             

    public void refreshInformation(int incidentId){
        /*incidentNumberField.setText(cadData.getIncident(incidentId).getMasterID());
        callInitiatedField.setText(cadData.getIncident(incidentId).getInfo().getCallInit());
        callTakenField.setText(cadData.getIncident(incidentId).getInfo().getCallTaken());
        timeInQField.setText(cadData.getIncident(incidentId).getInfo().getTimeInQ());
        lastUpdatedField.setText(cadData.getIncident(incidentId).getInfo().getLastUpdated());
        //NEED TO CHANGE : get timeStarted, setTotalElaspedTime = currentTime - timeStarted
        
        totalElapsedTimeField.setText(cadData.getIncident(incidentId).getInfo().getTotalElapsedTime());
        addressField.setText(cadData.getIncident(incidentId).getIncidentLocation().getAddress());
        cityField.setText(cadData.getIncident(incidentId).getIncidentLocation().getCity());
        aptField.setText(cadData.getIncident(incidentId).getIncidentLocation().getApt());
        phoneField.setText(cadData.getIncident(incidentId).getIncidentCaller().getPhone());
        crossStreetField.setText(cadData.getIncident(incidentId).getIncidentLocation().getCrossSt());
        locationField.setText(cadData.getIncident(incidentId).getIncidentLocation().getLoc());
        //mapInfoField.setText
        respAreaField.setText(cadData.getIncident(incidentId).getResponse().getArea());
        sectorField.setText(cadData.getIncident(incidentId).getIncidentLocation().getSector());
        callerTypeField.setText(cadData.getIncident(incidentId).getIncidentCaller().getCallerType());
        problemField.setText(cadData.getIncident(incidentId).getProblem().getProblem());
        problemCodeField.setText(cadData.getIncident(incidentId).getProblem().getProblemCode());
        priorityDescField.setText(cadData.getIncident(incidentId).getP());
        primaryUnitField.setText(cadData.getIncident(incidentId).getAssignedUnitNums().getFirst());
        if(cadData.getIncident(incidentId).isViewable() && cadData.getIncident(incidentId).getIncidentStatus() == IncidentEnums.Closed){
            statusBarLabel.setIcon(closed);
        }else{
            statusBarLabel.setIcon(active);
        }
        buildingField.setText(cadData.getIncident(incidentId).getIncidentLocation().getBuilding());
        extField.setText(cadData.getIncident(incidentId).getIncidentCaller().getExt());
        divisionField.setText(cadData.getIncident(incidentId).getIncidentLocation().getDivision());
        sectorCodeField.setText(cadData.getIncident(incidentId).getIncidentLocation().getSectorCode());
        callerNameField.setText(cadData.getIncident(incidentId).getIncidentCaller().getCallerName());
        if(cadData.getIncident(incidentId).getAssignedUnitNums().size() <= 1){
            backupUnitsField.setText("");
        }else{
            String unitNums = "";
            for(int i = 1; i < cadData.getIncident(incidentId).getAssignedUnitNums().size(); i++){
                unitNums = unitNums.concat((String) cadData.getIncident(incidentId).getAssignedUnitNums().get(i));
                if(i == cadData.getIncident(incidentId).getAssignedUnitNums().size() - 1){
                    break;
                }
                unitNums = unitNums.concat(", ");
            }
            backupUnitsField.setText(unitNums);
        }*/
    }
    
    /*
     * Displays the information of the latest incident clicked.
     */
    public void open(int incidentId){
        refreshInformation(incidentId);
        //setTitle("<1> RL ~" + cadData.getIncident(incidentId).getMasterID());
    }
    
    /*
     * Hides the screen.
     */
    public void close(){
        setVisible(false);
    }

    
    // Variables declaration - do not modify
    private ImageIcon active;
    private ImageIcon closed;
    private javax.swing.JTextField addressField;
    private javax.swing.JLabel addressLabel;
    private javax.swing.JTextField aptField;
    private javax.swing.JLabel aptLabel;
    private javax.swing.JTextField backupUnitsField;
    private javax.swing.JLabel backupUnitsLabel;
    private javax.swing.JTextField buildingField;
    private javax.swing.JLabel buildingLabel;
    private javax.swing.JTextField callInitiatedField;
    private javax.swing.JLabel callInitiatedLabel;
    private javax.swing.JTextField callTakenField;
    private javax.swing.JLabel callTakenLabel;
    private javax.swing.JTextField callerNameField;
    private javax.swing.JLabel callerNameLabel;
    private javax.swing.JTextField callerTypeField;
    private javax.swing.JLabel callerTypeLabel;
    private javax.swing.JTextField cityField;
    private javax.swing.JLabel cityLabel;
    private javax.swing.JTextField crossStreetField;
    private javax.swing.JLabel crossStreetLabel;
    private javax.swing.JTextField divisionField;
    private javax.swing.JLabel divisionLabel;
    private javax.swing.JLabel extLabel;
    private javax.swing.JLabel incidentCommentsLabel;
    private javax.swing.JTable incidentCommentsTable;
    private javax.swing.JTextField incidentNumberField;
    private javax.swing.JLabel incidentNumberLabel;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSplitPane jSplitPane2;
    private javax.swing.JTextField extField;
    private javax.swing.JTextField lastUpdatedField;
    private javax.swing.JLabel lastUpdatedLabel;
    private javax.swing.JTextField locationField;
    private javax.swing.JLabel locationLabel;
    private javax.swing.JTextField mapInfoField;
    private javax.swing.JLabel mapInfoLabel;
    private javax.swing.JTextField phoneField;
    private javax.swing.JLabel phoneLabel;
    private javax.swing.JTextField primaryUnitField;
    private javax.swing.JLabel primaryUnitLabel;
    private javax.swing.JButton printButton;
    private javax.swing.JTextField priorityDescField;
    private javax.swing.JLabel priorityDescLabel;
    private javax.swing.JTextField problemCodeField;
    private javax.swing.JLabel problemCodeLabel;
    private javax.swing.JTextField problemField;
    private javax.swing.JLabel problemLabel;
    private javax.swing.JTextField respAreaField;
    private javax.swing.JLabel respAreaLabel;
    private javax.swing.JTextField sectorCodeField;
    private javax.swing.JLabel sectorCodeLabel;
    private javax.swing.JTextField sectorField;
    private javax.swing.JLabel sectorLabel;
    private javax.swing.JLabel statusBarLabel;
    private javax.swing.JTextField timeInQField;
    private javax.swing.JLabel timeInQLabel;
    private javax.swing.JTextField totalElapsedTimeField;
    private javax.swing.JLabel totalElapsedTimeLabel;
    // End of variables declaration                   
}