source: tmcsimulator-scriptbuilder/src/scriptbuilder/gui/ScriptBuilderFrame.java @ 1

Revision 1, 144.4 KB checked in by bmcguffin, 9 years ago (diff)

2017/07/18: Uploaded entire prototype to SVN repo.

Line 
1/*
2 * ScriptBuilderFrame.java
3 *
4 * Created on May 8, 2010, 12:01:46 PM
5 */
6package scriptbuilder.gui;
7
8import java.awt.Adjustable;
9import java.awt.Color;
10import java.awt.Cursor;
11import java.awt.event.AdjustmentEvent;
12import java.awt.event.AdjustmentListener;
13import java.awt.event.KeyEvent;
14import java.awt.event.KeyListener;
15import java.io.File;
16import java.util.ArrayList;
17import java.util.Observable;
18import java.util.Observer;
19import java.util.Random;
20import javax.swing.DefaultListModel;
21import javax.swing.JButton;
22import javax.swing.JFileChooser;
23import javax.swing.JOptionPane;
24import javax.swing.UIManager;
25import javax.swing.UnsupportedLookAndFeelException;
26import scriptbuilder.structures.ScriptEvent;
27import scriptbuilder.structures.ScriptEvent.ScriptEventType;
28import scriptbuilder.structures.ScriptIncident;
29import scriptbuilder.structures.ScriptIncident.IncidentFocusedEvent;
30import scriptbuilder.structures.ScriptIncident.SliceChangedEvent;
31import scriptbuilder.structures.SimulationScript;
32import scriptbuilder.structures.TimeSlice;
33import scriptbuilder.structures.events.ScriptEventInterface;
34
35/**
36 * GUI for the script builder. Contains all panels and editor elements. Performs
37 * updates to reflect script model, which it observes.
38 *
39 * @author Greg Eddington
40 * @author Bryan McGuffin
41 */
42public class ScriptBuilderFrame extends javax.swing.JFrame implements Observer
43{
44
45    /**
46     * The script model.
47     */
48    private SimulationScript script;
49    /**
50     * The current type of selected event.
51     */
52    public ScriptEventType currentEventType;
53    /**
54     * A list of all the event type buttons.
55     */
56    private ArrayList<JButton> eventButtons = null;
57
58    /**
59     * True if we are currently editing an incident.
60     */
61    private boolean editingIncident;
62    /**
63     * Index of the previous incident.
64     */
65    int oldIncidentIndex;
66
67    /**
68     * Get the script currently in use.
69     *
70     * @return the script model object
71     */
72    public SimulationScript getScript()
73    {
74        System.out.println("Change");
75        return script;
76    }
77
78    /**
79     * Listener for the scroll pane.
80     */
81    class MyAdjustmentListener implements AdjustmentListener
82    {
83
84        /**
85         * If the incident timeline is scrolled horizontally, the timestamp
86         * panel is updated to reflect it.
87         *
88         * @param evt the adjustment event
89         */
90        @Override
91        public void adjustmentValueChanged(AdjustmentEvent evt)
92        {
93            if (evt.getAdjustable().getOrientation() == Adjustable.HORIZONTAL)
94            {
95                timeStampScrollPane.getHorizontalScrollBar()
96                        .setValue(timelinesScrollPane.getHorizontalScrollBar().getValue());
97            }
98            else
99            {
100                // Event from vertical scrollbar
101            }
102
103            repaint();
104        }
105    }
106
107    /**
108     * Listener for key presses. Used for hotkeys for different event types.
109     */
110    private class TimelineKeyListener implements KeyListener
111    {
112
113        /**
114         * If a hotkey is pressed, select that type of event.
115         *
116         * @param e the key event
117         */
118        @Override
119        public void keyPressed(KeyEvent e)
120        {
121            JButton lastButton = null;
122            for (JButton eb : eventButtons)
123            {
124                eb.setFocusPainted(false);
125                if (eb.isSelected())
126                {
127                    lastButton = eb;
128                }
129                eb.setSelected(false);
130            }
131
132            JButton newButton = null;
133            switch (e.getKeyChar())
134            {
135                case 'u':
136                    currentEventType = ScriptEventType.AUDIO_EVENT;
137                    newButton = audioButton;
138                    break;
139                case 'c':
140                    currentEventType = ScriptEventType.CAD_EVENT;
141                    newButton = cadButton;
142                    break;
143                case 'v':
144                    currentEventType = ScriptEventType.CCTV_EVENT;
145                    newButton = cctvButton;
146                    break;
147                case 'h':
148                    currentEventType = ScriptEventType.CHP_RADIO_EVENT;
149                    newButton = chpRadioButton;
150                    break;
151                case 'p':
152                    currentEventType = ScriptEventType.PARAMICS_EVENT;
153                    newButton = paramicsButton;
154                    break;
155                case 'o':
156                    currentEventType = ScriptEventType.TOW_EVENT;
157                    newButton = towButton;
158                    break;
159                case 'n':
160                    currentEventType = ScriptEventType.UNIT_EVENT;
161                    newButton = unitButton;
162                    break;
163                case 'w':
164                    currentEventType = ScriptEventType.WITNESS_EVENT;
165                    newButton = witnessButton;
166                    break;
167                case 'm':
168                    currentEventType = ScriptEventType.MAINTENANCE_RADIO_EVENT;
169                    newButton = maintenanceRadioButton;
170                    break;
171                case 't':
172                    currentEventType = ScriptEventType.TMT_RADIO_EVENT;
173                    newButton = tmtRadioButton;
174                    break;
175                case 'e':
176                    currentEventType = ScriptEventType.TELEPHONE_EVENT;
177                    newButton = telephoneButton;
178                    break;
179                case 'a':
180                    currentEventType = ScriptEventType.ATMS_EVAL_EVENT;
181                    newButton = atmsEvalButton;
182                    break;
183                case 'l':
184                    currentEventType = ScriptEventType.ACTIVITY_LOG_EVAL_EVENT;
185                    newButton = activityLogEvalButton;
186                    break;
187                case 'd':
188                    currentEventType = ScriptEventType.CAD_EVAL_EVENT;
189                    newButton = cadEvalButton;
190                    break;
191                case 's':
192                    currentEventType = ScriptEventType.CMS_EVAL_EVENT;
193                    newButton = cmsEvalButton;
194                    break;
195                case 'f':
196                    currentEventType = ScriptEventType.FACILITATOR_EVAL_EVENT;
197                    newButton = facilitatorEvalButton;
198                    break;
199                case 'r':
200                    currentEventType = ScriptEventType.RADIO_EVAL_EVENT;
201                    newButton = radioEvalButton;
202                    break;
203                default:
204                    newButton = lastButton;
205            }
206
207            if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
208            {
209                currentEventType = null;
210                newButton = selectButton;
211            }
212
213            if (newButton != null)
214            {
215                newButton.setSelected(true);
216            }
217
218            repaint();
219        }
220
221        /**
222         * Take no action upon key release.
223         *
224         * @param e the key event
225         */
226        @Override
227        public void keyReleased(KeyEvent e)
228
229        {
230        }
231
232        /**
233         * Take no action upon key release.
234         *
235         * @param e the key event
236         */
237        @Override
238        public void keyTyped(KeyEvent e)
239        {
240        }
241    }
242
243    /**
244     * Constructor. Prep new script model, initialize the GUI, and add listeners
245     * for all buttons.
246     */
247    public ScriptBuilderFrame()
248    {
249        script = new SimulationScript();
250        script.addObserver(this);
251        initComponents();
252        this.update(null, script);
253        selectButton.addKeyListener(new TimelineKeyListener());
254        cadButton.addKeyListener(new TimelineKeyListener());
255        cctvButton.addKeyListener(new TimelineKeyListener());
256        chpRadioButton.addKeyListener(new TimelineKeyListener());
257        paramicsButton.addKeyListener(new TimelineKeyListener());
258        towButton.addKeyListener(new TimelineKeyListener());
259        unitButton.addKeyListener(new TimelineKeyListener());
260        witnessButton.addKeyListener(new TimelineKeyListener());
261        maintenanceRadioButton.addKeyListener(new TimelineKeyListener());
262        tmtRadioButton.addKeyListener(new TimelineKeyListener());
263        telephoneButton.addKeyListener(new TimelineKeyListener());
264        atmsEvalButton.addKeyListener(new TimelineKeyListener());
265        activityLogEvalButton.addKeyListener(new TimelineKeyListener());
266        cadEvalButton.addKeyListener(new TimelineKeyListener());
267        cmsEvalButton.addKeyListener(new TimelineKeyListener());
268        facilitatorEvalButton.addKeyListener(new TimelineKeyListener());
269        radioEvalButton.addKeyListener(new TimelineKeyListener());
270
271        // Hack to refresh the zoom
272        zoomSlider.setValue(zoomSlider.getValue() - 1);
273        zoomSlider.setValue(zoomSlider.getValue() + 1);
274
275        // Set listener for scroll pane
276        AdjustmentListener listener = new MyAdjustmentListener();
277        timelinesScrollPane.getHorizontalScrollBar().addAdjustmentListener(listener);
278        timelinesScrollPane.getVerticalScrollBar().addAdjustmentListener(listener);
279
280        // Button list
281        eventButtons = new ArrayList<JButton>();
282        eventButtons.add(maintenanceRadioButton);
283        eventButtons.add(tmtRadioButton);
284        eventButtons.add(telephoneButton);
285        eventButtons.add(paramicsButton);
286        eventButtons.add(towButton);
287        eventButtons.add(witnessButton);
288        eventButtons.add(unitButton);
289        eventButtons.add(audioButton);
290        eventButtons.add(cadButton);
291        eventButtons.add(cctvButton);
292        eventButtons.add(chpRadioButton);
293        eventButtons.add(selectButton);
294        eventButtons.add(cmsEvalButton);
295        eventButtons.add(atmsEvalButton);
296        eventButtons.add(cadEvalButton);
297        eventButtons.add(activityLogEvalButton);
298        eventButtons.add(facilitatorEvalButton);
299        eventButtons.add(radioEvalButton);
300    }
301
302    /**
303     * Update the GUI to reflect the model. If the script changed, update all
304     * the incident panels. If a timeslice changed, add any new events to the
305     * model. If an incident gained focus, update the incident info screen to
306     * display its details.
307     *
308     * @param o The observed object
309     * @param arg Either the script model or an incident event, depending on who
310     * called this update
311     */
312    @Override
313    public void update(Observable o, Object arg)
314    {
315        if (arg instanceof SimulationScript)
316        {
317            script = (SimulationScript) arg;
318
319            if (script.incidents.size() != 10)
320            {
321                return;
322            }
323
324            timelineTickPanel.update(script);
325            timeStampPanel.update(script);
326
327            incidentTimelinePanel1.timelinePanelUpdate(script.incidents.get(0));
328            incidentTimelinePanel2.timelinePanelUpdate(script.incidents.get(1));
329            incidentTimelinePanel3.timelinePanelUpdate(script.incidents.get(2));
330            incidentTimelinePanel4.timelinePanelUpdate(script.incidents.get(3));
331            incidentTimelinePanel5.timelinePanelUpdate(script.incidents.get(4));
332            incidentTimelinePanel6.timelinePanelUpdate(script.incidents.get(5));
333            incidentTimelinePanel7.timelinePanelUpdate(script.incidents.get(6));
334            incidentTimelinePanel8.timelinePanelUpdate(script.incidents.get(7));
335            incidentTimelinePanel9.timelinePanelUpdate(script.incidents.get(8));
336            incidentTimelinePanel10.timelinePanelUpdate(script.incidents.get(9));
337
338            incidentNumberPanel1.update(script.incidents.get(0));
339            incidentNumberPanel2.update(script.incidents.get(1));
340            incidentNumberPanel3.update(script.incidents.get(2));
341            incidentNumberPanel4.update(script.incidents.get(3));
342            incidentNumberPanel5.update(script.incidents.get(4));
343            incidentNumberPanel6.update(script.incidents.get(5));
344            incidentNumberPanel7.update(script.incidents.get(6));
345            incidentNumberPanel8.update(script.incidents.get(7));
346            incidentNumberPanel9.update(script.incidents.get(8));
347            incidentNumberPanel10.update(script.incidents.get(9));
348
349            /**
350             * DefaultComboBoxModel model = new DefaultComboBoxModel(); for
351             * (ScriptIncident i : script.incidents) { if (i != null)
352             * model.addElement(i); } gotoIncident.setModel(model);*
353             */
354            this.setPreferredSize(this.getSize());
355            pack();
356        }
357        else if (arg instanceof SliceChangedEvent)
358        {
359            TimeSlice slice = ((SliceChangedEvent) arg).slice;
360
361            DefaultListModel model = new DefaultListModel();
362            for (ScriptEventInterface e : slice.events)
363            {
364                model.addElement(e);
365            }
366            scriptEventsList.setModel(model);
367        }
368        else if (arg instanceof IncidentFocusedEvent)
369        {
370            ScriptIncident i = ((IncidentFocusedEvent) arg).incident;
371
372            incidentNumber.setText(Integer.toString(i.number));
373            incidentName.setText(i.name);
374            incidentDescription.setText(i.description);
375
376            //gotoIncident.setSelectedItem(i);
377        }
378    }
379
380    /**
381     * This method is called from within the constructor to initialize the form.
382     * WARNING: Do NOT modify this code. The content of this method is always
383     * regenerated by the Form Editor.
384     */
385    @SuppressWarnings("unchecked")
386    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
387    private void initComponents()
388    {
389
390        incidentPopupMenu = new javax.swing.JPopupMenu();
391        popupDeleteIncident = new javax.swing.JMenuItem();
392        eventPopupMenu = new javax.swing.JPopupMenu();
393        cadEvent = new javax.swing.JMenuItem();
394        jMenuItem2 = new javax.swing.JMenuItem();
395        radioEvent = new javax.swing.JMenuItem();
396        jMenuItem4 = new javax.swing.JMenuItem();
397        jMenuItem5 = new javax.swing.JMenuItem();
398        jMenuItem6 = new javax.swing.JMenuItem();
399        cadEventFrame = new javax.swing.JFrame();
400        jLabel5 = new javax.swing.JLabel();
401        radioEventFrame = new javax.swing.JFrame();
402        radioTypeLabel = new javax.swing.JLabel();
403        jLabel7 = new javax.swing.JLabel();
404        radioTypeComboBox = new javax.swing.JComboBox();
405        radioMessageScrollPane = new javax.swing.JScrollPane();
406        radioMessage = new javax.swing.JTextArea();
407        okButton = new javax.swing.JButton();
408        cancelButton = new javax.swing.JButton();
409        eventListPopupMenu = new javax.swing.JPopupMenu();
410        editEventList = new javax.swing.JMenuItem();
411        deleteEventList = new javax.swing.JMenuItem();
412        incidentFrame = new javax.swing.JFrame();
413        jLabel6 = new javax.swing.JLabel();
414        jLabel8 = new javax.swing.JLabel();
415        jLabel9 = new javax.swing.JLabel();
416        jLabel10 = new javax.swing.JLabel();
417        jScrollPane1 = new javax.swing.JScrollPane();
418        addIncidentDescription = new javax.swing.JTextArea();
419        incidentOkButton = new javax.swing.JButton();
420        incidentCancelButton = new javax.swing.JButton();
421        addIncidentNumber = new javax.swing.JSpinner();
422        addIncidentName = new javax.swing.JTextField();
423        jLabel11 = new javax.swing.JLabel();
424        addIncidentLength = new javax.swing.JSpinner();
425        jLabel12 = new javax.swing.JLabel();
426        addIncidentStart = new javax.swing.JSpinner();
427        jButton3 = new javax.swing.JButton();
428        incidentColorField = new javax.swing.JTextField();
429        addNoiseFrame = new javax.swing.JFrame();
430        jLabel13 = new javax.swing.JLabel();
431        jSlider1 = new javax.swing.JSlider();
432        jSlider2 = new javax.swing.JSlider();
433        jLabel14 = new javax.swing.JLabel();
434        jSlider3 = new javax.swing.JSlider();
435        jLabel15 = new javax.swing.JLabel();
436        jTextArea1 = new javax.swing.JTextArea();
437        jSlider4 = new javax.swing.JSlider();
438        jLabel16 = new javax.swing.JLabel();
439        jSlider5 = new javax.swing.JSlider();
440        jLabel17 = new javax.swing.JLabel();
441        jButton1 = new javax.swing.JButton();
442        jButton2 = new javax.swing.JButton();
443        jLabel20 = new javax.swing.JLabel();
444        jLabel21 = new javax.swing.JLabel();
445        incidentColorChooser = new javax.swing.JColorChooser();
446        timelinesScrollPane = new javax.swing.JScrollPane();
447        timelineTickPanel = new scriptbuilder.gui.panels.TimelineTickPanel();
448        incidentTimelinePanel1 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
449        incidentTimelinePanel2 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
450        incidentTimelinePanel8 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
451        incidentTimelinePanel3 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
452        incidentTimelinePanel6 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
453        incidentTimelinePanel5 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
454        incidentTimelinePanel4 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
455        incidentTimelinePanel7 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
456        incidentTimelinePanel10 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
457        incidentTimelinePanel9 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
458        incidentNumberPanel1 = new scriptbuilder.gui.panels.IncidentNumberPanel();
459        incidentNumberPanel2 = new scriptbuilder.gui.panels.IncidentNumberPanel();
460        incidentNumberPanel3 = new scriptbuilder.gui.panels.IncidentNumberPanel();
461        incidentNumberPanel4 = new scriptbuilder.gui.panels.IncidentNumberPanel();
462        incidentNumberPanel5 = new scriptbuilder.gui.panels.IncidentNumberPanel();
463        incidentNumberPanel6 = new scriptbuilder.gui.panels.IncidentNumberPanel();
464        incidentNumberPanel7 = new scriptbuilder.gui.panels.IncidentNumberPanel();
465        incidentNumberPanel8 = new scriptbuilder.gui.panels.IncidentNumberPanel();
466        incidentNumberPanel9 = new scriptbuilder.gui.panels.IncidentNumberPanel();
467        incidentNumberPanel10 = new scriptbuilder.gui.panels.IncidentNumberPanel();
468        scriptEventsPanel = new javax.swing.JPanel();
469        scriptEventsPane = new javax.swing.JScrollPane();
470        scriptEventsList = new javax.swing.JList();
471        zoomSlider = new javax.swing.JSlider();
472        scriptEventsPanel1 = new javax.swing.JPanel();
473        jLabel2 = new javax.swing.JLabel();
474        jLabel3 = new javax.swing.JLabel();
475        jLabel4 = new javax.swing.JLabel();
476        incidentName = new javax.swing.JTextField();
477        incidentDescriptionPane = new javax.swing.JScrollPane();
478        incidentDescription = new javax.swing.JTextArea();
479        incidentNumber = new javax.swing.JTextField();
480        selectButton = new javax.swing.JButton();
481        incidentEventsPanel = new javax.swing.JPanel();
482        maintenanceRadioButton = new javax.swing.JButton();
483        tmtRadioButton = new javax.swing.JButton();
484        telephoneButton = new javax.swing.JButton();
485        unitButton = new javax.swing.JButton();
486        witnessButton = new javax.swing.JButton();
487        paramicsButton = new javax.swing.JButton();
488        towButton = new javax.swing.JButton();
489        audioButton = new javax.swing.JButton();
490        cctvButton = new javax.swing.JButton();
491        cadButton = new javax.swing.JButton();
492        chpRadioButton = new javax.swing.JButton();
493        evaluationEventsPanel = new javax.swing.JPanel();
494        atmsEvalButton = new javax.swing.JButton();
495        cmsEvalButton = new javax.swing.JButton();
496        cadEvalButton = new javax.swing.JButton();
497        facilitatorEvalButton = new javax.swing.JButton();
498        activityLogEvalButton = new javax.swing.JButton();
499        radioEvalButton = new javax.swing.JButton();
500        zoomInIcon = new javax.swing.JLabel();
501        zoomOutIcon = new javax.swing.JLabel();
502        timeStampScrollPane = new javax.swing.JScrollPane();
503        timeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel();
504        scriptBuilderMenuBar = new javax.swing.JMenuBar();
505        fileMenu = new javax.swing.JMenu();
506        fileNew = new javax.swing.JMenuItem();
507        jSeparator1 = new javax.swing.JPopupMenu.Separator();
508        fileOpen = new javax.swing.JMenuItem();
509        jSeparator2 = new javax.swing.JPopupMenu.Separator();
510        fileSave = new javax.swing.JMenuItem();
511        fileSaveAs = new javax.swing.JMenuItem();
512        generateMenu = new javax.swing.JMenu();
513        generateNotebooks = new javax.swing.JMenuItem();
514        jMenuItem3 = new javax.swing.JMenuItem();
515        generateScorecards = new javax.swing.JMenuItem();
516        generateOrganizationChart = new javax.swing.JMenuItem();
517        jSeparator3 = new javax.swing.JPopupMenu.Separator();
518        generateProjectRequirements = new javax.swing.JMenuItem();
519        incidentMenu = new javax.swing.JMenu();
520        newIncident = new javax.swing.JMenuItem();
521        editIncident = new javax.swing.JMenuItem();
522        jSeparator4 = new javax.swing.JPopupMenu.Separator();
523        saveIncident = new javax.swing.JMenuItem();
524        loadIncident = new javax.swing.JMenuItem();
525        generateNoiseMenu = new javax.swing.JMenu();
526        generateNoiseOption = new javax.swing.JMenuItem();
527        helpMenu = new javax.swing.JMenu();
528        helpTutorial = new javax.swing.JMenuItem();
529        helpAbout = new javax.swing.JMenuItem();
530        jMenu2 = new javax.swing.JMenu();
531        XMLImportBtn = new javax.swing.JMenuItem();
532        XMLExportBtn = new javax.swing.JMenuItem();
533
534        popupDeleteIncident.setText("Delete Incident...");
535        incidentPopupMenu.add(popupDeleteIncident);
536
537        cadEvent.setText("CAD Event");
538        cadEvent.addMouseListener(new java.awt.event.MouseAdapter()
539        {
540            public void mousePressed(java.awt.event.MouseEvent evt)
541            {
542                cadEventMousePressed(evt);
543            }
544            public void mouseReleased(java.awt.event.MouseEvent evt)
545            {
546                cadEventMouseReleased(evt);
547            }
548        });
549        eventPopupMenu.add(cadEvent);
550
551        jMenuItem2.setText("Paramics Event");
552        eventPopupMenu.add(jMenuItem2);
553
554        radioEvent.setText("Radio Event");
555        radioEvent.addMouseListener(new java.awt.event.MouseAdapter()
556        {
557            public void mousePressed(java.awt.event.MouseEvent evt)
558            {
559                radioEventMousePressed(evt);
560            }
561        });
562        eventPopupMenu.add(radioEvent);
563
564        jMenuItem4.setText("Telephone Event");
565        eventPopupMenu.add(jMenuItem4);
566
567        jMenuItem5.setText("Video Event");
568        eventPopupMenu.add(jMenuItem5);
569
570        jMenuItem6.setText("Evaluation Event");
571        eventPopupMenu.add(jMenuItem6);
572
573        cadEventFrame.setMinimumSize(new java.awt.Dimension(400, 300));
574
575        jLabel5.setText("CAD Entry");
576
577        javax.swing.GroupLayout cadEventFrameLayout = new javax.swing.GroupLayout(cadEventFrame.getContentPane());
578        cadEventFrame.getContentPane().setLayout(cadEventFrameLayout);
579        cadEventFrameLayout.setHorizontalGroup(
580            cadEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
581            .addGroup(cadEventFrameLayout.createSequentialGroup()
582                .addContainerGap()
583                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
584                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
585        );
586        cadEventFrameLayout.setVerticalGroup(
587            cadEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
588            .addGroup(cadEventFrameLayout.createSequentialGroup()
589                .addContainerGap()
590                .addComponent(jLabel5)
591                .addContainerGap(1357, Short.MAX_VALUE))
592        );
593
594        radioEventFrame.setTitle("Add Radio Event");
595        radioEventFrame.setMinimumSize(new java.awt.Dimension(400, 300));
596
597        radioTypeLabel.setText("Radio Type:");
598
599        jLabel7.setText("Radio Message:");
600
601        radioTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "TMT", "Maintanence" }));
602
603        radioMessageScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
604
605        radioMessage.setColumns(20);
606        radioMessage.setLineWrap(true);
607        radioMessage.setRows(5);
608        radioMessage.setWrapStyleWord(true);
609        radioMessageScrollPane.setViewportView(radioMessage);
610
611        okButton.setText("OK");
612        okButton.addActionListener(new java.awt.event.ActionListener()
613        {
614            public void actionPerformed(java.awt.event.ActionEvent evt)
615            {
616                okButtonActionPerformed(evt);
617            }
618        });
619
620        cancelButton.setText("Cancel");
621        cancelButton.addActionListener(new java.awt.event.ActionListener()
622        {
623            public void actionPerformed(java.awt.event.ActionEvent evt)
624            {
625                cancelButtonActionPerformed(evt);
626            }
627        });
628
629        javax.swing.GroupLayout radioEventFrameLayout = new javax.swing.GroupLayout(radioEventFrame.getContentPane());
630        radioEventFrame.getContentPane().setLayout(radioEventFrameLayout);
631        radioEventFrameLayout.setHorizontalGroup(
632            radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
633            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, radioEventFrameLayout.createSequentialGroup()
634                .addContainerGap()
635                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
636                    .addComponent(radioMessageScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
637                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, radioEventFrameLayout.createSequentialGroup()
638                        .addComponent(radioTypeLabel)
639                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
640                        .addComponent(radioTypeComboBox, 0, 312, Short.MAX_VALUE))
641                    .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING)
642                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, radioEventFrameLayout.createSequentialGroup()
643                        .addComponent(cancelButton)
644                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 246, Short.MAX_VALUE)
645                        .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))
646                .addContainerGap())
647        );
648        radioEventFrameLayout.setVerticalGroup(
649            radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
650            .addGroup(radioEventFrameLayout.createSequentialGroup()
651                .addContainerGap()
652                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
653                    .addComponent(radioTypeLabel)
654                    .addComponent(radioTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
655                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
656                .addComponent(jLabel7)
657                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
658                .addComponent(radioMessageScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
659                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
660                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
661                    .addComponent(okButton)
662                    .addComponent(cancelButton))
663                .addContainerGap())
664        );
665
666        editEventList.setText("Edit...");
667        editEventList.addActionListener(new java.awt.event.ActionListener()
668        {
669            public void actionPerformed(java.awt.event.ActionEvent evt)
670            {
671                editEventListActionPerformed(evt);
672            }
673        });
674        eventListPopupMenu.add(editEventList);
675
676        deleteEventList.setText("Delete...");
677        eventListPopupMenu.add(deleteEventList);
678
679        incidentFrame.setTitle("Incident");
680        incidentFrame.setMinimumSize(new java.awt.Dimension(400, 400));
681
682        jLabel6.setText("Incident Number: ");
683
684        jLabel8.setText("Incident Name:");
685
686        jLabel9.setText("Incident Color: ");
687
688        jLabel10.setText("Incident Description:");
689
690        jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
691        jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
692
693        addIncidentDescription.setColumns(20);
694        addIncidentDescription.setLineWrap(true);
695        addIncidentDescription.setRows(5);
696        addIncidentDescription.setWrapStyleWord(true);
697        jScrollPane1.setViewportView(addIncidentDescription);
698
699        incidentOkButton.setText("OK");
700        incidentOkButton.addActionListener(new java.awt.event.ActionListener()
701        {
702            public void actionPerformed(java.awt.event.ActionEvent evt)
703            {
704                incidentOkButtonActionPerformed(evt);
705            }
706        });
707
708        incidentCancelButton.setText("Cancel");
709        incidentCancelButton.addActionListener(new java.awt.event.ActionListener()
710        {
711            public void actionPerformed(java.awt.event.ActionEvent evt)
712            {
713                incidentCancelButtonActionPerformed(evt);
714            }
715        });
716
717        addIncidentNumber.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(101), Integer.valueOf(101), null, Integer.valueOf(1)));
718
719        jLabel11.setText("Incident Length in Minutes: ");
720
721        addIncidentLength.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));
722
723        jLabel12.setText("Incident Start Time in Minutes:");
724
725        addIncidentStart.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));
726
727        jButton3.setText("Choose...");
728        jButton3.addActionListener(new java.awt.event.ActionListener()
729        {
730            public void actionPerformed(java.awt.event.ActionEvent evt)
731            {
732                jButton3ActionPerformed(evt);
733            }
734        });
735
736        incidentColorField.setEditable(false);
737        incidentColorField.setBackground(new java.awt.Color(0, 0, 0));
738
739        javax.swing.GroupLayout incidentFrameLayout = new javax.swing.GroupLayout(incidentFrame.getContentPane());
740        incidentFrame.getContentPane().setLayout(incidentFrameLayout);
741        incidentFrameLayout.setHorizontalGroup(
742            incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
743            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentFrameLayout.createSequentialGroup()
744                .addContainerGap()
745                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
746                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)
747                    .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)
748                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()
749                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
750                            .addComponent(jLabel6)
751                            .addComponent(jLabel8)
752                            .addComponent(jLabel9))
753                        .addGap(18, 18, 18)
754                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
755                            .addComponent(addIncidentName, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
756                            .addComponent(addIncidentNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
757                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentFrameLayout.createSequentialGroup()
758                                .addComponent(incidentColorField, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
759                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
760                                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))))
761                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()
762                        .addComponent(incidentCancelButton)
763                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 188, Short.MAX_VALUE)
764                        .addComponent(incidentOkButton, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
765                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()
766                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
767                            .addComponent(jLabel12)
768                            .addComponent(jLabel11))
769                        .addGap(18, 18, 18)
770                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
771                            .addComponent(addIncidentStart, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)
772                            .addComponent(addIncidentLength, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE))))
773                .addContainerGap())
774        );
775        incidentFrameLayout.setVerticalGroup(
776            incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
777            .addGroup(incidentFrameLayout.createSequentialGroup()
778                .addContainerGap()
779                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
780                    .addComponent(jLabel6)
781                    .addComponent(addIncidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
782                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
783                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
784                    .addComponent(jLabel8)
785                    .addComponent(addIncidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
786                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
787                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
788                    .addComponent(jLabel9)
789                    .addComponent(jButton3)
790                    .addComponent(incidentColorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
791                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
792                .addComponent(jLabel10)
793                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
794                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)
795                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
796                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
797                    .addComponent(addIncidentStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
798                    .addComponent(jLabel12))
799                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
800                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
801                    .addComponent(addIncidentLength, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
802                    .addComponent(jLabel11))
803                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
804                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
805                    .addComponent(incidentCancelButton)
806                    .addComponent(incidentOkButton))
807                .addContainerGap())
808        );
809
810        addNoiseFrame.setTitle("Generate Noise");
811        addNoiseFrame.setMinimumSize(new java.awt.Dimension(395, 315));
812        addNoiseFrame.setResizable(false);
813
814        jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
815        jLabel13.setText("Radio Chatter: ");
816
817        jLabel14.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
818        jLabel14.setText("Lane Closures:");
819
820        jLabel15.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
821        jLabel15.setText("TMCAL Logs:");
822
823        jTextArea1.setEditable(false);
824        jTextArea1.setColumns(20);
825        jTextArea1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
826        jTextArea1.setLineWrap(true);
827        jTextArea1.setRows(5);
828        jTextArea1.setText("Noise events will be randomly generated for the simulation with frequencies based on the control selections made below");
829        jTextArea1.setWrapStyleWord(true);
830        jTextArea1.setAutoscrolls(false);
831        jTextArea1.setBorder(null);
832        jTextArea1.setDisabledTextColor(new java.awt.Color(0, 0, 0));
833        jTextArea1.setFocusable(false);
834        jTextArea1.setOpaque(false);
835
836        jLabel16.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
837        jLabel16.setText("Background Noise: ");
838
839        jLabel17.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
840        jLabel17.setText("Minor Events:");
841
842        jButton1.setText("Cancel");
843        jButton1.addActionListener(new java.awt.event.ActionListener()
844        {
845            public void actionPerformed(java.awt.event.ActionEvent evt)
846            {
847                jButton1ActionPerformed(evt);
848            }
849        });
850
851        jButton2.setText("Generate");
852        jButton2.addActionListener(new java.awt.event.ActionListener()
853        {
854            public void actionPerformed(java.awt.event.ActionEvent evt)
855            {
856                jButton2ActionPerformed(evt);
857            }
858        });
859
860        jLabel20.setText("Least Frequent");
861
862        jLabel21.setText("Most Frequent");
863
864        javax.swing.GroupLayout addNoiseFrameLayout = new javax.swing.GroupLayout(addNoiseFrame.getContentPane());
865        addNoiseFrame.getContentPane().setLayout(addNoiseFrameLayout);
866        addNoiseFrameLayout.setHorizontalGroup(
867            addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
868            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
869                .addContainerGap(21, Short.MAX_VALUE)
870                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
871                    .addComponent(jTextArea1, javax.swing.GroupLayout.Alignment.LEADING)
872                    .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
873                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup()
874                            .addComponent(jButton1)
875                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
876                            .addComponent(jButton2))
877                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup()
878                            .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
879                                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
880                                    .addComponent(jLabel16)
881                                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
882                                    .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
883                                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
884                                .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
885                            .addGap(4, 4, 4)
886                            .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
887                                .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
888                                .addComponent(jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
889                                .addComponent(jSlider3, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
890                                .addComponent(jSlider5, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
891                                .addComponent(jSlider4, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
892                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
893                                    .addComponent(jLabel20)
894                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
895                                    .addComponent(jLabel21))))))
896                .addGap(20, 20, 20))
897        );
898        addNoiseFrameLayout.setVerticalGroup(
899            addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
900            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
901                .addContainerGap()
902                .addComponent(jTextArea1, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
903                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
904                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
905                    .addComponent(jLabel21)
906                    .addComponent(jLabel20))
907                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
908                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
909                    .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
910                    .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
911                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
912                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
913                    .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
914                    .addComponent(jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
915                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
916                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
917                    .addComponent(jLabel15)
918                    .addComponent(jSlider3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
919                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
920                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
921                    .addComponent(jSlider4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
922                    .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
923                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
924                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
925                    .addComponent(jSlider5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
926                    .addComponent(jLabel17))
927                .addGap(18, 18, 18)
928                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
929                    .addComponent(jButton1)
930                    .addComponent(jButton2))
931                .addContainerGap())
932        );
933
934        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
935        setTitle("Script Builder");
936        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
937        setMinimumSize(new java.awt.Dimension(800, 800));
938
939        timelinesScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
940        timelinesScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
941        timelinesScrollPane.setFocusCycleRoot(true);
942        timelinesScrollPane.setFocusTraversalPolicyProvider(true);
943        timelinesScrollPane.setPreferredSize(new java.awt.Dimension(72000, 1341));
944
945        timelineTickPanel.setMaximumSize(new java.awt.Dimension(7200, 32767));
946        timelineTickPanel.setMinimumSize(new java.awt.Dimension(7200, 0));
947        timelineTickPanel.setPreferredSize(new java.awt.Dimension(7200, 1317));
948
949        incidentTimelinePanel1.setMaximumSize(new java.awt.Dimension(32767, 100));
950        incidentTimelinePanel1.setOpaque(false);
951        incidentTimelinePanel1.setPreferredSize(new java.awt.Dimension(691, 100));
952
953        javax.swing.GroupLayout incidentTimelinePanel1Layout = new javax.swing.GroupLayout(incidentTimelinePanel1);
954        incidentTimelinePanel1.setLayout(incidentTimelinePanel1Layout);
955        incidentTimelinePanel1Layout.setHorizontalGroup(
956            incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
957            .addGap(0, 6778, Short.MAX_VALUE)
958        );
959        incidentTimelinePanel1Layout.setVerticalGroup(
960            incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
961            .addGap(0, 100, Short.MAX_VALUE)
962        );
963
964        incidentTimelinePanel2.setOpaque(false);
965
966        javax.swing.GroupLayout incidentTimelinePanel2Layout = new javax.swing.GroupLayout(incidentTimelinePanel2);
967        incidentTimelinePanel2.setLayout(incidentTimelinePanel2Layout);
968        incidentTimelinePanel2Layout.setHorizontalGroup(
969            incidentTimelinePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
970            .addGap(0, 6726, Short.MAX_VALUE)
971        );
972        incidentTimelinePanel2Layout.setVerticalGroup(
973            incidentTimelinePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
974            .addGap(0, 100, Short.MAX_VALUE)
975        );
976
977        incidentTimelinePanel8.setOpaque(false);
978
979        javax.swing.GroupLayout incidentTimelinePanel8Layout = new javax.swing.GroupLayout(incidentTimelinePanel8);
980        incidentTimelinePanel8.setLayout(incidentTimelinePanel8Layout);
981        incidentTimelinePanel8Layout.setHorizontalGroup(
982            incidentTimelinePanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
983            .addGap(0, 5686, Short.MAX_VALUE)
984        );
985        incidentTimelinePanel8Layout.setVerticalGroup(
986            incidentTimelinePanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
987            .addGap(0, 100, Short.MAX_VALUE)
988        );
989
990        incidentTimelinePanel3.setOpaque(false);
991
992        javax.swing.GroupLayout incidentTimelinePanel3Layout = new javax.swing.GroupLayout(incidentTimelinePanel3);
993        incidentTimelinePanel3.setLayout(incidentTimelinePanel3Layout);
994        incidentTimelinePanel3Layout.setHorizontalGroup(
995            incidentTimelinePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
996            .addGap(0, 605, Short.MAX_VALUE)
997        );
998        incidentTimelinePanel3Layout.setVerticalGroup(
999            incidentTimelinePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1000            .addGap(0, 100, Short.MAX_VALUE)
1001        );
1002
1003        incidentTimelinePanel6.setOpaque(false);
1004
1005        javax.swing.GroupLayout incidentTimelinePanel6Layout = new javax.swing.GroupLayout(incidentTimelinePanel6);
1006        incidentTimelinePanel6.setLayout(incidentTimelinePanel6Layout);
1007        incidentTimelinePanel6Layout.setHorizontalGroup(
1008            incidentTimelinePanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1009            .addGap(0, 605, Short.MAX_VALUE)
1010        );
1011        incidentTimelinePanel6Layout.setVerticalGroup(
1012            incidentTimelinePanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1013            .addGap(0, 100, Short.MAX_VALUE)
1014        );
1015
1016        incidentTimelinePanel5.setOpaque(false);
1017
1018        javax.swing.GroupLayout incidentTimelinePanel5Layout = new javax.swing.GroupLayout(incidentTimelinePanel5);
1019        incidentTimelinePanel5.setLayout(incidentTimelinePanel5Layout);
1020        incidentTimelinePanel5Layout.setHorizontalGroup(
1021            incidentTimelinePanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1022            .addGap(0, 0, Short.MAX_VALUE)
1023        );
1024        incidentTimelinePanel5Layout.setVerticalGroup(
1025            incidentTimelinePanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1026            .addGap(0, 100, Short.MAX_VALUE)
1027        );
1028
1029        incidentTimelinePanel4.setOpaque(false);
1030
1031        javax.swing.GroupLayout incidentTimelinePanel4Layout = new javax.swing.GroupLayout(incidentTimelinePanel4);
1032        incidentTimelinePanel4.setLayout(incidentTimelinePanel4Layout);
1033        incidentTimelinePanel4Layout.setHorizontalGroup(
1034            incidentTimelinePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1035            .addGap(0, 617, Short.MAX_VALUE)
1036        );
1037        incidentTimelinePanel4Layout.setVerticalGroup(
1038            incidentTimelinePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1039            .addGap(0, 100, Short.MAX_VALUE)
1040        );
1041
1042        incidentTimelinePanel7.setOpaque(false);
1043
1044        javax.swing.GroupLayout incidentTimelinePanel7Layout = new javax.swing.GroupLayout(incidentTimelinePanel7);
1045        incidentTimelinePanel7.setLayout(incidentTimelinePanel7Layout);
1046        incidentTimelinePanel7Layout.setHorizontalGroup(
1047            incidentTimelinePanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1048            .addGap(0, 6884, Short.MAX_VALUE)
1049        );
1050        incidentTimelinePanel7Layout.setVerticalGroup(
1051            incidentTimelinePanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1052            .addGap(0, 100, Short.MAX_VALUE)
1053        );
1054
1055        incidentTimelinePanel10.setOpaque(false);
1056
1057        javax.swing.GroupLayout incidentTimelinePanel10Layout = new javax.swing.GroupLayout(incidentTimelinePanel10);
1058        incidentTimelinePanel10.setLayout(incidentTimelinePanel10Layout);
1059        incidentTimelinePanel10Layout.setHorizontalGroup(
1060            incidentTimelinePanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1061            .addGap(0, 6573, Short.MAX_VALUE)
1062        );
1063        incidentTimelinePanel10Layout.setVerticalGroup(
1064            incidentTimelinePanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1065            .addGap(0, 100, Short.MAX_VALUE)
1066        );
1067
1068        incidentTimelinePanel9.setOpaque(false);
1069
1070        javax.swing.GroupLayout incidentTimelinePanel9Layout = new javax.swing.GroupLayout(incidentTimelinePanel9);
1071        incidentTimelinePanel9.setLayout(incidentTimelinePanel9Layout);
1072        incidentTimelinePanel9Layout.setHorizontalGroup(
1073            incidentTimelinePanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1074            .addGap(0, 6470, Short.MAX_VALUE)
1075        );
1076        incidentTimelinePanel9Layout.setVerticalGroup(
1077            incidentTimelinePanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1078            .addGap(0, 100, Short.MAX_VALUE)
1079        );
1080
1081        incidentNumberPanel1.setOpaque(false);
1082
1083        javax.swing.GroupLayout incidentNumberPanel1Layout = new javax.swing.GroupLayout(incidentNumberPanel1);
1084        incidentNumberPanel1.setLayout(incidentNumberPanel1Layout);
1085        incidentNumberPanel1Layout.setHorizontalGroup(
1086            incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1087            .addGap(0, 106, Short.MAX_VALUE)
1088        );
1089        incidentNumberPanel1Layout.setVerticalGroup(
1090            incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1091            .addGap(0, 100, Short.MAX_VALUE)
1092        );
1093
1094        incidentNumberPanel2.setOpaque(false);
1095
1096        javax.swing.GroupLayout incidentNumberPanel2Layout = new javax.swing.GroupLayout(incidentNumberPanel2);
1097        incidentNumberPanel2.setLayout(incidentNumberPanel2Layout);
1098        incidentNumberPanel2Layout.setHorizontalGroup(
1099            incidentNumberPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1100            .addGap(0, 100, Short.MAX_VALUE)
1101        );
1102        incidentNumberPanel2Layout.setVerticalGroup(
1103            incidentNumberPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1104            .addGap(0, 100, Short.MAX_VALUE)
1105        );
1106
1107        incidentNumberPanel3.setOpaque(false);
1108
1109        javax.swing.GroupLayout incidentNumberPanel3Layout = new javax.swing.GroupLayout(incidentNumberPanel3);
1110        incidentNumberPanel3.setLayout(incidentNumberPanel3Layout);
1111        incidentNumberPanel3Layout.setHorizontalGroup(
1112            incidentNumberPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1113            .addGap(0, 100, Short.MAX_VALUE)
1114        );
1115        incidentNumberPanel3Layout.setVerticalGroup(
1116            incidentNumberPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1117            .addGap(0, 100, Short.MAX_VALUE)
1118        );
1119
1120        incidentNumberPanel4.setOpaque(false);
1121
1122        javax.swing.GroupLayout incidentNumberPanel4Layout = new javax.swing.GroupLayout(incidentNumberPanel4);
1123        incidentNumberPanel4.setLayout(incidentNumberPanel4Layout);
1124        incidentNumberPanel4Layout.setHorizontalGroup(
1125            incidentNumberPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1126            .addGap(0, 100, Short.MAX_VALUE)
1127        );
1128        incidentNumberPanel4Layout.setVerticalGroup(
1129            incidentNumberPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1130            .addGap(0, 100, Short.MAX_VALUE)
1131        );
1132
1133        incidentNumberPanel5.setOpaque(false);
1134
1135        javax.swing.GroupLayout incidentNumberPanel5Layout = new javax.swing.GroupLayout(incidentNumberPanel5);
1136        incidentNumberPanel5.setLayout(incidentNumberPanel5Layout);
1137        incidentNumberPanel5Layout.setHorizontalGroup(
1138            incidentNumberPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1139            .addGap(0, 100, Short.MAX_VALUE)
1140        );
1141        incidentNumberPanel5Layout.setVerticalGroup(
1142            incidentNumberPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1143            .addGap(0, 100, Short.MAX_VALUE)
1144        );
1145
1146        incidentNumberPanel6.setOpaque(false);
1147
1148        javax.swing.GroupLayout incidentNumberPanel6Layout = new javax.swing.GroupLayout(incidentNumberPanel6);
1149        incidentNumberPanel6.setLayout(incidentNumberPanel6Layout);
1150        incidentNumberPanel6Layout.setHorizontalGroup(
1151            incidentNumberPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1152            .addGap(0, 100, Short.MAX_VALUE)
1153        );
1154        incidentNumberPanel6Layout.setVerticalGroup(
1155            incidentNumberPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1156            .addGap(0, 100, Short.MAX_VALUE)
1157        );
1158
1159        incidentNumberPanel7.setOpaque(false);
1160
1161        javax.swing.GroupLayout incidentNumberPanel7Layout = new javax.swing.GroupLayout(incidentNumberPanel7);
1162        incidentNumberPanel7.setLayout(incidentNumberPanel7Layout);
1163        incidentNumberPanel7Layout.setHorizontalGroup(
1164            incidentNumberPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1165            .addGap(0, 100, Short.MAX_VALUE)
1166        );
1167        incidentNumberPanel7Layout.setVerticalGroup(
1168            incidentNumberPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1169            .addGap(0, 100, Short.MAX_VALUE)
1170        );
1171
1172        incidentNumberPanel8.setOpaque(false);
1173
1174        javax.swing.GroupLayout incidentNumberPanel8Layout = new javax.swing.GroupLayout(incidentNumberPanel8);
1175        incidentNumberPanel8.setLayout(incidentNumberPanel8Layout);
1176        incidentNumberPanel8Layout.setHorizontalGroup(
1177            incidentNumberPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1178            .addGap(0, 100, Short.MAX_VALUE)
1179        );
1180        incidentNumberPanel8Layout.setVerticalGroup(
1181            incidentNumberPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1182            .addGap(0, 100, Short.MAX_VALUE)
1183        );
1184
1185        incidentNumberPanel9.setOpaque(false);
1186
1187        javax.swing.GroupLayout incidentNumberPanel9Layout = new javax.swing.GroupLayout(incidentNumberPanel9);
1188        incidentNumberPanel9.setLayout(incidentNumberPanel9Layout);
1189        incidentNumberPanel9Layout.setHorizontalGroup(
1190            incidentNumberPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1191            .addGap(0, 100, Short.MAX_VALUE)
1192        );
1193        incidentNumberPanel9Layout.setVerticalGroup(
1194            incidentNumberPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1195            .addGap(0, 100, Short.MAX_VALUE)
1196        );
1197
1198        incidentNumberPanel10.setOpaque(false);
1199
1200        javax.swing.GroupLayout incidentNumberPanel10Layout = new javax.swing.GroupLayout(incidentNumberPanel10);
1201        incidentNumberPanel10.setLayout(incidentNumberPanel10Layout);
1202        incidentNumberPanel10Layout.setHorizontalGroup(
1203            incidentNumberPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1204            .addGap(0, 100, Short.MAX_VALUE)
1205        );
1206        incidentNumberPanel10Layout.setVerticalGroup(
1207            incidentNumberPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1208            .addGap(0, 100, Short.MAX_VALUE)
1209        );
1210
1211        javax.swing.GroupLayout timelineTickPanelLayout = new javax.swing.GroupLayout(timelineTickPanel);
1212        timelineTickPanel.setLayout(timelineTickPanelLayout);
1213        timelineTickPanelLayout.setHorizontalGroup(
1214            timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1215            .addGroup(timelineTickPanelLayout.createSequentialGroup()
1216                .addContainerGap()
1217                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1218                    .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1219                        .addComponent(incidentNumberPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1220                        .addComponent(incidentNumberPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1221                    .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1222                        .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1223                        .addComponent(incidentNumberPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1224                        .addComponent(incidentNumberPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1225                        .addComponent(incidentNumberPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1226                        .addComponent(incidentNumberPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1227                        .addComponent(incidentNumberPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1228                        .addComponent(incidentNumberPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1229                    .addComponent(incidentNumberPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1230                .addGap(10, 10, 10)
1231                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1232                    .addComponent(incidentTimelinePanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1233                    .addComponent(incidentTimelinePanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1234                    .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
1235                        .addComponent(incidentTimelinePanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1236                        .addComponent(incidentTimelinePanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1237                    .addComponent(incidentTimelinePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1238                    .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 6778, javax.swing.GroupLayout.PREFERRED_SIZE)
1239                    .addComponent(incidentTimelinePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1240                    .addComponent(incidentTimelinePanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1241                    .addComponent(incidentTimelinePanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1242                    .addComponent(incidentTimelinePanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1243                .addGap(190, 190, 190))
1244        );
1245        timelineTickPanelLayout.setVerticalGroup(
1246            timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1247            .addGroup(timelineTickPanelLayout.createSequentialGroup()
1248                .addContainerGap()
1249                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1250                    .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1251                    .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1252                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1253                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1254                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1255                        .addComponent(incidentNumberPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1256                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1257                        .addComponent(incidentNumberPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1258                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1259                        .addComponent(incidentNumberPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1260                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1261                        .addComponent(incidentNumberPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1262                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1263                        .addComponent(incidentNumberPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1264                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1265                        .addComponent(incidentTimelinePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1266                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1267                        .addComponent(incidentTimelinePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1268                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1269                        .addComponent(incidentTimelinePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1270                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1271                        .addComponent(incidentTimelinePanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1272                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1273                        .addComponent(incidentTimelinePanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
1274                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1275                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1276                    .addComponent(incidentTimelinePanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1277                    .addComponent(incidentNumberPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1278                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1279                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1280                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1281                        .addComponent(incidentTimelinePanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1282                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1283                        .addComponent(incidentTimelinePanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1284                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1285                        .addComponent(incidentNumberPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1286                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1287                        .addComponent(incidentNumberPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
1288                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1289                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1290                    .addComponent(incidentNumberPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1291                    .addComponent(incidentTimelinePanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1292                .addContainerGap(252, Short.MAX_VALUE))
1293        );
1294
1295        timelinesScrollPane.setViewportView(timelineTickPanel);
1296
1297        scriptEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Script Events"));
1298
1299        scriptEventsPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
1300
1301        scriptEventsList.setModel(new DefaultListModel());
1302        scriptEventsList.setComponentPopupMenu(eventListPopupMenu);
1303        scriptEventsPane.setViewportView(scriptEventsList);
1304
1305        javax.swing.GroupLayout scriptEventsPanelLayout = new javax.swing.GroupLayout(scriptEventsPanel);
1306        scriptEventsPanel.setLayout(scriptEventsPanelLayout);
1307        scriptEventsPanelLayout.setHorizontalGroup(
1308            scriptEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1309            .addGroup(scriptEventsPanelLayout.createSequentialGroup()
1310                .addContainerGap()
1311                .addComponent(scriptEventsPane, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE)
1312                .addContainerGap())
1313        );
1314        scriptEventsPanelLayout.setVerticalGroup(
1315            scriptEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1316            .addGroup(scriptEventsPanelLayout.createSequentialGroup()
1317                .addComponent(scriptEventsPane, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
1318                .addContainerGap())
1319        );
1320
1321        zoomSlider.setMaximum(21);
1322        zoomSlider.setMinimum(5);
1323        zoomSlider.setOrientation(javax.swing.JSlider.VERTICAL);
1324        zoomSlider.setValue(13);
1325        zoomSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
1326        zoomSlider.setFocusable(false);
1327        zoomSlider.addChangeListener(new javax.swing.event.ChangeListener()
1328        {
1329            public void stateChanged(javax.swing.event.ChangeEvent evt)
1330            {
1331                zoomSliderStateChanged(evt);
1332            }
1333        });
1334
1335        scriptEventsPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Information"));
1336
1337        jLabel2.setText("Incident Number:");
1338
1339        jLabel3.setText("Incident Name:");
1340
1341        jLabel4.setText("Incident Description:");
1342
1343        incidentName.setEditable(false);
1344        incidentName.setText("Media");
1345
1346        incidentDescriptionPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
1347
1348        incidentDescription.setColumns(20);
1349        incidentDescription.setEditable(false);
1350        incidentDescription.setLineWrap(true);
1351        incidentDescription.setRows(5);
1352        incidentDescription.setText("All media message events are found in this incident.");
1353        incidentDescription.setWrapStyleWord(true);
1354        incidentDescriptionPane.setViewportView(incidentDescription);
1355
1356        incidentNumber.setEditable(false);
1357        incidentNumber.setText("100");
1358
1359        javax.swing.GroupLayout scriptEventsPanel1Layout = new javax.swing.GroupLayout(scriptEventsPanel1);
1360        scriptEventsPanel1.setLayout(scriptEventsPanel1Layout);
1361        scriptEventsPanel1Layout.setHorizontalGroup(
1362            scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1363            .addGroup(scriptEventsPanel1Layout.createSequentialGroup()
1364                .addContainerGap()
1365                .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1366                    .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 453, Short.MAX_VALUE)
1367                    .addComponent(jLabel4)
1368                    .addGroup(scriptEventsPanel1Layout.createSequentialGroup()
1369                        .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1370                            .addComponent(jLabel2)
1371                            .addComponent(jLabel3))
1372                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1373                        .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1374                            .addComponent(incidentName, javax.swing.GroupLayout.DEFAULT_SIZE, 366, Short.MAX_VALUE)
1375                            .addComponent(incidentNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 366, Short.MAX_VALUE))))
1376                .addContainerGap())
1377        );
1378        scriptEventsPanel1Layout.setVerticalGroup(
1379            scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1380            .addGroup(scriptEventsPanel1Layout.createSequentialGroup()
1381                .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1382                    .addComponent(jLabel2)
1383                    .addComponent(incidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1384                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1385                .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1386                    .addComponent(incidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1387                    .addComponent(jLabel3))
1388                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1389                .addComponent(jLabel4)
1390                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1391                .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
1392                .addContainerGap())
1393        );
1394
1395        selectButton.setToolTipText("Select");
1396        selectButton.setFocusPainted(false);
1397        selectButton.setIconTextGap(0);
1398        selectButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1399        selectButton.setPreferredSize(new java.awt.Dimension(30, 25));
1400        selectButton.addActionListener(new java.awt.event.ActionListener()
1401        {
1402            public void actionPerformed(java.awt.event.ActionEvent evt)
1403            {
1404                selectButtonActionPerformed(evt);
1405            }
1406        });
1407
1408        incidentEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Events"));
1409
1410        maintenanceRadioButton.setText("Maintenance Radio");
1411        maintenanceRadioButton.setToolTipText("");
1412        maintenanceRadioButton.setFocusPainted(false);
1413        maintenanceRadioButton.setIconTextGap(0);
1414        maintenanceRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1415        maintenanceRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1416        maintenanceRadioButton.addActionListener(new java.awt.event.ActionListener()
1417        {
1418            public void actionPerformed(java.awt.event.ActionEvent evt)
1419            {
1420                maintenanceRadioButtonActionPerformed(evt);
1421            }
1422        });
1423
1424        tmtRadioButton.setText("TMT Radio");
1425        tmtRadioButton.setToolTipText("");
1426        tmtRadioButton.setFocusPainted(false);
1427        tmtRadioButton.setIconTextGap(0);
1428        tmtRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1429        tmtRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1430        tmtRadioButton.addActionListener(new java.awt.event.ActionListener()
1431        {
1432            public void actionPerformed(java.awt.event.ActionEvent evt)
1433            {
1434                tmtRadioButtonActionPerformed(evt);
1435            }
1436        });
1437
1438        telephoneButton.setText("Telephone");
1439        telephoneButton.setToolTipText("");
1440        telephoneButton.setFocusPainted(false);
1441        telephoneButton.setIconTextGap(0);
1442        telephoneButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1443        telephoneButton.setPreferredSize(new java.awt.Dimension(30, 25));
1444        telephoneButton.addActionListener(new java.awt.event.ActionListener()
1445        {
1446            public void actionPerformed(java.awt.event.ActionEvent evt)
1447            {
1448                telephoneButtonActionPerformed(evt);
1449            }
1450        });
1451
1452        unitButton.setText("Unit");
1453        unitButton.setToolTipText("");
1454        unitButton.setFocusPainted(false);
1455        unitButton.setIconTextGap(0);
1456        unitButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1457        unitButton.setPreferredSize(new java.awt.Dimension(30, 25));
1458        unitButton.addActionListener(new java.awt.event.ActionListener()
1459        {
1460            public void actionPerformed(java.awt.event.ActionEvent evt)
1461            {
1462                unitButtonActionPerformed(evt);
1463            }
1464        });
1465
1466        witnessButton.setText("Witness");
1467        witnessButton.setToolTipText("");
1468        witnessButton.setFocusPainted(false);
1469        witnessButton.setIconTextGap(0);
1470        witnessButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1471        witnessButton.setPreferredSize(new java.awt.Dimension(30, 25));
1472        witnessButton.addActionListener(new java.awt.event.ActionListener()
1473        {
1474            public void actionPerformed(java.awt.event.ActionEvent evt)
1475            {
1476                witnessButtonActionPerformed(evt);
1477            }
1478        });
1479
1480        paramicsButton.setText("Paramics");
1481        paramicsButton.setToolTipText("");
1482        paramicsButton.setFocusPainted(false);
1483        paramicsButton.setIconTextGap(0);
1484        paramicsButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1485        paramicsButton.setPreferredSize(new java.awt.Dimension(30, 25));
1486        paramicsButton.addActionListener(new java.awt.event.ActionListener()
1487        {
1488            public void actionPerformed(java.awt.event.ActionEvent evt)
1489            {
1490                paramicsButtonActionPerformed(evt);
1491            }
1492        });
1493
1494        towButton.setText("Tow");
1495        towButton.setToolTipText("");
1496        towButton.setFocusPainted(false);
1497        towButton.setIconTextGap(0);
1498        towButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1499        towButton.setPreferredSize(new java.awt.Dimension(30, 25));
1500        towButton.addActionListener(new java.awt.event.ActionListener()
1501        {
1502            public void actionPerformed(java.awt.event.ActionEvent evt)
1503            {
1504                towButtonActionPerformed(evt);
1505            }
1506        });
1507
1508        audioButton.setText("Audio");
1509        audioButton.setToolTipText("");
1510        audioButton.setFocusPainted(false);
1511        audioButton.setIconTextGap(0);
1512        audioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1513        audioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1514        audioButton.addActionListener(new java.awt.event.ActionListener()
1515        {
1516            public void actionPerformed(java.awt.event.ActionEvent evt)
1517            {
1518                audioButtonActionPerformed(evt);
1519            }
1520        });
1521
1522        cctvButton.setText("CCTV");
1523        cctvButton.setToolTipText("");
1524        cctvButton.setFocusPainted(false);
1525        cctvButton.setIconTextGap(0);
1526        cctvButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1527        cctvButton.setPreferredSize(new java.awt.Dimension(30, 25));
1528        cctvButton.addActionListener(new java.awt.event.ActionListener()
1529        {
1530            public void actionPerformed(java.awt.event.ActionEvent evt)
1531            {
1532                cctvButtonActionPerformed(evt);
1533            }
1534        });
1535
1536        cadButton.setText("CAD");
1537        cadButton.setToolTipText("");
1538        cadButton.setFocusPainted(false);
1539        cadButton.setIconTextGap(0);
1540        cadButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1541        cadButton.setPreferredSize(new java.awt.Dimension(30, 25));
1542        cadButton.addActionListener(new java.awt.event.ActionListener()
1543        {
1544            public void actionPerformed(java.awt.event.ActionEvent evt)
1545            {
1546                cadButtonActionPerformed(evt);
1547            }
1548        });
1549
1550        chpRadioButton.setText("CHP Radio");
1551        chpRadioButton.setToolTipText("");
1552        chpRadioButton.setFocusPainted(false);
1553        chpRadioButton.setIconTextGap(0);
1554        chpRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1555        chpRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1556        chpRadioButton.addActionListener(new java.awt.event.ActionListener()
1557        {
1558            public void actionPerformed(java.awt.event.ActionEvent evt)
1559            {
1560                chpRadioButtonActionPerformed(evt);
1561            }
1562        });
1563
1564        javax.swing.GroupLayout incidentEventsPanelLayout = new javax.swing.GroupLayout(incidentEventsPanel);
1565        incidentEventsPanel.setLayout(incidentEventsPanelLayout);
1566        incidentEventsPanelLayout.setHorizontalGroup(
1567            incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1568            .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1569                .addContainerGap()
1570                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1571                    .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1572                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentEventsPanelLayout.createSequentialGroup()
1573                            .addComponent(maintenanceRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1574                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1575                            .addComponent(tmtRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1576                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1577                            .addComponent(telephoneButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1578                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1579                            .addComponent(paramicsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
1580                        .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1581                            .addComponent(towButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1582                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1583                            .addComponent(unitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1584                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1585                            .addComponent(witnessButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1586                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1587                            .addComponent(audioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
1588                    .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1589                        .addComponent(cadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1590                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1591                        .addComponent(cctvButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1592                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1593                        .addComponent(chpRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
1594                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1595        );
1596        incidentEventsPanelLayout.setVerticalGroup(
1597            incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1598            .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1599                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1600                    .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1601                        .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1602                            .addComponent(maintenanceRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1603                            .addComponent(tmtRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1604                            .addComponent(telephoneButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1605                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1606                        .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1607                            .addComponent(towButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1608                            .addComponent(unitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1609                            .addComponent(witnessButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1610                            .addComponent(audioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1611                    .addComponent(paramicsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1612                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1613                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1614                    .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1615                        .addComponent(cctvButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1616                        .addComponent(chpRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1617                    .addComponent(cadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1618        );
1619
1620        evaluationEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Evaluation Events"));
1621
1622        atmsEvalButton.setText("ATMS Evaluation");
1623        atmsEvalButton.setToolTipText("");
1624        atmsEvalButton.setFocusPainted(false);
1625        atmsEvalButton.setIconTextGap(0);
1626        atmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1627        atmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1628        atmsEvalButton.addActionListener(new java.awt.event.ActionListener()
1629        {
1630            public void actionPerformed(java.awt.event.ActionEvent evt)
1631            {
1632                atmsEvalButtonActionPerformed(evt);
1633            }
1634        });
1635
1636        cmsEvalButton.setText("CMS Evaluation");
1637        cmsEvalButton.setToolTipText("");
1638        cmsEvalButton.setFocusPainted(false);
1639        cmsEvalButton.setIconTextGap(0);
1640        cmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1641        cmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1642        cmsEvalButton.addActionListener(new java.awt.event.ActionListener()
1643        {
1644            public void actionPerformed(java.awt.event.ActionEvent evt)
1645            {
1646                cmsEvalButtonActionPerformed(evt);
1647            }
1648        });
1649
1650        cadEvalButton.setText("CAD Evaluation");
1651        cadEvalButton.setToolTipText("");
1652        cadEvalButton.setFocusPainted(false);
1653        cadEvalButton.setIconTextGap(0);
1654        cadEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1655        cadEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1656        cadEvalButton.addActionListener(new java.awt.event.ActionListener()
1657        {
1658            public void actionPerformed(java.awt.event.ActionEvent evt)
1659            {
1660                cadEvalButtonActionPerformed(evt);
1661            }
1662        });
1663
1664        facilitatorEvalButton.setText("Facilitator Evaluation");
1665        facilitatorEvalButton.setToolTipText("");
1666        facilitatorEvalButton.setFocusPainted(false);
1667        facilitatorEvalButton.setIconTextGap(0);
1668        facilitatorEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1669        facilitatorEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1670        facilitatorEvalButton.addActionListener(new java.awt.event.ActionListener()
1671        {
1672            public void actionPerformed(java.awt.event.ActionEvent evt)
1673            {
1674                facilitatorEvalButtonActionPerformed(evt);
1675            }
1676        });
1677
1678        activityLogEvalButton.setText("Activity Log Evaluation");
1679        activityLogEvalButton.setToolTipText("");
1680        activityLogEvalButton.setFocusPainted(false);
1681        activityLogEvalButton.setIconTextGap(0);
1682        activityLogEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1683        activityLogEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1684        activityLogEvalButton.addActionListener(new java.awt.event.ActionListener()
1685        {
1686            public void actionPerformed(java.awt.event.ActionEvent evt)
1687            {
1688                activityLogEvalButtonActionPerformed(evt);
1689            }
1690        });
1691
1692        radioEvalButton.setText("Radio Evaluation");
1693        radioEvalButton.setToolTipText("");
1694        radioEvalButton.setFocusPainted(false);
1695        radioEvalButton.setIconTextGap(0);
1696        radioEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1697        radioEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1698        radioEvalButton.addActionListener(new java.awt.event.ActionListener()
1699        {
1700            public void actionPerformed(java.awt.event.ActionEvent evt)
1701            {
1702                radioEvalButtonActionPerformed(evt);
1703            }
1704        });
1705
1706        javax.swing.GroupLayout evaluationEventsPanelLayout = new javax.swing.GroupLayout(evaluationEventsPanel);
1707        evaluationEventsPanel.setLayout(evaluationEventsPanelLayout);
1708        evaluationEventsPanelLayout.setHorizontalGroup(
1709            evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1710            .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1711                .addContainerGap()
1712                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1713                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1714                        .addComponent(atmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1715                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1716                        .addComponent(activityLogEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
1717                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1718                        .addComponent(cmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1719                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1720                        .addComponent(facilitatorEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
1721                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1722                        .addComponent(cadEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1723                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1724                        .addComponent(radioEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
1725                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1726        );
1727        evaluationEventsPanelLayout.setVerticalGroup(
1728            evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1729            .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1730                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1731                    .addComponent(cmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1732                    .addComponent(facilitatorEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1733                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1734                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1735                    .addComponent(atmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1736                    .addComponent(activityLogEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1737                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1738                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1739                    .addComponent(cadEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1740                    .addComponent(radioEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1741        );
1742
1743        zoomInIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomIn.png"))); // NOI18N
1744        zoomInIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1745        zoomInIcon.addMouseListener(new java.awt.event.MouseAdapter()
1746        {
1747            public void mouseClicked(java.awt.event.MouseEvent evt)
1748            {
1749                zoomInIconMouseClicked(evt);
1750            }
1751        });
1752
1753        zoomOutIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomOut.png"))); // NOI18N
1754        zoomOutIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1755        zoomOutIcon.addMouseListener(new java.awt.event.MouseAdapter()
1756        {
1757            public void mouseClicked(java.awt.event.MouseEvent evt)
1758            {
1759                zoomOutIconMouseClicked(evt);
1760            }
1761        });
1762
1763        timeStampScrollPane.setBorder(null);
1764        timeStampScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
1765        timeStampScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1766
1767        javax.swing.GroupLayout timeStampPanelLayout = new javax.swing.GroupLayout(timeStampPanel);
1768        timeStampPanel.setLayout(timeStampPanelLayout);
1769        timeStampPanelLayout.setHorizontalGroup(
1770            timeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1771            .addGap(0, 1008, Short.MAX_VALUE)
1772        );
1773        timeStampPanelLayout.setVerticalGroup(
1774            timeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1775            .addGap(0, 100, Short.MAX_VALUE)
1776        );
1777
1778        timeStampScrollPane.setViewportView(timeStampPanel);
1779
1780        fileMenu.setText("File");
1781        fileMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1782        fileMenu.addActionListener(new java.awt.event.ActionListener()
1783        {
1784            public void actionPerformed(java.awt.event.ActionEvent evt)
1785            {
1786                fileMenuActionPerformed(evt);
1787            }
1788        });
1789
1790        fileNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1791        fileNew.setText("New");
1792        fileMenu.add(fileNew);
1793        fileMenu.add(jSeparator1);
1794
1795        fileOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1796        fileOpen.setText("Open...");
1797        fileOpen.addActionListener(new java.awt.event.ActionListener()
1798        {
1799            public void actionPerformed(java.awt.event.ActionEvent evt)
1800            {
1801                fileOpenActionPerformed(evt);
1802            }
1803        });
1804        fileMenu.add(fileOpen);
1805        fileMenu.add(jSeparator2);
1806
1807        fileSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
1808        fileSave.setText("Save");
1809        fileSave.addActionListener(new java.awt.event.ActionListener()
1810        {
1811            public void actionPerformed(java.awt.event.ActionEvent evt)
1812            {
1813                fileSaveActionPerformed(evt);
1814            }
1815        });
1816        fileMenu.add(fileSave);
1817
1818        fileSaveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1819        fileSaveAs.setText("Save as...");
1820        fileSaveAs.addActionListener(new java.awt.event.ActionListener()
1821        {
1822            public void actionPerformed(java.awt.event.ActionEvent evt)
1823            {
1824                fileSaveAsActionPerformed(evt);
1825            }
1826        });
1827        fileMenu.add(fileSaveAs);
1828
1829        scriptBuilderMenuBar.add(fileMenu);
1830
1831        generateMenu.setLabel("Generate");
1832        generateMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1833
1834        generateNotebooks.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1835        generateNotebooks.setText("Generate Notebooks...");
1836        generateNotebooks.addActionListener(new java.awt.event.ActionListener()
1837        {
1838            public void actionPerformed(java.awt.event.ActionEvent evt)
1839            {
1840                generateNotebooksActionPerformed(evt);
1841            }
1842        });
1843        generateMenu.add(generateNotebooks);
1844
1845        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1846        jMenuItem3.setText("Generate Web Notebook...");
1847        generateMenu.add(jMenuItem3);
1848
1849        generateScorecards.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1850        generateScorecards.setText("Generate Scorecards...");
1851        generateScorecards.addActionListener(new java.awt.event.ActionListener()
1852        {
1853            public void actionPerformed(java.awt.event.ActionEvent evt)
1854            {
1855                generateScorecardsActionPerformed(evt);
1856            }
1857        });
1858        generateMenu.add(generateScorecards);
1859
1860        generateOrganizationChart.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1861        generateOrganizationChart.setText("Generate D14 TMC Org Chart...");
1862        generateOrganizationChart.addActionListener(new java.awt.event.ActionListener()
1863        {
1864            public void actionPerformed(java.awt.event.ActionEvent evt)
1865            {
1866                generateOrganizationChartActionPerformed(evt);
1867            }
1868        });
1869        generateMenu.add(generateOrganizationChart);
1870        generateMenu.add(jSeparator3);
1871
1872        generateProjectRequirements.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1873        generateProjectRequirements.setText("Generate Project Worklist...");
1874        generateProjectRequirements.addActionListener(new java.awt.event.ActionListener()
1875        {
1876            public void actionPerformed(java.awt.event.ActionEvent evt)
1877            {
1878                generateProjectRequirementsActionPerformed(evt);
1879            }
1880        });
1881        generateMenu.add(generateProjectRequirements);
1882
1883        scriptBuilderMenuBar.add(generateMenu);
1884
1885        incidentMenu.setText("Incidents");
1886        incidentMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1887
1888        newIncident.setText("New Incident...");
1889        newIncident.addActionListener(new java.awt.event.ActionListener()
1890        {
1891            public void actionPerformed(java.awt.event.ActionEvent evt)
1892            {
1893                newIncidentActionPerformed(evt);
1894            }
1895        });
1896        incidentMenu.add(newIncident);
1897
1898        editIncident.setText("Edit Incident...");
1899        editIncident.addActionListener(new java.awt.event.ActionListener()
1900        {
1901            public void actionPerformed(java.awt.event.ActionEvent evt)
1902            {
1903                editIncidentActionPerformed(evt);
1904            }
1905        });
1906        incidentMenu.add(editIncident);
1907        incidentMenu.add(jSeparator4);
1908
1909        saveIncident.setText("Save Incident...");
1910        saveIncident.addActionListener(new java.awt.event.ActionListener()
1911        {
1912            public void actionPerformed(java.awt.event.ActionEvent evt)
1913            {
1914                saveIncidentActionPerformed(evt);
1915            }
1916        });
1917        incidentMenu.add(saveIncident);
1918
1919        loadIncident.setText("Load Incident...");
1920        loadIncident.addActionListener(new java.awt.event.ActionListener()
1921        {
1922            public void actionPerformed(java.awt.event.ActionEvent evt)
1923            {
1924                loadIncidentActionPerformed(evt);
1925            }
1926        });
1927        incidentMenu.add(loadIncident);
1928
1929        scriptBuilderMenuBar.add(incidentMenu);
1930
1931        generateNoiseMenu.setText("Noise");
1932
1933        generateNoiseOption.setText("Generate Noise...");
1934        generateNoiseOption.addActionListener(new java.awt.event.ActionListener()
1935        {
1936            public void actionPerformed(java.awt.event.ActionEvent evt)
1937            {
1938                generateNoiseOptionActionPerformed(evt);
1939            }
1940        });
1941        generateNoiseMenu.add(generateNoiseOption);
1942
1943        scriptBuilderMenuBar.add(generateNoiseMenu);
1944
1945        helpMenu.setText("Help");
1946        helpMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1947
1948        helpTutorial.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
1949        helpTutorial.setText("Tutorial...");
1950        helpMenu.add(helpTutorial);
1951
1952        helpAbout.setText("About...");
1953        helpMenu.add(helpAbout);
1954
1955        scriptBuilderMenuBar.add(helpMenu);
1956
1957        jMenu2.setText("XML");
1958
1959        XMLImportBtn.setText("Import from XML");
1960        XMLImportBtn.addActionListener(new java.awt.event.ActionListener()
1961        {
1962            public void actionPerformed(java.awt.event.ActionEvent evt)
1963            {
1964                XMLImportBtnActionPerformed(evt);
1965            }
1966        });
1967        jMenu2.add(XMLImportBtn);
1968
1969        XMLExportBtn.setText("Export to XML");
1970        XMLExportBtn.addActionListener(new java.awt.event.ActionListener()
1971        {
1972            public void actionPerformed(java.awt.event.ActionEvent evt)
1973            {
1974                XMLExportBtnActionPerformed(evt);
1975            }
1976        });
1977        jMenu2.add(XMLExportBtn);
1978
1979        scriptBuilderMenuBar.add(jMenu2);
1980
1981        setJMenuBar(scriptBuilderMenuBar);
1982
1983        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
1984        getContentPane().setLayout(layout);
1985        layout.setHorizontalGroup(
1986            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1987            .addGroup(layout.createSequentialGroup()
1988                .addContainerGap()
1989                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1990                    .addComponent(timelinesScrollPane, 0, 0, Short.MAX_VALUE)
1991                    .addComponent(timeStampScrollPane)
1992                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1993                        .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1994                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1995                        .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1996                    .addGroup(layout.createSequentialGroup()
1997                        .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
1998                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1999                        .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
2000                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2001                        .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
2002                        .addGap(18, 18, 18)
2003                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
2004                            .addComponent(zoomInIcon)
2005                            .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
2006                            .addComponent(zoomOutIcon))))
2007                .addContainerGap())
2008        );
2009        layout.setVerticalGroup(
2010            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
2011            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
2012                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
2013                    .addGroup(layout.createSequentialGroup()
2014                        .addContainerGap()
2015                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
2016                            .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
2017                            .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
2018                            .addGroup(layout.createSequentialGroup()
2019                                .addGap(47, 47, 47)
2020                                .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))))
2021                    .addGroup(layout.createSequentialGroup()
2022                        .addGap(20, 20, 20)
2023                        .addComponent(zoomInIcon)
2024                        .addGap(1, 1, 1)
2025                        .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
2026                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2027                        .addComponent(zoomOutIcon)))
2028                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2029                .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
2030                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2031                .addComponent(timelinesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)
2032                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
2033                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
2034                    .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
2035                    .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
2036                .addContainerGap())
2037        );
2038
2039        pack();
2040    }// </editor-fold>//GEN-END:initComponents
2041
2042    /**
2043     * Scale the timeline width based on zoom slider position.
2044     *
2045     * @param evt the state change event
2046     */
2047    private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged
2048        ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue() * 2;
2049        this.update(script, script);
2050        pack();
2051        repaint();
2052    }//GEN-LAST:event_zoomSliderStateChanged
2053
2054    private void cadEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMousePressed
2055
2056    }//GEN-LAST:event_cadEventMousePressed
2057
2058    private void radioEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radioEventMousePressed
2059
2060    }//GEN-LAST:event_radioEventMousePressed
2061
2062    private void cadEventMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMouseReleased
2063
2064    }//GEN-LAST:event_cadEventMouseReleased
2065
2066    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
2067
2068    }//GEN-LAST:event_okButtonActionPerformed
2069
2070    /**
2071     * If cancel button is pressed, close radio event editor
2072     *
2073     * @param evt the button press event
2074     */
2075    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
2076        radioMessage.setText("");
2077        radioTypeComboBox.setSelectedIndex(0);
2078        radioEventFrame.setVisible(false);
2079    }//GEN-LAST:event_cancelButtonActionPerformed
2080
2081    private void editEventListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editEventListActionPerformed
2082
2083    }//GEN-LAST:event_editEventListActionPerformed
2084
2085    /**
2086     * Executed when the "OK" button is pressed on the Incident editor. If
2087     * incident is new, and is valid, adds it to the model and updates. If
2088     * editing existing incident, verifies changes are valid and applies them.
2089     * Then closes editor window.
2090     *
2091     * @param evt the button press event
2092     */
2093    private void incidentOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentOkButtonActionPerformed
2094        if (!editingIncident)
2095        {
2096            boolean found = false;
2097            int indx = 0;
2098            for (ScriptIncident i : script.incidents)
2099            {
2100                if (i == null)
2101                {
2102                    found = true;
2103                    break;
2104                }
2105                ++indx;
2106                if (i.number == (Integer) addIncidentNumber.getValue())
2107                {
2108                    JOptionPane.showMessageDialog(this, "Incident number already in use.",
2109                            "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
2110                    incidentFrame.setVisible(true);
2111                    return;
2112                }
2113            }
2114            if (!found)
2115            {
2116                JOptionPane.showMessageDialog(this, "Script already has the max number of incidents.",
2117                        "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
2118                incidentFrame.setVisible(true);
2119                return;
2120            }
2121
2122            script.incidents.remove(indx);
2123            SimulationScript.incidentColors[indx] = selectedColor;
2124            script.incidents.add(indx,
2125                    new ScriptIncident(SimulationScript.incidentColors[indx],
2126                            (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),
2127                            script));
2128            script.incidents.get(indx).length = (Integer) addIncidentLength.getValue() * 60;
2129            script.incidents.get(indx).setOffset((Integer) addIncidentStart.getValue() * 60);
2130        }
2131        else
2132        {
2133            ScriptIncident backup = script.incidents.get(oldIncidentIndex);
2134            script.incidents.remove(oldIncidentIndex);
2135            script.incidents.add(oldIncidentIndex, null);
2136
2137            for (ScriptIncident i : script.incidents)
2138            {
2139                if (i != null && i.number == (Integer) addIncidentNumber.getValue())
2140                {
2141                    script.incidents.remove(oldIncidentIndex);
2142                    script.incidents.add(oldIncidentIndex, backup);
2143                    JOptionPane.showMessageDialog(this, "Incident number already in use.",
2144                            "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
2145                    incidentFrame.setVisible(true);
2146                    return;
2147                }
2148            }
2149
2150            script.incidents.remove(oldIncidentIndex);
2151            SimulationScript.incidentColors[oldIncidentIndex] = selectedColor;
2152            script.incidents.add(oldIncidentIndex,
2153                    new ScriptIncident(SimulationScript.incidentColors[oldIncidentIndex],
2154                            (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),
2155                            script));
2156            script.incidents.get(oldIncidentIndex).length = (Integer) addIncidentLength.getValue() * 60;
2157            script.incidents.get(oldIncidentIndex).slices = backup.slices;
2158            script.incidents.get(oldIncidentIndex).offset = backup.offset;
2159            script.incidents.get(oldIncidentIndex).setOffset((Integer) addIncidentStart.getValue() * 60);
2160        }
2161
2162        incidentFrame.setVisible(false);
2163        repaint();
2164    }//GEN-LAST:event_incidentOkButtonActionPerformed
2165
2166    /**
2167     * Closes editor window upon click of cancel button.
2168     *
2169     * @param evt the button press event
2170     */
2171    private void incidentCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentCancelButtonActionPerformed
2172        incidentFrame.setVisible(false);
2173    }//GEN-LAST:event_incidentCancelButtonActionPerformed
2174
2175    /**
2176     * Opens incident editor window and preps for addition of new incident, upon
2177     * click of "New Incident" menu option.
2178     *
2179     * @param evt the button press event
2180     */
2181    private void newIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newIncidentActionPerformed
2182        editingIncident = false;
2183
2184        addIncidentName.setText("");
2185        addIncidentNumber.setValue(101);
2186        addIncidentStart.setValue(0);
2187        addIncidentLength.setValue(0);
2188        incidentColorField.setBackground(Color.BLACK);
2189        selectedColor = Color.BLACK;
2190        addIncidentDescription.setText("");
2191
2192        incidentFrame.setVisible(true);
2193    }//GEN-LAST:event_newIncidentActionPerformed
2194
2195    /**
2196     * Deselects new event type upon click of blank "select" button.
2197     *
2198     * @param evt the button press event
2199     */
2200    private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
2201        currentEventType = null;
2202        for (JButton eb : eventButtons)
2203        {
2204            eb.setSelected(false);
2205        }
2206        selectButton.setSelected(true);
2207    }//GEN-LAST:event_selectButtonActionPerformed
2208
2209    /**
2210     * Selects CAD_EVENT as the current type of new event, upon click of "CAD
2211     * Event" button.
2212     *
2213     * @param evt the button press event
2214     */
2215    private void cadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadButtonActionPerformed
2216        currentEventType = ScriptEventType.CAD_EVENT;
2217        for (JButton eb : eventButtons)
2218        {
2219            eb.setSelected(false);
2220        }
2221        cadButton.setSelected(true);
2222    }//GEN-LAST:event_cadButtonActionPerformed
2223    /**
2224     * Selects CCTV_EVENT as the current type of new event, upon click of "CCTV
2225     * Event" button.
2226     *
2227     * @param evt the button press event
2228     */
2229    private void cctvButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cctvButtonActionPerformed
2230        currentEventType = ScriptEventType.CCTV_EVENT;
2231        for (JButton eb : eventButtons)
2232        {
2233            eb.setSelected(false);
2234        }
2235        cctvButton.setSelected(true);
2236    }//GEN-LAST:event_cctvButtonActionPerformed
2237    /**
2238     * Selects CHP_RADIO_EVENT as the current type of new event, upon click of
2239     * "CHP Radio Event" button.
2240     *
2241     * @param evt the button press event
2242     */
2243    private void chpRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chpRadioButtonActionPerformed
2244        currentEventType = ScriptEventType.CHP_RADIO_EVENT;
2245        for (JButton eb : eventButtons)
2246        {
2247            eb.setSelected(false);
2248        }
2249        chpRadioButton.setSelected(true);
2250    }//GEN-LAST:event_chpRadioButtonActionPerformed
2251
2252    private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileMenuActionPerformed
2253
2254    }//GEN-LAST:event_fileMenuActionPerformed
2255
2256    /**
2257     * Upon click of "Open file" menu option, opens a window to load a new .sim
2258     * file.
2259     *
2260     * @param evt the button press event
2261     */
2262    private void fileOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileOpenActionPerformed
2263        JFileChooser fc = new JFileChooser();
2264        fc.setFileFilter(new ExtensionFileFilter("Simulation Script (.sim)", new String[]
2265        {
2266            "sim"
2267        }));
2268        fc.showOpenDialog(this);
2269    }//GEN-LAST:event_fileOpenActionPerformed
2270
2271    /**
2272     * Upon click of "Save as" menu option, opens a window to choose a .sim file
2273     * to save this as.
2274     *
2275     * @param evt the button press event
2276     */
2277    private void fileSaveAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveAsActionPerformed
2278        JFileChooser fc = new JFileChooser();
2279        fc.setFileFilter(new ExtensionFileFilter("Simulation Script (.sim)", new String[]
2280        {
2281            "sim"
2282        }));
2283        fc.showSaveDialog(this);
2284    }//GEN-LAST:event_fileSaveAsActionPerformed
2285
2286    /**
2287     * Upon click of "Save" menu option, opens a window to choose a .sim file to
2288     * save this as.
2289     *
2290     * @param evt the button press event
2291     */
2292    private void fileSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveActionPerformed
2293        JFileChooser fc = new JFileChooser();
2294        fc.setFileFilter(new ExtensionFileFilter("Simulation Script (.sim)", new String[]
2295        {
2296            "sim"
2297        }));
2298        fc.showSaveDialog(this);
2299    }//GEN-LAST:event_fileSaveActionPerformed
2300
2301    /**
2302     * Upon click of "Edit incident" menu option, brings up a dropdown menu of
2303     * all existing incidents. Once an incident is selected, opens incident
2304     * editor window with that event's details loaded.
2305     *
2306     * @param evt the button press event
2307     */
2308    private void editIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editIncidentActionPerformed
2309        Object[] incidentList = script.incidents.toArray();
2310        ScriptIncident i = (ScriptIncident) JOptionPane.showInputDialog(
2311                this,
2312                "Select Incident:",
2313                "Edit Incident",
2314                JOptionPane.PLAIN_MESSAGE,
2315                null,
2316                incidentList,
2317                script.incidents.get(0));
2318
2319        // If a valid incident was selected
2320        if (i != null)
2321        {
2322            editingIncident = true;
2323            oldIncidentIndex = script.incidents.indexOf(i);
2324
2325            addIncidentName.setText(i.name);
2326            addIncidentNumber.setValue(i.number);
2327            addIncidentStart.setValue(i.offset / 60);
2328            addIncidentLength.setValue(i.length / 60);
2329            incidentColorField.setBackground(i.color);
2330            selectedColor = i.color;
2331            addIncidentDescription.setText(i.description);
2332
2333            incidentFrame.setVisible(true);
2334        }
2335    }//GEN-LAST:event_editIncidentActionPerformed
2336
2337    /**
2338     * Brings up the noise generation screen upon click of the "Generate Noise"
2339     * menu option.
2340     *
2341     * @param evt the button press event
2342     */
2343    private void generateNoiseOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNoiseOptionActionPerformed
2344        addNoiseFrame.setVisible(true);
2345    }//GEN-LAST:event_generateNoiseOptionActionPerformed
2346
2347    /**
2348     * Hides the noise generation screen upon click of the "Cancel" button.
2349     *
2350     * @param evt the button press event
2351     */
2352    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
2353        addNoiseFrame.setVisible(false);
2354    }//GEN-LAST:event_jButton1ActionPerformed
2355
2356    /**
2357     * Generates random noise upon click of the "OK" button, then hides the
2358     * noise generation screen.
2359     *
2360     * @param evt the button press event
2361     */
2362    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
2363        Random rng = new Random();
2364        ScriptEventType[] eventTypes = ScriptEventType.values();
2365
2366        /* For prototyping purpose, ignore the sliders and average their values */
2367        int total = jSlider1.getValue() + jSlider2.getValue() + jSlider3.getValue() + jSlider5.getValue() + jSlider4.getValue();
2368        total /= 5;
2369
2370        for (int i = 0; i < script.incidents.get(9).slices.size(); i++)
2371        {
2372            script.incidents.get(9).slices.get(i).events.clear();
2373        }
2374
2375        for (int i = 0; i < total; i++)
2376        {
2377            int n = rng.nextInt();
2378            int s = rng.nextInt();
2379            int e = rng.nextInt();
2380            if (n < 0)
2381            {
2382                n *= -1;
2383            }
2384            if (s < 0)
2385            {
2386                s *= -1;
2387            }
2388            if (e < 0)
2389            {
2390                e *= -1;
2391            }
2392
2393            script.incidents.get(9).slices.get(s % (script.incidents.get(9).slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length]));
2394        }
2395
2396        addNoiseFrame.setVisible(false);
2397
2398        update(script, script);
2399}//GEN-LAST:event_jButton2ActionPerformed
2400
2401    /**
2402     * Allow the user to pick an incident from a dropdown, then save it to an
2403     * XML file.
2404     *
2405     * @param evt the button press event
2406     */
2407    private void saveIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveIncidentActionPerformed
2408        Object[] incidentList = script.incidents.toArray();
2409        JOptionPane.showInputDialog(
2410                this,
2411                "Select Incident:",
2412                "Save Incident",
2413                JOptionPane.PLAIN_MESSAGE,
2414                null,
2415                incidentList,
2416                script.incidents.get(0));
2417
2418        JFileChooser fc = new JFileChooser();
2419        fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]
2420        {
2421            "xml"
2422        }));
2423        fc.showSaveDialog(this);
2424    }//GEN-LAST:event_saveIncidentActionPerformed
2425
2426    private void loadIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadIncidentActionPerformed
2427        JFileChooser fc = new JFileChooser();
2428        fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]
2429        {
2430            "xml"
2431        }));
2432        fc.showOpenDialog(this);
2433    }//GEN-LAST:event_loadIncidentActionPerformed
2434
2435    private void generateProjectRequirementsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateProjectRequirementsActionPerformed
2436        JFileChooser fc = new JFileChooser();
2437        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2438        {
2439            "pdf"
2440        }));
2441        fc.setSelectedFile(new File("Requirements.pdf"));
2442        fc.showSaveDialog(this);
2443    }//GEN-LAST:event_generateProjectRequirementsActionPerformed
2444
2445    private void generateNotebooksActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNotebooksActionPerformed
2446        JFileChooser fc = new JFileChooser();
2447        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2448        {
2449            "pdf"
2450        }));
2451        fc.setSelectedFile(new File("Notebooks.pdf"));
2452        fc.showSaveDialog(this);
2453    }//GEN-LAST:event_generateNotebooksActionPerformed
2454
2455    private void generateScorecardsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateScorecardsActionPerformed
2456        JFileChooser fc = new JFileChooser();
2457        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2458        {
2459            "pdf"
2460        }));
2461        fc.setSelectedFile(new File("Scorecards.pdf"));
2462        fc.showSaveDialog(this);
2463    }//GEN-LAST:event_generateScorecardsActionPerformed
2464
2465    private void generateOrganizationChartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateOrganizationChartActionPerformed
2466        JFileChooser fc = new JFileChooser();
2467        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2468        {
2469            "pdf"
2470        }));
2471        fc.setSelectedFile(new File("OrganizationChart.pdf"));
2472        fc.showSaveDialog(this);
2473    }//GEN-LAST:event_generateOrganizationChartActionPerformed
2474    /**
2475     * Selects WITNESS_EVENT as the current type of new event, upon click of
2476     * "Witness Event" button.
2477     *
2478     * @param evt the button press event
2479     */
2480    private void witnessButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_witnessButtonActionPerformed
2481        currentEventType = ScriptEventType.WITNESS_EVENT;
2482        for (JButton eb : eventButtons)
2483        {
2484            eb.setSelected(false);
2485        }
2486        witnessButton.setSelected(true);
2487    }//GEN-LAST:event_witnessButtonActionPerformed
2488    /**
2489     * Selects UNIT_EVENT as the current type of new event, upon click of "Unit
2490     * Event" button.
2491     *
2492     * @param evt the button press event
2493     */
2494    private void unitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unitButtonActionPerformed
2495        currentEventType = ScriptEventType.UNIT_EVENT;
2496        for (JButton eb : eventButtons)
2497        {
2498            eb.setSelected(false);
2499        }
2500        unitButton.setSelected(true);
2501    }//GEN-LAST:event_unitButtonActionPerformed
2502    /**
2503     * Selects TOW_EVENT as the current type of new event, upon click of "TOW
2504     * Event" button.
2505     *
2506     * @param evt the button press event
2507     */
2508    private void towButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_towButtonActionPerformed
2509        currentEventType = ScriptEventType.TOW_EVENT;
2510        for (JButton eb : eventButtons)
2511        {
2512            eb.setSelected(false);
2513        }
2514        towButton.setSelected(true);
2515    }//GEN-LAST:event_towButtonActionPerformed
2516    /**
2517     * Selects PARAMICS_EVENT as the current type of new event, upon click of
2518     * "Paramics Event" button.
2519     *
2520     * @param evt the button press event
2521     */
2522    private void paramicsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_paramicsButtonActionPerformed
2523        currentEventType = ScriptEventType.PARAMICS_EVENT;
2524        for (JButton eb : eventButtons)
2525        {
2526            eb.setSelected(false);
2527        }
2528        paramicsButton.setSelected(true);
2529    }//GEN-LAST:event_paramicsButtonActionPerformed
2530    /**
2531     * Selects MAINTENANCE_RADIO_EVENT as the current type of new event, upon
2532     * click of "Maintenance Radio Event" button.
2533     *
2534     * @param evt the button press event
2535     */
2536    private void maintenanceRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maintenanceRadioButtonActionPerformed
2537        currentEventType = ScriptEventType.MAINTENANCE_RADIO_EVENT;
2538        for (JButton eb : eventButtons)
2539        {
2540            eb.setSelected(false);
2541        }
2542        maintenanceRadioButton.setSelected(true);
2543    }//GEN-LAST:event_maintenanceRadioButtonActionPerformed
2544    /**
2545     * Selects ATMS_EVAL_EVENT as the current type of new event, upon click of
2546     * "ATMS Evaluation Event" button.
2547     *
2548     * @param evt the button press event
2549     */
2550    private void atmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_atmsEvalButtonActionPerformed
2551        currentEventType = ScriptEventType.ATMS_EVAL_EVENT;
2552        for (JButton eb : eventButtons)
2553        {
2554            eb.setSelected(false);
2555        }
2556        atmsEvalButton.setSelected(true);
2557    }//GEN-LAST:event_atmsEvalButtonActionPerformed
2558    /**
2559     * Selects TELEPHONE_EVENT as the current type of new event, upon click of
2560     * "Telephone Event" button.
2561     *
2562     * @param evt the button press event
2563     */
2564    private void telephoneButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_telephoneButtonActionPerformed
2565        currentEventType = ScriptEventType.TELEPHONE_EVENT;
2566        for (JButton eb : eventButtons)
2567        {
2568            eb.setSelected(false);
2569        }
2570        telephoneButton.setSelected(true);
2571    }//GEN-LAST:event_telephoneButtonActionPerformed
2572    /**
2573     * Selects TMT_RADIO_EVENT as the current type of new event, upon click of
2574     * "TMT Radio Event" button.
2575     *
2576     * @param evt the button press event
2577     */
2578    private void tmtRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tmtRadioButtonActionPerformed
2579        currentEventType = ScriptEventType.TMT_RADIO_EVENT;
2580        for (JButton eb : eventButtons)
2581        {
2582            eb.setSelected(false);
2583        }
2584        tmtRadioButton.setSelected(true);
2585    }//GEN-LAST:event_tmtRadioButtonActionPerformed
2586    /**
2587     * Selects CMS_EVAL_EVENT as the current type of new event, upon click of
2588     * "CMS Evaluation Event" button.
2589     *
2590     * @param evt the button press event
2591     */
2592    private void cmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmsEvalButtonActionPerformed
2593        currentEventType = ScriptEventType.CMS_EVAL_EVENT;
2594        for (JButton eb : eventButtons)
2595        {
2596            eb.setSelected(false);
2597        }
2598        cmsEvalButton.setSelected(true);
2599    }//GEN-LAST:event_cmsEvalButtonActionPerformed
2600    /**
2601     * Selects CAD_EVAL_EVENT as the current type of new event, upon click of
2602     * "CAD Evaluation Event" button.
2603     *
2604     * @param evt the button press event
2605     */
2606    private void cadEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadEvalButtonActionPerformed
2607        currentEventType = ScriptEventType.CAD_EVAL_EVENT;
2608        for (JButton eb : eventButtons)
2609        {
2610            eb.setSelected(false);
2611        }
2612        cadEvalButton.setSelected(true);
2613    }//GEN-LAST:event_cadEvalButtonActionPerformed
2614    /**
2615     * Selects ACTIVITY_LOG_EVAL_EVENT as the current type of new event, upon
2616     * click of "Activity Log Evaluation Event" button.
2617     *
2618     * @param evt the button press event
2619     */
2620    private void activityLogEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activityLogEvalButtonActionPerformed
2621        currentEventType = ScriptEventType.ACTIVITY_LOG_EVAL_EVENT;
2622        for (JButton eb : eventButtons)
2623        {
2624            eb.setSelected(false);
2625        }
2626        activityLogEvalButton.setSelected(true);
2627    }//GEN-LAST:event_activityLogEvalButtonActionPerformed
2628    /**
2629     * Selects RADIO_EVAL_EVENT as the current type of new event, upon click of
2630     * "Radio Evaluation Event" button.
2631     *
2632     * @param evt the button press event
2633     */
2634    private void radioEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioEvalButtonActionPerformed
2635        currentEventType = ScriptEventType.RADIO_EVAL_EVENT;
2636        for (JButton eb : eventButtons)
2637        {
2638            eb.setSelected(false);
2639        }
2640        radioEvalButton.setSelected(true);
2641    }//GEN-LAST:event_radioEvalButtonActionPerformed
2642    /**
2643     * Selects FACILITATOR_EVAL_EVENT as the current type of new event, upon
2644     * click of "Facilitator Evaluation Event" button.
2645     *
2646     * @param evt the button press event
2647     */
2648    private void facilitatorEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_facilitatorEvalButtonActionPerformed
2649        currentEventType = ScriptEventType.FACILITATOR_EVAL_EVENT;
2650        for (JButton eb : eventButtons)
2651        {
2652            eb.setSelected(false);
2653        }
2654        facilitatorEvalButton.setSelected(true);
2655    }//GEN-LAST:event_facilitatorEvalButtonActionPerformed
2656    /**
2657     * Selects AUDIO_EVENT as the current type of new event, upon click of
2658     * "Audio Event" button.
2659     *
2660     * @param evt the button press event
2661     */
2662    private void audioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_audioButtonActionPerformed
2663        currentEventType = ScriptEventType.AUDIO_EVENT;
2664        for (JButton eb : eventButtons)
2665        {
2666            eb.setSelected(false);
2667        }
2668        audioButton.setSelected(true);
2669    }//GEN-LAST:event_audioButtonActionPerformed
2670
2671    /**
2672     * Increases zoom level upon click of the "Zoom in" icon.
2673     *
2674     * @param evt the mouse event
2675     */
2676    private void zoomInIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomInIconMouseClicked
2677        zoomSlider.setValue(zoomSlider.getValue() >= 21 ? 21 : zoomSlider.getValue() + 1);
2678    }//GEN-LAST:event_zoomInIconMouseClicked
2679    /**
2680     * Decreases zoom level upon click of the "Zoom out" icon.
2681     *
2682     * @param evt the mouse event
2683     */
2684    private void zoomOutIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomOutIconMouseClicked
2685        zoomSlider.setValue(zoomSlider.getValue() <= 5 ? 5 : zoomSlider.getValue() - 1);
2686    }//GEN-LAST:event_zoomOutIconMouseClicked
2687
2688    private Color selectedColor = Color.BLACK;
2689
2690    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
2691        Color newColor = incidentColorChooser.showDialog(this, "Incident Color", incidentColorField.getBackground());
2692        if (newColor != null)
2693        {
2694            selectedColor = newColor;
2695            incidentColorField.setBackground(newColor);
2696        }
2697    }//GEN-LAST:event_jButton3ActionPerformed
2698
2699    private void XMLExportBtnActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_XMLExportBtnActionPerformed
2700    {//GEN-HEADEREND:event_XMLExportBtnActionPerformed
2701        // TODO add your handling code here:
2702    }//GEN-LAST:event_XMLExportBtnActionPerformed
2703    /**
2704     * Upon click of the "Import From XML" menu option, allows user to choose an
2705     * XML script, and loads it into the script model.
2706     *
2707     * @param evt the button press event
2708     */
2709    private void XMLImportBtnActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_XMLImportBtnActionPerformed
2710    {//GEN-HEADEREND:event_XMLImportBtnActionPerformed
2711        JFileChooser fc = new JFileChooser();
2712
2713        fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",
2714                new String[]
2715                {
2716                    "xml"
2717                }));
2718        if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
2719        {
2720            System.out.println(fc.getSelectedFile().getName());
2721        }
2722        script.loadScriptFromFile(fc.getSelectedFile());
2723    }//GEN-LAST:event_XMLImportBtnActionPerformed
2724
2725    /**
2726     * Runs the script builder.
2727     *
2728     * @param args the command line arguments
2729     */
2730    public static void main(String args[])
2731    {
2732        try
2733        {
2734            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
2735        }
2736        catch (ClassNotFoundException ex)
2737        {
2738        }
2739        catch (InstantiationException ex)
2740        {
2741        }
2742        catch (IllegalAccessException ex)
2743        {
2744        }
2745        catch (UnsupportedLookAndFeelException ex)
2746        {
2747        }
2748
2749        try
2750        {
2751            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
2752        }
2753        catch (ClassNotFoundException ex)
2754        {
2755        }
2756        catch (InstantiationException ex)
2757        {
2758        }
2759        catch (IllegalAccessException ex)
2760        {
2761        }
2762        catch (UnsupportedLookAndFeelException ex)
2763        {
2764        }
2765
2766        java.awt.EventQueue.invokeLater(
2767                new Runnable()
2768                {
2769                    public void run()
2770                    {
2771                        new ScriptBuilderFrame().setVisible(true);
2772                    }
2773                }
2774        );
2775    }
2776
2777    // Variables declaration - do not modify//GEN-BEGIN:variables
2778    private javax.swing.JMenuItem XMLExportBtn;
2779    private javax.swing.JMenuItem XMLImportBtn;
2780    private javax.swing.JButton activityLogEvalButton;
2781    private javax.swing.JTextArea addIncidentDescription;
2782    private javax.swing.JSpinner addIncidentLength;
2783    private javax.swing.JTextField addIncidentName;
2784    private javax.swing.JSpinner addIncidentNumber;
2785    private javax.swing.JSpinner addIncidentStart;
2786    private javax.swing.JFrame addNoiseFrame;
2787    private javax.swing.JButton atmsEvalButton;
2788    private javax.swing.JButton audioButton;
2789    private javax.swing.JButton cadButton;
2790    private javax.swing.JButton cadEvalButton;
2791    private javax.swing.JMenuItem cadEvent;
2792    private javax.swing.JFrame cadEventFrame;
2793    private javax.swing.JButton cancelButton;
2794    private javax.swing.JButton cctvButton;
2795    private javax.swing.JButton chpRadioButton;
2796    private javax.swing.JButton cmsEvalButton;
2797    private javax.swing.JMenuItem deleteEventList;
2798    private javax.swing.JMenuItem editEventList;
2799    private javax.swing.JMenuItem editIncident;
2800    private javax.swing.JPanel evaluationEventsPanel;
2801    private javax.swing.JPopupMenu eventListPopupMenu;
2802    private javax.swing.JPopupMenu eventPopupMenu;
2803    private javax.swing.JButton facilitatorEvalButton;
2804    private javax.swing.JMenu fileMenu;
2805    private javax.swing.JMenuItem fileNew;
2806    private javax.swing.JMenuItem fileOpen;
2807    private javax.swing.JMenuItem fileSave;
2808    private javax.swing.JMenuItem fileSaveAs;
2809    private javax.swing.JMenu generateMenu;
2810    private javax.swing.JMenu generateNoiseMenu;
2811    private javax.swing.JMenuItem generateNoiseOption;
2812    private javax.swing.JMenuItem generateNotebooks;
2813    private javax.swing.JMenuItem generateOrganizationChart;
2814    private javax.swing.JMenuItem generateProjectRequirements;
2815    private javax.swing.JMenuItem generateScorecards;
2816    private javax.swing.JMenuItem helpAbout;
2817    private javax.swing.JMenu helpMenu;
2818    private javax.swing.JMenuItem helpTutorial;
2819    private javax.swing.JButton incidentCancelButton;
2820    private javax.swing.JColorChooser incidentColorChooser;
2821    private javax.swing.JTextField incidentColorField;
2822    private javax.swing.JTextArea incidentDescription;
2823    private javax.swing.JScrollPane incidentDescriptionPane;
2824    private javax.swing.JPanel incidentEventsPanel;
2825    private javax.swing.JFrame incidentFrame;
2826    private javax.swing.JMenu incidentMenu;
2827    private javax.swing.JTextField incidentName;
2828    private javax.swing.JTextField incidentNumber;
2829    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel1;
2830    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel10;
2831    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel2;
2832    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel3;
2833    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel4;
2834    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel5;
2835    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel6;
2836    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel7;
2837    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel8;
2838    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel9;
2839    private javax.swing.JButton incidentOkButton;
2840    private javax.swing.JPopupMenu incidentPopupMenu;
2841    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel1;
2842    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel10;
2843    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel2;
2844    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel3;
2845    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel4;
2846    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel5;
2847    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel6;
2848    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel7;
2849    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel8;
2850    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel9;
2851    private javax.swing.JButton jButton1;
2852    private javax.swing.JButton jButton2;
2853    private javax.swing.JButton jButton3;
2854    private javax.swing.JLabel jLabel10;
2855    private javax.swing.JLabel jLabel11;
2856    private javax.swing.JLabel jLabel12;
2857    private javax.swing.JLabel jLabel13;
2858    private javax.swing.JLabel jLabel14;
2859    private javax.swing.JLabel jLabel15;
2860    private javax.swing.JLabel jLabel16;
2861    private javax.swing.JLabel jLabel17;
2862    private javax.swing.JLabel jLabel2;
2863    private javax.swing.JLabel jLabel20;
2864    private javax.swing.JLabel jLabel21;
2865    private javax.swing.JLabel jLabel3;
2866    private javax.swing.JLabel jLabel4;
2867    private javax.swing.JLabel jLabel5;
2868    private javax.swing.JLabel jLabel6;
2869    private javax.swing.JLabel jLabel7;
2870    private javax.swing.JLabel jLabel8;
2871    private javax.swing.JLabel jLabel9;
2872    private javax.swing.JMenu jMenu2;
2873    private javax.swing.JMenuItem jMenuItem2;
2874    private javax.swing.JMenuItem jMenuItem3;
2875    private javax.swing.JMenuItem jMenuItem4;
2876    private javax.swing.JMenuItem jMenuItem5;
2877    private javax.swing.JMenuItem jMenuItem6;
2878    private javax.swing.JScrollPane jScrollPane1;
2879    private javax.swing.JPopupMenu.Separator jSeparator1;
2880    private javax.swing.JPopupMenu.Separator jSeparator2;
2881    private javax.swing.JPopupMenu.Separator jSeparator3;
2882    private javax.swing.JPopupMenu.Separator jSeparator4;
2883    private javax.swing.JSlider jSlider1;
2884    private javax.swing.JSlider jSlider2;
2885    private javax.swing.JSlider jSlider3;
2886    private javax.swing.JSlider jSlider4;
2887    private javax.swing.JSlider jSlider5;
2888    private javax.swing.JTextArea jTextArea1;
2889    private javax.swing.JMenuItem loadIncident;
2890    private javax.swing.JButton maintenanceRadioButton;
2891    private javax.swing.JMenuItem newIncident;
2892    private javax.swing.JButton okButton;
2893    private javax.swing.JButton paramicsButton;
2894    private javax.swing.JMenuItem popupDeleteIncident;
2895    private javax.swing.JButton radioEvalButton;
2896    private javax.swing.JMenuItem radioEvent;
2897    private javax.swing.JFrame radioEventFrame;
2898    private javax.swing.JTextArea radioMessage;
2899    private javax.swing.JScrollPane radioMessageScrollPane;
2900    private javax.swing.JComboBox radioTypeComboBox;
2901    private javax.swing.JLabel radioTypeLabel;
2902    private javax.swing.JMenuItem saveIncident;
2903    private javax.swing.JMenuBar scriptBuilderMenuBar;
2904    private javax.swing.JList scriptEventsList;
2905    private javax.swing.JScrollPane scriptEventsPane;
2906    private javax.swing.JPanel scriptEventsPanel;
2907    private javax.swing.JPanel scriptEventsPanel1;
2908    private javax.swing.JButton selectButton;
2909    private javax.swing.JButton telephoneButton;
2910    private scriptbuilder.gui.panels.TimeStampPanel timeStampPanel;
2911    private javax.swing.JScrollPane timeStampScrollPane;
2912    private scriptbuilder.gui.panels.TimelineTickPanel timelineTickPanel;
2913    private javax.swing.JScrollPane timelinesScrollPane;
2914    private javax.swing.JButton tmtRadioButton;
2915    private javax.swing.JButton towButton;
2916    private javax.swing.JButton unitButton;
2917    private javax.swing.JButton witnessButton;
2918    private javax.swing.JLabel zoomInIcon;
2919    private javax.swing.JLabel zoomOutIcon;
2920    private javax.swing.JSlider zoomSlider;
2921    // End of variables declaration//GEN-END:variables
2922
2923}
Note: See TracBrowser for help on using the repository browser.