package tmcsim.simulationmanager;

import java.awt.BorderLayout;
import java.util.Vector;
import javax.swing.JFrame;
import tmcsim.cadmodels.*;
import tmcsim.client.cadclientgui.data.IncidentEvent;

/**
 *
 * @author jdalbey
 */
public class IncidentHistoryPanelDriver
{

    public static void main(String[] args)
    {
        // Create an IncidentEvent
        Vector dummy = new Vector();
        IncidentInquiryHeader hdr = new IncidentInquiryHeader();
        // The incident type is a 4-digit string (Use MMYY for month and year of your birth)
        hdr.type = "1179";
        // The incident location is the name of your home town
        hdr.fullLocation = "San Luis Obispo";
        IncidentInquiryModel_obj mo = new IncidentInquiryModel_obj();
        mo.setHeader(hdr);
        // The incident details is a parade on the main street (provide street name for your home town)
        IncidentInquiryDetails det = new IncidentInquiryDetails("1", "Parade on Higuera", false);
        mo.addDetail(det);
        IncidentEvent event = new IncidentEvent(10, mo, "", 4, dummy, dummy);
        // Create an IncidentHistoryPanel
        IncidentHistoryPanel ihPanel = new IncidentHistoryPanel();
        // Add the event to the panel
        ihPanel.updateIncidentHistory(event);

        // Create the frame.
        JFrame frame = new JFrame("Incident Panel Demo");
        // Specify closing behavior
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        // Add component to the frame.
        frame.getContentPane().add(ihPanel, BorderLayout.CENTER);
        // Size the frame.
        frame.pack();
        // Show it.
        frame.setVisible(true);
    }
}
