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

Revision 11, 146.5 KB checked in by jdalbey, 9 years ago (diff)

ScriptBuilderFrame?.java: Add comments for About handler, change file filter to "xml" for open/save/saveas.

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