source: tmcsimulator/trunk/test/tmcsim/simulationmanager/IncidentHistoryPanelDriver.java @ 47

Revision 47, 1.6 KB checked in by jdalbey, 10 years ago (diff)

Merge 305 modifications into trunk.

Line 
1package tmcsim.simulationmanager;
2
3import java.awt.BorderLayout;
4import java.util.Vector;
5import javax.swing.JFrame;
6import tmcsim.cadmodels.*;
7import tmcsim.client.cadclientgui.data.IncidentEvent;
8
9/**
10 *
11 * @author jdalbey
12 */
13public class IncidentHistoryPanelDriver
14{
15
16    public static void main(String[] args)
17    {
18        // Create an IncidentEvent
19        Vector dummy = new Vector();
20        IncidentInquiryHeader hdr = new IncidentInquiryHeader();
21        // The incident type is a 4-digit string (Use MMYY for month and year of your birth)
22        hdr.type = "1179";
23        // The incident location is the name of your home town
24        hdr.fullLocation = "San Luis Obispo";
25        IncidentInquiryModel_obj mo = new IncidentInquiryModel_obj();
26        mo.setHeader(hdr);
27        // The incident details is a parade on the main street (provide street name for your home town)
28        IncidentInquiryDetails det = new IncidentInquiryDetails("1", "Parade on Higuera", false);
29        mo.addDetail(det);
30        IncidentEvent event = new IncidentEvent(10, mo, "", 4, dummy, dummy);
31        // Create an IncidentHistoryPanel
32        IncidentHistoryPanel ihPanel = new IncidentHistoryPanel();
33        // Add the event to the panel
34        ihPanel.updateIncidentHistory(event);
35
36        // Create the frame.
37        JFrame frame = new JFrame("Incident Panel Demo");
38        // Specify closing behavior
39        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
40        // Add component to the frame.
41        frame.getContentPane().add(ihPanel, BorderLayout.CENTER);
42        // Size the frame.
43        frame.pack();
44        // Show it.
45        frame.setVisible(true);
46    }
47}
Note: See TracBrowser for help on using the repository browser.