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

Revision 52, 139.9 KB checked in by bmcguffin, 9 years ago (diff)

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

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