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

Revision 51, 146.1 KB checked in by bmcguffin, 9 years ago (diff)

Added functionality to File>New Script menu option.

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