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

Revision 34, 147.7 KB checked in by bmcguffin, 9 years ago (diff)

Added functionality to "Save Incident" menu dropdown button. Program now saves selected incident to the selected file/directory. The resulting save file can function as a standalone script.

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