source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/gui/IncidentEditorFrame.java @ 53

Revision 53, 146.4 KB checked in by bmcguffin, 9 years ago (diff)

Duplicated main ScriptBuilder? window. The new window will become the Incident Editor window (see Storyboard 2a-B). The main ScriptBuilder? window will become the Incident Combiner window (see storyboard 1a-B).

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