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

Revision 49, 145.5 KB checked in by bmcguffin, 9 years ago (diff)

Updated menu dropdowns; added functionality for Save, Save As, and Open Script menu options.

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        fileMenu.add(fileNew);
1791        fileMenu.add(jSeparator1);
1792
1793        fileOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1794        fileOpen.setText("Open...");
1795        fileOpen.addActionListener(new java.awt.event.ActionListener()
1796        {
1797            public void actionPerformed(java.awt.event.ActionEvent evt)
1798            {
1799                fileOpenActionPerformed(evt);
1800            }
1801        });
1802        fileMenu.add(fileOpen);
1803        fileMenu.add(jSeparator2);
1804
1805        fileSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
1806        fileSave.setText("Save");
1807        fileSave.addActionListener(new java.awt.event.ActionListener()
1808        {
1809            public void actionPerformed(java.awt.event.ActionEvent evt)
1810            {
1811                fileSaveActionPerformed(evt);
1812            }
1813        });
1814        fileMenu.add(fileSave);
1815
1816        fileSaveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1817        fileSaveAs.setText("Save as...");
1818        fileSaveAs.addActionListener(new java.awt.event.ActionListener()
1819        {
1820            public void actionPerformed(java.awt.event.ActionEvent evt)
1821            {
1822                fileSaveAsActionPerformed(evt);
1823            }
1824        });
1825        fileMenu.add(fileSaveAs);
1826
1827        scriptBuilderMenuBar.add(fileMenu);
1828
1829        generateMenu.setLabel("Generate");
1830        generateMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1831
1832        generateNotebooks.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1833        generateNotebooks.setText("Generate Notebooks...");
1834        generateNotebooks.addActionListener(new java.awt.event.ActionListener()
1835        {
1836            public void actionPerformed(java.awt.event.ActionEvent evt)
1837            {
1838                generateNotebooksActionPerformed(evt);
1839            }
1840        });
1841        generateMenu.add(generateNotebooks);
1842
1843        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1844        jMenuItem3.setText("Generate Web Notebook...");
1845        generateMenu.add(jMenuItem3);
1846
1847        generateScorecards.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1848        generateScorecards.setText("Generate Scorecards...");
1849        generateScorecards.addActionListener(new java.awt.event.ActionListener()
1850        {
1851            public void actionPerformed(java.awt.event.ActionEvent evt)
1852            {
1853                generateScorecardsActionPerformed(evt);
1854            }
1855        });
1856        generateMenu.add(generateScorecards);
1857
1858        generateOrganizationChart.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1859        generateOrganizationChart.setText("Generate D14 TMC Org Chart...");
1860        generateOrganizationChart.addActionListener(new java.awt.event.ActionListener()
1861        {
1862            public void actionPerformed(java.awt.event.ActionEvent evt)
1863            {
1864                generateOrganizationChartActionPerformed(evt);
1865            }
1866        });
1867        generateMenu.add(generateOrganizationChart);
1868        generateMenu.add(jSeparator3);
1869
1870        generateProjectRequirements.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1871        generateProjectRequirements.setText("Generate Project Worklist...");
1872        generateProjectRequirements.addActionListener(new java.awt.event.ActionListener()
1873        {
1874            public void actionPerformed(java.awt.event.ActionEvent evt)
1875            {
1876                generateProjectRequirementsActionPerformed(evt);
1877            }
1878        });
1879        generateMenu.add(generateProjectRequirements);
1880
1881        scriptBuilderMenuBar.add(generateMenu);
1882
1883        incidentMenu.setText("Incidents");
1884        incidentMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1885
1886        newIncident.setText("New Incident...");
1887        newIncident.addActionListener(new java.awt.event.ActionListener()
1888        {
1889            public void actionPerformed(java.awt.event.ActionEvent evt)
1890            {
1891                newIncidentActionPerformed(evt);
1892            }
1893        });
1894        incidentMenu.add(newIncident);
1895
1896        editIncident.setText("Edit Incident...");
1897        editIncident.addActionListener(new java.awt.event.ActionListener()
1898        {
1899            public void actionPerformed(java.awt.event.ActionEvent evt)
1900            {
1901                editIncidentActionPerformed(evt);
1902            }
1903        });
1904        incidentMenu.add(editIncident);
1905        incidentMenu.add(jSeparator4);
1906
1907        saveIncident.setText("Save Incident...");
1908        saveIncident.addActionListener(new java.awt.event.ActionListener()
1909        {
1910            public void actionPerformed(java.awt.event.ActionEvent evt)
1911            {
1912                saveIncidentActionPerformed(evt);
1913            }
1914        });
1915        incidentMenu.add(saveIncident);
1916
1917        loadIncident.setText("Load Incident...");
1918        loadIncident.addActionListener(new java.awt.event.ActionListener()
1919        {
1920            public void actionPerformed(java.awt.event.ActionEvent evt)
1921            {
1922                loadIncidentActionPerformed(evt);
1923            }
1924        });
1925        incidentMenu.add(loadIncident);
1926
1927        scriptBuilderMenuBar.add(incidentMenu);
1928
1929        generateNoiseMenu.setText("Noise");
1930
1931        generateNoiseOption.setText("Generate Noise...");
1932        generateNoiseOption.addActionListener(new java.awt.event.ActionListener()
1933        {
1934            public void actionPerformed(java.awt.event.ActionEvent evt)
1935            {
1936                generateNoiseOptionActionPerformed(evt);
1937            }
1938        });
1939        generateNoiseMenu.add(generateNoiseOption);
1940
1941        scriptBuilderMenuBar.add(generateNoiseMenu);
1942
1943        helpMenu.setText("Help");
1944        helpMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1945
1946        helpTutorial.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
1947        helpTutorial.setText("Tutorial...");
1948        helpMenu.add(helpTutorial);
1949
1950        helpAbout.setText("About...");
1951        helpAbout.addActionListener(new java.awt.event.ActionListener()
1952        {
1953            public void actionPerformed(java.awt.event.ActionEvent evt)
1954            {
1955                helpAboutActionPerformed(evt);
1956            }
1957        });
1958        helpMenu.add(helpAbout);
1959
1960        scriptBuilderMenuBar.add(helpMenu);
1961
1962        setJMenuBar(scriptBuilderMenuBar);
1963
1964        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
1965        getContentPane().setLayout(layout);
1966        layout.setHorizontalGroup(
1967            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1968            .addGroup(layout.createSequentialGroup()
1969                .addContainerGap()
1970                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1971                    .addComponent(timelinesScrollPane, 0, 0, Short.MAX_VALUE)
1972                    .addComponent(timeStampScrollPane)
1973                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1974                        .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1975                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1976                        .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1977                    .addGroup(layout.createSequentialGroup()
1978                        .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
1979                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1980                        .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1981                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1982                        .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1983                        .addGap(18, 18, 18)
1984                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1985                            .addComponent(zoomInIcon)
1986                            .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
1987                            .addComponent(zoomOutIcon))))
1988                .addContainerGap())
1989        );
1990        layout.setVerticalGroup(
1991            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1992            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1993                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1994                    .addGroup(layout.createSequentialGroup()
1995                        .addContainerGap()
1996                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1997                            .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1998                            .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1999                            .addGroup(layout.createSequentialGroup()
2000                                .addGap(47, 47, 47)
2001                                .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))))
2002                    .addGroup(layout.createSequentialGroup()
2003                        .addGap(20, 20, 20)
2004                        .addComponent(zoomInIcon)
2005                        .addGap(1, 1, 1)
2006                        .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
2007                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2008                        .addComponent(zoomOutIcon)))
2009                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2010                .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
2011                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
2012                .addComponent(timelinesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 365, javax.swing.GroupLayout.PREFERRED_SIZE)
2013                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
2014                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
2015                    .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
2016                    .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
2017                .addContainerGap())
2018        );
2019
2020        pack();
2021    }// </editor-fold>//GEN-END:initComponents
2022
2023    /**
2024     * Scale the timeline width based on zoom slider position.
2025     *
2026     * @param evt the state change event
2027     */
2028    private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged
2029        ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue() * 2;
2030        this.update(script, script);
2031        pack();
2032        repaint();
2033    }//GEN-LAST:event_zoomSliderStateChanged
2034
2035    private void cadEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMousePressed
2036    }//GEN-LAST:event_cadEventMousePressed
2037
2038    private void radioEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radioEventMousePressed
2039    }//GEN-LAST:event_radioEventMousePressed
2040
2041    private void cadEventMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMouseReleased
2042    }//GEN-LAST:event_cadEventMouseReleased
2043
2044    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
2045    }//GEN-LAST:event_okButtonActionPerformed
2046
2047    /**
2048     * If cancel button is pressed, close radio event editor
2049     *
2050     * @param evt the button press event
2051     */
2052    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
2053        radioMessage.setText("");
2054        radioTypeComboBox.setSelectedIndex(0);
2055        radioEventFrame.setVisible(false);
2056    }//GEN-LAST:event_cancelButtonActionPerformed
2057
2058    private void editEventListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editEventListActionPerformed
2059    }//GEN-LAST:event_editEventListActionPerformed
2060
2061    /**
2062     * Executed when the "OK" button is pressed on the Incident editor. If
2063     * incident is new, and is valid, adds it to the model and updates. If
2064     * editing existing incident, verifies changes are valid and applies them.
2065     * Then closes editor window.
2066     *
2067     * @param evt the button press event
2068     */
2069    private void incidentOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentOkButtonActionPerformed
2070        if (!editingIncident)
2071        {
2072            boolean found = false;
2073            int indx = 0;
2074            for (ScriptIncident i : script.incidents)
2075            {
2076                if (i == null)
2077                {
2078                    found = true;
2079                    break;
2080                }
2081                ++indx;
2082                if (i.number == (Integer) addIncidentNumber.getValue())
2083                {
2084                    JOptionPane.showMessageDialog(this, "Incident number already in use.",
2085                            "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
2086                    incidentFrame.setVisible(true);
2087                    return;
2088                }
2089            }
2090            if (!found)
2091            {
2092                JOptionPane.showMessageDialog(this, "Script already has the max number of incidents.",
2093                        "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
2094                incidentFrame.setVisible(true);
2095                return;
2096            }
2097
2098            script.incidents.remove(indx);
2099            SimulationScript.incidentColors[indx] = selectedColor;
2100            script.incidents.add(indx,
2101                    new ScriptIncident(SimulationScript.incidentColors[indx],
2102                            (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),
2103                            script));
2104            script.incidents.get(indx).length = (Integer) addIncidentLength.getValue() * 60;
2105            script.incidents.get(indx).setOffset((Integer) addIncidentStart.getValue() * 60);
2106        }
2107        else
2108        {
2109            ScriptIncident backup = script.incidents.get(oldIncidentIndex);
2110            script.incidents.remove(oldIncidentIndex);
2111            script.incidents.add(oldIncidentIndex, null);
2112
2113            for (ScriptIncident i : script.incidents)
2114            {
2115                if (i != null && i.number == (Integer) addIncidentNumber.getValue())
2116                {
2117                    script.incidents.remove(oldIncidentIndex);
2118                    script.incidents.add(oldIncidentIndex, backup);
2119                    JOptionPane.showMessageDialog(this, "Incident number already in use.",
2120                            "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
2121                    incidentFrame.setVisible(true);
2122                    return;
2123                }
2124            }
2125
2126            script.incidents.remove(oldIncidentIndex);
2127            SimulationScript.incidentColors[oldIncidentIndex] = selectedColor;
2128            script.incidents.add(oldIncidentIndex,
2129                    new ScriptIncident(SimulationScript.incidentColors[oldIncidentIndex],
2130                            (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),
2131                            script));
2132            script.incidents.get(oldIncidentIndex).length = (Integer) addIncidentLength.getValue() * 60;
2133            script.incidents.get(oldIncidentIndex).slices = backup.slices;
2134            script.incidents.get(oldIncidentIndex).offset = backup.offset;
2135            script.incidents.get(oldIncidentIndex).setOffset((Integer) addIncidentStart.getValue() * 60);
2136        }
2137
2138        incidentFrame.setVisible(false);
2139        repaint();
2140    }//GEN-LAST:event_incidentOkButtonActionPerformed
2141
2142    /**
2143     * Closes editor window upon click of cancel button.
2144     *
2145     * @param evt the button press event
2146     */
2147    private void incidentCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentCancelButtonActionPerformed
2148        incidentFrame.setVisible(false);
2149    }//GEN-LAST:event_incidentCancelButtonActionPerformed
2150
2151    /**
2152     * Opens incident editor window and preps for addition of new incident, upon
2153     * click of "New Incident" menu option.
2154     *
2155     * @param evt the button press event
2156     */
2157    private void newIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newIncidentActionPerformed
2158        editingIncident = false;
2159
2160        addIncidentName.setText("");
2161        addIncidentNumber.setValue(101);
2162        addIncidentStart.setValue(0);
2163        addIncidentLength.setValue(0);
2164        incidentColorField.setBackground(Color.BLACK);
2165        selectedColor = Color.BLACK;
2166        addIncidentDescription.setText("");
2167
2168        incidentFrame.setVisible(true);
2169    }//GEN-LAST:event_newIncidentActionPerformed
2170
2171    /**
2172     * Deselects new event type upon click of blank "select" button.
2173     *
2174     * @param evt the button press event
2175     */
2176    private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
2177        currentEventType = null;
2178        for (JButton eb : eventButtons)
2179        {
2180            eb.setSelected(false);
2181        }
2182        selectButton.setSelected(true);
2183    }//GEN-LAST:event_selectButtonActionPerformed
2184
2185    /**
2186     * Selects CAD_EVENT as the current type of new event, upon click of "CAD
2187     * Event" button.
2188     *
2189     * @param evt the button press event
2190     */
2191    private void cadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadButtonActionPerformed
2192        currentEventType = ScriptEventType.CAD_EVENT;
2193        for (JButton eb : eventButtons)
2194        {
2195            eb.setSelected(false);
2196        }
2197        cadButton.setSelected(true);
2198    }//GEN-LAST:event_cadButtonActionPerformed
2199
2200    /**
2201     * Selects CCTV_EVENT as the current type of new event, upon click of "CCTV
2202     * Event" button.
2203     *
2204     * @param evt the button press event
2205     */
2206    private void cctvButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cctvButtonActionPerformed
2207        currentEventType = ScriptEventType.CCTV_EVENT;
2208        for (JButton eb : eventButtons)
2209        {
2210            eb.setSelected(false);
2211        }
2212        cctvButton.setSelected(true);
2213    }//GEN-LAST:event_cctvButtonActionPerformed
2214
2215    /**
2216     * Selects CHP_RADIO_EVENT as the current type of new event, upon click of
2217     * "CHP Radio Event" button.
2218     *
2219     * @param evt the button press event
2220     */
2221    private void chpRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chpRadioButtonActionPerformed
2222        currentEventType = ScriptEventType.CHP_RADIO_EVENT;
2223        for (JButton eb : eventButtons)
2224        {
2225            eb.setSelected(false);
2226        }
2227        chpRadioButton.setSelected(true);
2228    }//GEN-LAST:event_chpRadioButtonActionPerformed
2229
2230    private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileMenuActionPerformed
2231    }//GEN-LAST:event_fileMenuActionPerformed
2232
2233    /**
2234     * Upon click of "Open file" menu option, opens a window to load a new .sim
2235     * file.
2236     *
2237     * @param evt the button press event
2238     */
2239    private void fileOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileOpenActionPerformed
2240        JFileChooser fc = new JFileChooser();
2241
2242        fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",
2243                new String[]
2244                {
2245                    "xml"
2246                }));
2247        if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
2248        {
2249            System.out.println(fc.getSelectedFile().getName());
2250            script.loadScriptFromFile(fc.getSelectedFile());
2251            script.saveFile = fc.getSelectedFile();
2252        }
2253    }//GEN-LAST:event_fileOpenActionPerformed
2254
2255    /**
2256     * Upon click of "Save as" menu option, opens a window to choose a .sim file
2257     * to save this as.
2258     *
2259     * @param evt the button press event
2260     */
2261    private void fileSaveAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveAsActionPerformed
2262        JFileChooser fc = new JFileChooser();
2263
2264        fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",
2265                new String[]
2266                {
2267                    "xml"
2268                }));
2269
2270        if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)
2271        {
2272            script.saveScriptToFile(fc.getSelectedFile());
2273            script.saveFile = fc.getSelectedFile();
2274        }
2275    }//GEN-LAST:event_fileSaveAsActionPerformed
2276
2277    /**
2278     * Upon click of "Save" menu option, opens a window to choose a .sim file to
2279     * save this as.
2280     *
2281     * @param evt the button press event
2282     */
2283    private void fileSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveActionPerformed
2284        if (script.saveFile == null)
2285        {
2286            fileSaveAsActionPerformed(evt);
2287        }
2288        else
2289        {
2290            script.saveScriptToFile(script.saveFile);
2291        }
2292    }//GEN-LAST:event_fileSaveActionPerformed
2293
2294    /**
2295     * Upon click of "Edit incident" menu option, brings up a dropdown menu of
2296     * all existing incidents. Once an incident is selected, opens incident
2297     * editor window with that event's details loaded.
2298     *
2299     * @param evt the button press event
2300     */
2301    private void editIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editIncidentActionPerformed
2302        Object[] incidentList = script.incidents.toArray();
2303        ScriptIncident i = (ScriptIncident) JOptionPane.showInputDialog(
2304                this,
2305                "Select Incident:",
2306                "Edit Incident",
2307                JOptionPane.PLAIN_MESSAGE,
2308                null,
2309                incidentList,
2310                script.incidents.get(0));
2311
2312        // If a valid incident was selected
2313        if (i != null)
2314        {
2315            editingIncident = true;
2316            oldIncidentIndex = script.incidents.indexOf(i);
2317
2318            addIncidentName.setText(i.name);
2319            addIncidentNumber.setValue(i.number);
2320            addIncidentStart.setValue(i.offset / 60);
2321            addIncidentLength.setValue(i.length / 60);
2322            incidentColorField.setBackground(i.color);
2323            selectedColor = i.color;
2324            addIncidentDescription.setText(i.description);
2325
2326            incidentFrame.setVisible(true);
2327        }
2328    }//GEN-LAST:event_editIncidentActionPerformed
2329
2330    /**
2331     * Brings up the noise generation screen upon click of the "Generate Noise"
2332     * menu option.
2333     *
2334     * @param evt the button press event
2335     */
2336    private void generateNoiseOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNoiseOptionActionPerformed
2337        addNoiseFrame.setVisible(true);
2338    }//GEN-LAST:event_generateNoiseOptionActionPerformed
2339
2340    /**
2341     * Hides the noise generation screen upon click of the "Cancel" button.
2342     *
2343     * @param evt the button press event
2344     */
2345    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
2346        addNoiseFrame.setVisible(false);
2347    }//GEN-LAST:event_jButton1ActionPerformed
2348
2349    /**
2350     * Generates random noise upon click of the "OK" button, then hides the
2351     * noise generation screen.
2352     *
2353     * @param evt the button press event
2354     */
2355    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
2356        Random rng = new Random();
2357        ScriptEventType[] eventTypes = ScriptEventType.values();
2358
2359        /* For prototyping purpose, ignore the sliders and average their values */
2360        int total = jSlider1.getValue() + jSlider2.getValue() + jSlider3.getValue() + jSlider5.getValue() + jSlider4.getValue();
2361        total /= 5;
2362
2363        for (int i = 0; i < script.incidents.get(9).slices.size(); i++)
2364        {
2365            script.incidents.get(9).slices.get(i).events.clear();
2366        }
2367
2368        for (int i = 0; i < total; i++)
2369        {
2370            int n = rng.nextInt();
2371            int s = rng.nextInt();
2372            int e = rng.nextInt();
2373            if (n < 0)
2374            {
2375                n *= -1;
2376            }
2377            if (s < 0)
2378            {
2379                s *= -1;
2380            }
2381            if (e < 0)
2382            {
2383                e *= -1;
2384            }
2385
2386            script.incidents.get(9).slices.get(s % (script.incidents.get(9).slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length]));
2387        }
2388
2389        addNoiseFrame.setVisible(false);
2390
2391        update(script, script);
2392}//GEN-LAST:event_jButton2ActionPerformed
2393
2394    /**
2395     * Allow the user to pick an incident from a dropdown, then save it to an
2396     * XML file.
2397     *
2398     * @param evt the button press event
2399     */
2400    private void saveIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveIncidentActionPerformed
2401        Object[] incidentList = script.incidents.toArray();
2402        String input = "";
2403        ScriptIncident inc = null;
2404        Object result = JOptionPane.showInputDialog(
2405                this,
2406                "Select Incident:",
2407                "Save Incident",
2408                JOptionPane.PLAIN_MESSAGE,
2409                null,
2410                incidentList,
2411                script.incidents.get(0));
2412
2413        System.out.println("RESULT = " + result.toString());
2414
2415        input = result.toString();
2416
2417        System.out.println("INPUT = " + input);
2418
2419        int i = 0;
2420        for (ScriptIncident incident : script.incidents)
2421        {
2422            if (incident == null)
2423            {
2424                continue;
2425            }
2426            System.out.println((++i) + ": " + incident.toString());
2427            if (incident.toString().equals(input))
2428            {
2429                inc = incident;
2430            }
2431        }
2432
2433        if (inc == null)
2434        {
2435            System.out.println("DIDN'T FIND ANYTHING");
2436            return;
2437        }
2438
2439        JFileChooser fc = new JFileChooser();
2440        fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]
2441        {
2442            "xml"
2443        }));
2444        if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)
2445        {
2446            inc.saveIncidentToFile(fc.getSelectedFile());
2447        }
2448    }//GEN-LAST:event_saveIncidentActionPerformed
2449
2450    private void loadIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadIncidentActionPerformed
2451        JFileChooser fc = new JFileChooser();
2452        fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]
2453        {
2454            "xml"
2455        }));
2456        fc.showOpenDialog(this);
2457    }//GEN-LAST:event_loadIncidentActionPerformed
2458
2459    private void generateProjectRequirementsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateProjectRequirementsActionPerformed
2460        JFileChooser fc = new JFileChooser();
2461        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2462        {
2463            "pdf"
2464        }));
2465        fc.setSelectedFile(new File("Requirements.pdf"));
2466        fc.showSaveDialog(this);
2467    }//GEN-LAST:event_generateProjectRequirementsActionPerformed
2468
2469    private void generateNotebooksActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNotebooksActionPerformed
2470        JFileChooser fc = new JFileChooser();
2471        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2472        {
2473            "pdf"
2474        }));
2475        fc.setSelectedFile(new File("Notebooks.pdf"));
2476        fc.showSaveDialog(this);
2477    }//GEN-LAST:event_generateNotebooksActionPerformed
2478
2479    private void generateScorecardsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateScorecardsActionPerformed
2480        JFileChooser fc = new JFileChooser();
2481        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2482        {
2483            "pdf"
2484        }));
2485        fc.setSelectedFile(new File("Scorecards.pdf"));
2486        fc.showSaveDialog(this);
2487    }//GEN-LAST:event_generateScorecardsActionPerformed
2488
2489    private void generateOrganizationChartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateOrganizationChartActionPerformed
2490        JFileChooser fc = new JFileChooser();
2491        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2492        {
2493            "pdf"
2494        }));
2495        fc.setSelectedFile(new File("OrganizationChart.pdf"));
2496        fc.showSaveDialog(this);
2497    }//GEN-LAST:event_generateOrganizationChartActionPerformed
2498
2499    /**
2500     * Selects WITNESS_EVENT as the current type of new event, upon click of
2501     * "Witness Event" button.
2502     *
2503     * @param evt the button press event
2504     */
2505    private void witnessButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_witnessButtonActionPerformed
2506        currentEventType = ScriptEventType.WITNESS_EVENT;
2507        for (JButton eb : eventButtons)
2508        {
2509            eb.setSelected(false);
2510        }
2511        witnessButton.setSelected(true);
2512    }//GEN-LAST:event_witnessButtonActionPerformed
2513
2514    /**
2515     * Selects UNIT_EVENT as the current type of new event, upon click of "Unit
2516     * Event" button.
2517     *
2518     * @param evt the button press event
2519     */
2520    private void unitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unitButtonActionPerformed
2521        currentEventType = ScriptEventType.UNIT_EVENT;
2522        for (JButton eb : eventButtons)
2523        {
2524            eb.setSelected(false);
2525        }
2526        unitButton.setSelected(true);
2527    }//GEN-LAST:event_unitButtonActionPerformed
2528
2529    /**
2530     * Selects TOW_EVENT as the current type of new event, upon click of "TOW
2531     * Event" button.
2532     *
2533     * @param evt the button press event
2534     */
2535    private void towButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_towButtonActionPerformed
2536        currentEventType = ScriptEventType.TOW_EVENT;
2537        for (JButton eb : eventButtons)
2538        {
2539            eb.setSelected(false);
2540        }
2541        towButton.setSelected(true);
2542    }//GEN-LAST:event_towButtonActionPerformed
2543
2544    /**
2545     * Selects PARAMICS_EVENT as the current type of new event, upon click of
2546     * "Paramics Event" button.
2547     *
2548     * @param evt the button press event
2549     */
2550    private void paramicsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_paramicsButtonActionPerformed
2551        currentEventType = ScriptEventType.PARAMICS_EVENT;
2552        for (JButton eb : eventButtons)
2553        {
2554            eb.setSelected(false);
2555        }
2556        paramicsButton.setSelected(true);
2557    }//GEN-LAST:event_paramicsButtonActionPerformed
2558
2559    /**
2560     * Selects MAINTENANCE_RADIO_EVENT as the current type of new event, upon
2561     * click of "Maintenance Radio Event" button.
2562     *
2563     * @param evt the button press event
2564     */
2565    private void maintenanceRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maintenanceRadioButtonActionPerformed
2566        currentEventType = ScriptEventType.MAINTENANCE_RADIO_EVENT;
2567        for (JButton eb : eventButtons)
2568        {
2569            eb.setSelected(false);
2570        }
2571        maintenanceRadioButton.setSelected(true);
2572    }//GEN-LAST:event_maintenanceRadioButtonActionPerformed
2573
2574    /**
2575     * Selects ATMS_EVAL_EVENT as the current type of new event, upon click of
2576     * "ATMS Evaluation Event" button.
2577     *
2578     * @param evt the button press event
2579     */
2580    private void atmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_atmsEvalButtonActionPerformed
2581        currentEventType = ScriptEventType.ATMS_EVAL_EVENT;
2582        for (JButton eb : eventButtons)
2583        {
2584            eb.setSelected(false);
2585        }
2586        atmsEvalButton.setSelected(true);
2587    }//GEN-LAST:event_atmsEvalButtonActionPerformed
2588
2589    /**
2590     * Selects TELEPHONE_EVENT as the current type of new event, upon click of
2591     * "Telephone Event" button.
2592     *
2593     * @param evt the button press event
2594     */
2595    private void telephoneButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_telephoneButtonActionPerformed
2596        currentEventType = ScriptEventType.TELEPHONE_EVENT;
2597        for (JButton eb : eventButtons)
2598        {
2599            eb.setSelected(false);
2600        }
2601        telephoneButton.setSelected(true);
2602    }//GEN-LAST:event_telephoneButtonActionPerformed
2603
2604    /**
2605     * Selects TMT_RADIO_EVENT as the current type of new event, upon click of
2606     * "TMT Radio Event" button.
2607     *
2608     * @param evt the button press event
2609     */
2610    private void tmtRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tmtRadioButtonActionPerformed
2611        currentEventType = ScriptEventType.TMT_RADIO_EVENT;
2612        for (JButton eb : eventButtons)
2613        {
2614            eb.setSelected(false);
2615        }
2616        tmtRadioButton.setSelected(true);
2617    }//GEN-LAST:event_tmtRadioButtonActionPerformed
2618
2619    /**
2620     * Selects CMS_EVAL_EVENT as the current type of new event, upon click of
2621     * "CMS Evaluation Event" button.
2622     *
2623     * @param evt the button press event
2624     */
2625    private void cmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmsEvalButtonActionPerformed
2626        currentEventType = ScriptEventType.CMS_EVAL_EVENT;
2627        for (JButton eb : eventButtons)
2628        {
2629            eb.setSelected(false);
2630        }
2631        cmsEvalButton.setSelected(true);
2632    }//GEN-LAST:event_cmsEvalButtonActionPerformed
2633
2634    /**
2635     * Selects CAD_EVAL_EVENT as the current type of new event, upon click of
2636     * "CAD Evaluation Event" button.
2637     *
2638     * @param evt the button press event
2639     */
2640    private void cadEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadEvalButtonActionPerformed
2641        currentEventType = ScriptEventType.CAD_EVAL_EVENT;
2642        for (JButton eb : eventButtons)
2643        {
2644            eb.setSelected(false);
2645        }
2646        cadEvalButton.setSelected(true);
2647    }//GEN-LAST:event_cadEvalButtonActionPerformed
2648
2649    /**
2650     * Selects ACTIVITY_LOG_EVAL_EVENT as the current type of new event, upon
2651     * click of "Activity Log Evaluation Event" button.
2652     *
2653     * @param evt the button press event
2654     */
2655    private void activityLogEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activityLogEvalButtonActionPerformed
2656        currentEventType = ScriptEventType.ACTIVITY_LOG_EVAL_EVENT;
2657        for (JButton eb : eventButtons)
2658        {
2659            eb.setSelected(false);
2660        }
2661        activityLogEvalButton.setSelected(true);
2662    }//GEN-LAST:event_activityLogEvalButtonActionPerformed
2663
2664    /**
2665     * Selects RADIO_EVAL_EVENT as the current type of new event, upon click of
2666     * "Radio Evaluation Event" button.
2667     *
2668     * @param evt the button press event
2669     */
2670    private void radioEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioEvalButtonActionPerformed
2671        currentEventType = ScriptEventType.RADIO_EVAL_EVENT;
2672        for (JButton eb : eventButtons)
2673        {
2674            eb.setSelected(false);
2675        }
2676        radioEvalButton.setSelected(true);
2677    }//GEN-LAST:event_radioEvalButtonActionPerformed
2678
2679    /**
2680     * Selects FACILITATOR_EVAL_EVENT as the current type of new event, upon
2681     * click of "Facilitator Evaluation Event" button.
2682     *
2683     * @param evt the button press event
2684     */
2685    private void facilitatorEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_facilitatorEvalButtonActionPerformed
2686        currentEventType = ScriptEventType.FACILITATOR_EVAL_EVENT;
2687        for (JButton eb : eventButtons)
2688        {
2689            eb.setSelected(false);
2690        }
2691        facilitatorEvalButton.setSelected(true);
2692    }//GEN-LAST:event_facilitatorEvalButtonActionPerformed
2693
2694    /**
2695     * Selects AUDIO_EVENT as the current type of new event, upon click of
2696     * "Audio Event" button.
2697     *
2698     * @param evt the button press event
2699     */
2700    private void audioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_audioButtonActionPerformed
2701        currentEventType = ScriptEventType.AUDIO_EVENT;
2702        for (JButton eb : eventButtons)
2703        {
2704            eb.setSelected(false);
2705        }
2706        audioButton.setSelected(true);
2707    }//GEN-LAST:event_audioButtonActionPerformed
2708
2709    /**
2710     * Increases zoom level upon click of the "Zoom in" icon.
2711     *
2712     * @param evt the mouse event
2713     */
2714    private void zoomInIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomInIconMouseClicked
2715        zoomSlider.setValue(zoomSlider.getValue() >= 21 ? 21 : zoomSlider.getValue() + 1);
2716    }//GEN-LAST:event_zoomInIconMouseClicked
2717
2718    /**
2719     * Decreases zoom level upon click of the "Zoom out" icon.
2720     *
2721     * @param evt the mouse event
2722     */
2723    private void zoomOutIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomOutIconMouseClicked
2724        zoomSlider.setValue(zoomSlider.getValue() <= 5 ? 5 : zoomSlider.getValue() - 1);
2725    }//GEN-LAST:event_zoomOutIconMouseClicked
2726    private Color selectedColor = Color.BLACK;
2727
2728    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
2729        Color newColor = incidentColorChooser.showDialog(this, "Incident Color", incidentColorField.getBackground());
2730        if (newColor != null)
2731        {
2732            selectedColor = newColor;
2733            incidentColorField.setBackground(newColor);
2734        }
2735    }//GEN-LAST:event_jButton3ActionPerformed
2736
2737    /* Help > About simply displays the current SVN revision number so
2738     * the user can determine which version of the source code was used to
2739     * build the executable she is running.
2740     */
2741    private void helpAboutActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_helpAboutActionPerformed
2742    {//GEN-HEADEREND:event_helpAboutActionPerformed
2743        JOptionPane.showMessageDialog(rootPane, "Revision: " + getAppVersion(), "About", JOptionPane.INFORMATION_MESSAGE);
2744    }//GEN-LAST:event_helpAboutActionPerformed
2745
2746    /**
2747     * Read the version number from the application properties. The file
2748     * 'application.properties' is generated by build.xml.
2749     *
2750     * @return a version string obtained from application.properties file, or
2751     * "Version: unknown" if an IOerror prevents us from reading the file.
2752     */
2753    private String getAppVersion()
2754    {
2755        String propfilename = "/scriptbuilder/gui/application.properties";
2756        String propKey = "Application.revision";
2757        String version = "unknown";
2758        // Load the application properties (created by build.xml)
2759        try
2760        {
2761            Properties props = new Properties();
2762            props.load(this.getClass().getResourceAsStream(propfilename));
2763            version = (String) props.get(propKey);
2764        }
2765        catch (IOException ex)
2766        {
2767            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
2768                    "ScriptBuilderFrame.getAppVersion()."
2769                    + " IOError reading " + propfilename);
2770        }
2771        catch (NullPointerException npe)
2772        {
2773            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
2774                    "ScriptBuilderFrame.getAppVersion().load."
2775                    + " Missing file: " + propfilename);
2776        }
2777        return version;
2778    }
2779
2780    /**
2781     * Runs the script builder.
2782     *
2783     * @param args the command line arguments
2784     */
2785    public static void main(String args[])
2786    {
2787        try
2788        {
2789            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
2790        }
2791        catch (ClassNotFoundException ex)
2792        {
2793        }
2794        catch (InstantiationException ex)
2795        {
2796        }
2797        catch (IllegalAccessException ex)
2798        {
2799        }
2800        catch (UnsupportedLookAndFeelException ex)
2801        {
2802        }
2803
2804        try
2805        {
2806            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
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        java.awt.EventQueue.invokeLater(
2822                new Runnable()
2823                {
2824                    public void run()
2825                    {
2826                        new ScriptBuilderFrame().setVisible(true);
2827                    }
2828                });
2829    }
2830    // Variables declaration - do not modify//GEN-BEGIN:variables
2831    private javax.swing.JButton activityLogEvalButton;
2832    private javax.swing.JTextArea addIncidentDescription;
2833    private javax.swing.JSpinner addIncidentLength;
2834    private javax.swing.JTextField addIncidentName;
2835    private javax.swing.JSpinner addIncidentNumber;
2836    private javax.swing.JSpinner addIncidentStart;
2837    private javax.swing.JFrame addNoiseFrame;
2838    private javax.swing.JButton atmsEvalButton;
2839    private javax.swing.JButton audioButton;
2840    private javax.swing.JButton cadButton;
2841    private javax.swing.JButton cadEvalButton;
2842    private javax.swing.JMenuItem cadEvent;
2843    private javax.swing.JFrame cadEventFrame;
2844    private javax.swing.JButton cancelButton;
2845    private javax.swing.JButton cctvButton;
2846    private javax.swing.JButton chpRadioButton;
2847    private javax.swing.JButton cmsEvalButton;
2848    private javax.swing.JMenuItem deleteEventList;
2849    private javax.swing.JMenuItem editEventList;
2850    private javax.swing.JMenuItem editIncident;
2851    private javax.swing.JPanel evaluationEventsPanel;
2852    private javax.swing.JPopupMenu eventListPopupMenu;
2853    private javax.swing.JPopupMenu eventPopupMenu;
2854    private javax.swing.JButton facilitatorEvalButton;
2855    private javax.swing.JMenu fileMenu;
2856    private javax.swing.JMenuItem fileNew;
2857    private javax.swing.JMenuItem fileOpen;
2858    private javax.swing.JMenuItem fileSave;
2859    private javax.swing.JMenuItem fileSaveAs;
2860    private javax.swing.JMenu generateMenu;
2861    private javax.swing.JMenu generateNoiseMenu;
2862    private javax.swing.JMenuItem generateNoiseOption;
2863    private javax.swing.JMenuItem generateNotebooks;
2864    private javax.swing.JMenuItem generateOrganizationChart;
2865    private javax.swing.JMenuItem generateProjectRequirements;
2866    private javax.swing.JMenuItem generateScorecards;
2867    private javax.swing.JMenuItem helpAbout;
2868    private javax.swing.JMenu helpMenu;
2869    private javax.swing.JMenuItem helpTutorial;
2870    private javax.swing.JButton incidentCancelButton;
2871    private javax.swing.JColorChooser incidentColorChooser;
2872    private javax.swing.JTextField incidentColorField;
2873    private javax.swing.JTextArea incidentDescription;
2874    private javax.swing.JScrollPane incidentDescriptionPane;
2875    private javax.swing.JPanel incidentEventsPanel;
2876    private javax.swing.JFrame incidentFrame;
2877    private javax.swing.JMenu incidentMenu;
2878    private javax.swing.JTextField incidentName;
2879    private javax.swing.JTextField incidentNumber;
2880    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel1;
2881    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel10;
2882    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel2;
2883    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel3;
2884    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel4;
2885    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel5;
2886    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel6;
2887    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel7;
2888    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel8;
2889    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel9;
2890    private javax.swing.JButton incidentOkButton;
2891    private javax.swing.JPopupMenu incidentPopupMenu;
2892    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel1;
2893    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel10;
2894    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel2;
2895    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel3;
2896    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel4;
2897    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel5;
2898    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel6;
2899    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel7;
2900    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel8;
2901    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel9;
2902    private javax.swing.JButton jButton1;
2903    private javax.swing.JButton jButton2;
2904    private javax.swing.JButton jButton3;
2905    private javax.swing.JLabel jLabel10;
2906    private javax.swing.JLabel jLabel11;
2907    private javax.swing.JLabel jLabel12;
2908    private javax.swing.JLabel jLabel13;
2909    private javax.swing.JLabel jLabel14;
2910    private javax.swing.JLabel jLabel15;
2911    private javax.swing.JLabel jLabel16;
2912    private javax.swing.JLabel jLabel17;
2913    private javax.swing.JLabel jLabel2;
2914    private javax.swing.JLabel jLabel20;
2915    private javax.swing.JLabel jLabel21;
2916    private javax.swing.JLabel jLabel3;
2917    private javax.swing.JLabel jLabel4;
2918    private javax.swing.JLabel jLabel5;
2919    private javax.swing.JLabel jLabel6;
2920    private javax.swing.JLabel jLabel7;
2921    private javax.swing.JLabel jLabel8;
2922    private javax.swing.JLabel jLabel9;
2923    private javax.swing.JMenuItem jMenuItem2;
2924    private javax.swing.JMenuItem jMenuItem3;
2925    private javax.swing.JMenuItem jMenuItem4;
2926    private javax.swing.JMenuItem jMenuItem5;
2927    private javax.swing.JMenuItem jMenuItem6;
2928    private javax.swing.JScrollPane jScrollPane1;
2929    private javax.swing.JPopupMenu.Separator jSeparator1;
2930    private javax.swing.JPopupMenu.Separator jSeparator2;
2931    private javax.swing.JPopupMenu.Separator jSeparator3;
2932    private javax.swing.JPopupMenu.Separator jSeparator4;
2933    private javax.swing.JSlider jSlider1;
2934    private javax.swing.JSlider jSlider2;
2935    private javax.swing.JSlider jSlider3;
2936    private javax.swing.JSlider jSlider4;
2937    private javax.swing.JSlider jSlider5;
2938    private javax.swing.JTextArea jTextArea1;
2939    private javax.swing.JMenuItem loadIncident;
2940    private javax.swing.JButton maintenanceRadioButton;
2941    private javax.swing.JMenuItem newIncident;
2942    private javax.swing.JButton okButton;
2943    private javax.swing.JButton paramicsButton;
2944    private javax.swing.JMenuItem popupDeleteIncident;
2945    private javax.swing.JButton radioEvalButton;
2946    private javax.swing.JMenuItem radioEvent;
2947    private javax.swing.JFrame radioEventFrame;
2948    private javax.swing.JTextArea radioMessage;
2949    private javax.swing.JScrollPane radioMessageScrollPane;
2950    private javax.swing.JComboBox radioTypeComboBox;
2951    private javax.swing.JLabel radioTypeLabel;
2952    private javax.swing.JMenuItem saveIncident;
2953    private javax.swing.JMenuBar scriptBuilderMenuBar;
2954    private javax.swing.JList scriptEventsList;
2955    private javax.swing.JScrollPane scriptEventsPane;
2956    private javax.swing.JPanel scriptEventsPanel;
2957    private javax.swing.JPanel scriptEventsPanel1;
2958    private javax.swing.JButton selectButton;
2959    private javax.swing.JButton telephoneButton;
2960    private scriptbuilder.gui.panels.TimeStampPanel timeStampPanel;
2961    private javax.swing.JScrollPane timeStampScrollPane;
2962    private scriptbuilder.gui.panels.TimelineTickPanel timelineTickPanel;
2963    private javax.swing.JScrollPane timelinesScrollPane;
2964    private javax.swing.JButton tmtRadioButton;
2965    private javax.swing.JButton towButton;
2966    private javax.swing.JButton unitButton;
2967    private javax.swing.JButton witnessButton;
2968    private javax.swing.JLabel zoomInIcon;
2969    private javax.swing.JLabel zoomOutIcon;
2970    private javax.swing.JSlider zoomSlider;
2971    // End of variables declaration//GEN-END:variables
2972}
Note: See TracBrowser for help on using the repository browser.