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

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

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

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