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

Revision 139, 115.0 KB checked in by bmcguffin, 8 years ago (diff)

Incident properties frame now displays color hex code of currently selected color.

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.Desktop;
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.net.URI;
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.JFileChooser;
26import javax.swing.JOptionPane;
27import javax.swing.SwingConstants;
28import javax.swing.UIManager;
29import javax.swing.UnsupportedLookAndFeelException;
30import javax.swing.event.ChangeEvent;
31import scriptbuilder.gui.panels.IncidentTimelinePanel;
32import scriptbuilder.structures.ScriptEvent;
33import scriptbuilder.structures.ScriptEvent.ScriptEventType;
34import scriptbuilder.structures.ScriptIncident;
35import scriptbuilder.structures.ScriptIncident.IncidentFocusedEvent;
36import scriptbuilder.structures.ScriptIncident.SliceChangedEvent;
37import scriptbuilder.structures.SimulationScript;
38import scriptbuilder.structures.TimeSlice;
39import scriptbuilder.structures.events.I_ScriptEvent;
40
41/**
42 * GUI for the script builder. Contains all panels and editor elements. Performs
43 * updates to reflect script model, which it observes.
44 *
45 * @author Greg Eddington
46 * @author Bryan McGuffin
47 */
48public class ScriptBuilderFrame extends javax.swing.JFrame implements Observer
49{
50
51    /**
52     * The script model.
53     */
54    private SimulationScript script;
55    /**
56     * The current type of selected event.
57     */
58    public ScriptEventType currentEventType;
59    /**
60     * True if we are currently editing an incident.
61     */
62    private boolean editingIncident;
63    /**
64     * Index of the previous incident.
65     */
66    private int oldIncidentIndex;
67
68    /**
69     * Get the script currently in use.
70     *
71     * @return the script model object
72     */
73    public SimulationScript getScript()
74    {
75        return script;
76    }
77
78    /**
79     * Listener for the scroll pane.
80     */
81    class MyAdjustmentListener implements AdjustmentListener
82    {
83
84        /**
85         * If the incident timeline is scrolled horizontally, the timestamp
86         * panel is updated to reflect it.
87         *
88         * @param evt the adjustment event
89         */
90        @Override
91        public void adjustmentValueChanged(AdjustmentEvent evt)
92        {
93            if (evt.getAdjustable().getOrientation() == Adjustable.HORIZONTAL)
94            {
95                timeStampScrollPane.getHorizontalScrollBar()
96                        .setValue(timelinesScrollPane.getHorizontalScrollBar().getValue());
97            }
98            else
99            {
100                // Event from vertical scrollbar
101            }
102
103            repaint();
104        }
105    }
106
107    /**
108     * Listener for key presses. Used for hotkeys for different event types.
109     */
110    private class TimelineKeyListener implements KeyListener
111    {
112
113        /**
114         * If a hotkey is pressed, select that type of event.
115         *
116         * @param e the key event
117         */
118        @Override
119        public void keyPressed(KeyEvent e)
120        {
121            repaint();
122        }
123
124        /**
125         * Take no action upon key release.
126         *
127         * @param e the key event
128         */
129        @Override
130        public void keyReleased(KeyEvent e)
131        {
132        }
133
134        /**
135         * Take no action upon key release.
136         *
137         * @param e the key event
138         */
139        @Override
140        public void keyTyped(KeyEvent e)
141        {
142        }
143    }
144
145    /**
146     * Constructor. Prep new script model, initialize the GUI, and add listeners
147     * for all buttons.
148     */
149    public ScriptBuilderFrame()
150    {
151        script = new SimulationScript();
152        script.addObserver(this);
153        initComponents();
154        //We don't currently want the button to be present in this window
155        btnAddTime.setVisible(false);
156        this.update(null, script);
157
158        // Hack to refresh the zoom
159        /*
160         zoomSlider.setValue(zoomSlider.getValue() - 1);
161         zoomSlider.setValue(zoomSlider.getValue() + 1);
162         */
163        // Set listener for scroll pane
164        String t = "Script Builder: ";
165        if (script.saveFile == null)
166        {
167            t += "untitled1.xml";
168        }
169        else
170        {
171            t += script.saveFile.getName();
172        }
173        this.setTitle(t);
174        AdjustmentListener listener = new MyAdjustmentListener();
175        timelinesScrollPane.getHorizontalScrollBar().addAdjustmentListener(listener);
176        timelinesScrollPane.getVerticalScrollBar().addAdjustmentListener(listener);
177        repaint();
178
179    }
180
181    /**
182     * Update the GUI to reflect the model. If the script changed, update all
183     * the incident panels. If a timeslice changed, add any new events to the
184     * model. If an incident gained focus, update the incident info screen to
185     * display its details.
186     *
187     * @param o The observed object
188     * @param arg Either the script model or an incident event, depending on who
189     * called this update
190     */
191    @Override
192    public void update(Observable o, Object arg)
193    {
194        //Three major update types: whole script, and 2 event updates
195        if (arg instanceof SimulationScript)
196        {
197            script = (SimulationScript) arg;
198
199            //If we don't have exactly 10 events something is wrong
200            if (script.incidents.size() != 10)
201            {
202                return;
203            }
204
205            //Call update on major panels
206            timelineTickPanel.update(script);
207            timeStampPanel.update(script);
208
209            //Call update on all timeline panels
210            incidentTimelinePanel1.timelinePanelUpdate(script.incidents.get(0));
211            incidentTimelinePanel2.timelinePanelUpdate(script.incidents.get(1));
212            incidentTimelinePanel3.timelinePanelUpdate(script.incidents.get(2));
213            incidentTimelinePanel4.timelinePanelUpdate(script.incidents.get(3));
214            incidentTimelinePanel5.timelinePanelUpdate(script.incidents.get(4));
215            incidentTimelinePanel6.timelinePanelUpdate(script.incidents.get(5));
216            incidentTimelinePanel7.timelinePanelUpdate(script.incidents.get(6));
217            incidentTimelinePanel8.timelinePanelUpdate(script.incidents.get(7));
218            incidentTimelinePanel9.timelinePanelUpdate(script.incidents.get(8));
219            incidentTimelinePanel10.timelinePanelUpdate(script.incidents.get(9));
220
221            //Cal update on number panels
222            incidentNumberPanel1.update(script.incidents.get(0));
223            incidentNumberPanel2.update(script.incidents.get(1));
224            incidentNumberPanel3.update(script.incidents.get(2));
225            incidentNumberPanel4.update(script.incidents.get(3));
226            incidentNumberPanel5.update(script.incidents.get(4));
227            incidentNumberPanel6.update(script.incidents.get(5));
228            incidentNumberPanel7.update(script.incidents.get(6));
229            incidentNumberPanel8.update(script.incidents.get(7));
230            incidentNumberPanel9.update(script.incidents.get(8));
231            incidentNumberPanel10.update(script.incidents.get(9));
232
233            /**
234             * DefaultComboBoxModel model = new DefaultComboBoxModel(); for
235             * (ScriptIncident i : script.incidents) { if (i != null)
236             * model.addElement(i); } gotoIncident.setModel(model);*
237             */
238            this.setPreferredSize(this.getSize());
239            pack();
240        }
241        //Mouse has changed focus to a different timeslice
242        else if (arg instanceof SliceChangedEvent)
243        {
244            TimeSlice slice = ((SliceChangedEvent) arg).slice;
245
246            DefaultListModel model = new DefaultListModel();
247            for (I_ScriptEvent e : slice.events)
248            {
249                model.addElement(e);
250            }
251        }
252        //Mouse has changed focus to a different incident timeline panel
253        else if (arg instanceof IncidentFocusedEvent)
254        {
255            ScriptIncident i = ((IncidentFocusedEvent) arg).incident;
256
257            //gotoIncident.setSelectedItem(i);
258        }
259
260        //Regardless of update type, refresh window by doing these things:
261        //Enable "+15:00" button if script is not empty
262        btnAddTime.setEnabled(script != null && script.numberOfIncidents > 0);
263
264        //enable zoom slider if script is not empty
265        zoomSlider.setEnabled(script != null && script.numberOfIncidents > 0);
266
267        //scale the zoom slider such that the most zoomed-out point allows the
268        //entire script to be visible at once
269        zoomSlider.setMinimum(((timelineTickPanel.getVisibleRect().width - 20)
270                * ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION)
271                / Math.max(script.absoluteLength(), ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH));
272        zoomSlider.setMaximum(zoomSlider.getMinimum() + 20);
273        String t = "Script Builder: ";
274        if (script.saveFile == null)
275        {
276            t += "untitled1.xml";
277        }
278        else
279        {
280            t += script.saveFile.getName();
281        }
282        this.setTitle(t);
283        repaint();
284    }
285
286    /**
287     * This method is called from within the constructor to initialize the form.
288     * WARNING: Do NOT modify this code. The content of this method is always
289     * regenerated by the Form Editor.
290     */
291    @SuppressWarnings("unchecked")
292    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
293    private void initComponents()
294    {
295
296        incidentPopupMenu = new javax.swing.JPopupMenu();
297        popupDeleteIncident = new javax.swing.JMenuItem();
298        eventPopupMenu = new javax.swing.JPopupMenu();
299        cadEvent = new javax.swing.JMenuItem();
300        jMenuItem2 = new javax.swing.JMenuItem();
301        radioEvent = new javax.swing.JMenuItem();
302        jMenuItem4 = new javax.swing.JMenuItem();
303        jMenuItem5 = new javax.swing.JMenuItem();
304        jMenuItem6 = new javax.swing.JMenuItem();
305        cadEventFrame = new javax.swing.JFrame();
306        labelCADEntry = new javax.swing.JLabel();
307        radioEventFrame = new javax.swing.JFrame();
308        labelRadioType = new javax.swing.JLabel();
309        labelRadioMessage = new javax.swing.JLabel();
310        radioTypeComboBox = new javax.swing.JComboBox();
311        radioMessageScrollPane = new javax.swing.JScrollPane();
312        radioMessage = new javax.swing.JTextArea();
313        okButton = new javax.swing.JButton();
314        cancelButton = new javax.swing.JButton();
315        eventListPopupMenu = new javax.swing.JPopupMenu();
316        editEventList = new javax.swing.JMenuItem();
317        deleteEventList = new javax.swing.JMenuItem();
318        incidentFrame = new javax.swing.JFrame();
319        labelIncidentNumber = new javax.swing.JLabel();
320        labelIncidentName = new javax.swing.JLabel();
321        labelIncidentColor = new javax.swing.JLabel();
322        labelIncidentDescription = new javax.swing.JLabel();
323        incidentPropertiesScrollPane = new javax.swing.JScrollPane();
324        addIncidentDescription = new javax.swing.JTextArea();
325        incidentOkButton = new javax.swing.JButton();
326        incidentCancelButton = new javax.swing.JButton();
327        addIncidentNumber = new javax.swing.JSpinner();
328        addIncidentName = new javax.swing.JTextField();
329        labelIncidentLength = new javax.swing.JLabel();
330        labelIncidentStart = new javax.swing.JLabel();
331        addIncidentStart = new javax.swing.JSpinner();
332        btnChooseColor = new javax.swing.JButton();
333        incidentColorField = new javax.swing.JTextField();
334        txtIncidentLength = new javax.swing.JLabel();
335        addNoiseFrame = new javax.swing.JFrame();
336        labelRadioChatter = new javax.swing.JLabel();
337        radioChatterSlider = new javax.swing.JSlider();
338        laneClosuresSlider = new javax.swing.JSlider();
339        labelLaneClosures = new javax.swing.JLabel();
340        TMCALSlider = new javax.swing.JSlider();
341        labelTMCALLogs = new javax.swing.JLabel();
342        txtNoiseDescription = new javax.swing.JTextArea();
343        backgroundNoiseSlider = new javax.swing.JSlider();
344        labelBackgroundNoise = new javax.swing.JLabel();
345        minorEventsSlider = new javax.swing.JSlider();
346        labelMinorEvents = new javax.swing.JLabel();
347        btnCancelNoise = new javax.swing.JButton();
348        btnGenerateNoise = new javax.swing.JButton();
349        labelLeastFreq = new javax.swing.JLabel();
350        labelMostFreq = new javax.swing.JLabel();
351        incidentColorChooser = new javax.swing.JColorChooser();
352        timelinesScrollPane = new javax.swing.JScrollPane();
353        timelineTickPanel = new scriptbuilder.gui.panels.TimelineTickPanel();
354        incidentTimelinePanel1 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
355        incidentTimelinePanel2 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
356        incidentTimelinePanel8 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
357        incidentTimelinePanel3 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
358        incidentTimelinePanel6 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
359        incidentTimelinePanel5 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
360        incidentTimelinePanel4 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
361        incidentTimelinePanel7 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
362        incidentTimelinePanel10 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
363        incidentTimelinePanel9 = new scriptbuilder.gui.panels.IncidentTimelinePanel();
364        incidentNumberPanel1 = new scriptbuilder.gui.panels.IncidentNumberPanel();
365        incidentNumberPanel2 = new scriptbuilder.gui.panels.IncidentNumberPanel();
366        incidentNumberPanel3 = new scriptbuilder.gui.panels.IncidentNumberPanel();
367        incidentNumberPanel4 = new scriptbuilder.gui.panels.IncidentNumberPanel();
368        incidentNumberPanel5 = new scriptbuilder.gui.panels.IncidentNumberPanel();
369        incidentNumberPanel6 = new scriptbuilder.gui.panels.IncidentNumberPanel();
370        incidentNumberPanel7 = new scriptbuilder.gui.panels.IncidentNumberPanel();
371        incidentNumberPanel8 = new scriptbuilder.gui.panels.IncidentNumberPanel();
372        incidentNumberPanel9 = new scriptbuilder.gui.panels.IncidentNumberPanel();
373        incidentNumberPanel10 = new scriptbuilder.gui.panels.IncidentNumberPanel();
374        zoomSlider = new javax.swing.JSlider();
375        zoomInIcon = new javax.swing.JLabel();
376        zoomOutIcon = new javax.swing.JLabel();
377        timeStampScrollPane = new javax.swing.JScrollPane();
378        timeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel();
379        btnAddTime = new javax.swing.JButton();
380        scriptBuilderMenuBar = new javax.swing.JMenuBar();
381        fileMenu = new javax.swing.JMenu();
382        fileNew = new javax.swing.JMenuItem();
383        jSeparator1 = new javax.swing.JPopupMenu.Separator();
384        fileOpen = new javax.swing.JMenuItem();
385        jSeparator2 = new javax.swing.JPopupMenu.Separator();
386        fileSave = new javax.swing.JMenuItem();
387        fileSaveAs = new javax.swing.JMenuItem();
388        generateMenu = new javax.swing.JMenu();
389        generateNotebooks = new javax.swing.JMenuItem();
390        generateWebNotebook = new javax.swing.JMenuItem();
391        generateScorecards = new javax.swing.JMenuItem();
392        generateOrganizationChart = new javax.swing.JMenuItem();
393        jSeparator3 = new javax.swing.JPopupMenu.Separator();
394        generateProjectRequirements = new javax.swing.JMenuItem();
395        incidentMenu = new javax.swing.JMenu();
396        newIncident = new javax.swing.JMenuItem();
397        deleteIncident = new javax.swing.JMenuItem();
398        jSeparator4 = new javax.swing.JPopupMenu.Separator();
399        saveIncident = new javax.swing.JMenuItem();
400        loadIncident = new javax.swing.JMenuItem();
401        generateNoiseMenu = new javax.swing.JMenu();
402        generateNoiseOption = new javax.swing.JMenuItem();
403        helpMenu = new javax.swing.JMenu();
404        helpTutorial = new javax.swing.JMenuItem();
405        helpAbout = new javax.swing.JMenuItem();
406
407        popupDeleteIncident.setText("Delete Incident...");
408        incidentPopupMenu.add(popupDeleteIncident);
409
410        cadEvent.setText("CAD Event");
411        cadEvent.addMouseListener(new java.awt.event.MouseAdapter()
412        {
413            public void mousePressed(java.awt.event.MouseEvent evt)
414            {
415                cadEventMousePressed(evt);
416            }
417            public void mouseReleased(java.awt.event.MouseEvent evt)
418            {
419                cadEventMouseReleased(evt);
420            }
421        });
422        cadEvent.addActionListener(new java.awt.event.ActionListener()
423        {
424            public void actionPerformed(java.awt.event.ActionEvent evt)
425            {
426                cadEventActionPerformed(evt);
427            }
428        });
429        eventPopupMenu.add(cadEvent);
430
431        jMenuItem2.setText("Paramics Event");
432        eventPopupMenu.add(jMenuItem2);
433
434        radioEvent.setText("Radio Event");
435        radioEvent.addMouseListener(new java.awt.event.MouseAdapter()
436        {
437            public void mousePressed(java.awt.event.MouseEvent evt)
438            {
439                radioEventMousePressed(evt);
440            }
441        });
442        eventPopupMenu.add(radioEvent);
443
444        jMenuItem4.setText("Telephone Event");
445        eventPopupMenu.add(jMenuItem4);
446
447        jMenuItem5.setText("Video Event");
448        eventPopupMenu.add(jMenuItem5);
449
450        jMenuItem6.setText("Evaluation Event");
451        eventPopupMenu.add(jMenuItem6);
452
453        cadEventFrame.setMinimumSize(new java.awt.Dimension(400, 300));
454
455        labelCADEntry.setText("CAD Entry");
456
457        javax.swing.GroupLayout cadEventFrameLayout = new javax.swing.GroupLayout(cadEventFrame.getContentPane());
458        cadEventFrame.getContentPane().setLayout(cadEventFrameLayout);
459        cadEventFrameLayout.setHorizontalGroup(
460            cadEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
461            .addGroup(cadEventFrameLayout.createSequentialGroup()
462                .addContainerGap()
463                .addComponent(labelCADEntry, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
464                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
465        );
466        cadEventFrameLayout.setVerticalGroup(
467            cadEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
468            .addGroup(cadEventFrameLayout.createSequentialGroup()
469                .addContainerGap()
470                .addComponent(labelCADEntry)
471                .addContainerGap(1357, Short.MAX_VALUE))
472        );
473
474        radioEventFrame.setTitle("Add Radio Event");
475        radioEventFrame.setMinimumSize(new java.awt.Dimension(400, 300));
476
477        labelRadioType.setText("Radio Type:");
478
479        labelRadioMessage.setText("Radio Message:");
480
481        radioTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "TMT", "Maintanence" }));
482
483        radioMessageScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
484
485        radioMessage.setColumns(20);
486        radioMessage.setLineWrap(true);
487        radioMessage.setRows(5);
488        radioMessage.setWrapStyleWord(true);
489        radioMessageScrollPane.setViewportView(radioMessage);
490
491        okButton.setText("OK");
492        okButton.addActionListener(new java.awt.event.ActionListener()
493        {
494            public void actionPerformed(java.awt.event.ActionEvent evt)
495            {
496                okButtonActionPerformed(evt);
497            }
498        });
499
500        cancelButton.setText("Cancel");
501        cancelButton.addActionListener(new java.awt.event.ActionListener()
502        {
503            public void actionPerformed(java.awt.event.ActionEvent evt)
504            {
505                cancelButtonActionPerformed(evt);
506            }
507        });
508
509        javax.swing.GroupLayout radioEventFrameLayout = new javax.swing.GroupLayout(radioEventFrame.getContentPane());
510        radioEventFrame.getContentPane().setLayout(radioEventFrameLayout);
511        radioEventFrameLayout.setHorizontalGroup(
512            radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
513            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, radioEventFrameLayout.createSequentialGroup()
514                .addContainerGap()
515                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
516                    .addComponent(radioMessageScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
517                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, radioEventFrameLayout.createSequentialGroup()
518                        .addComponent(labelRadioType)
519                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
520                        .addComponent(radioTypeComboBox, 0, 312, Short.MAX_VALUE))
521                    .addComponent(labelRadioMessage, javax.swing.GroupLayout.Alignment.LEADING)
522                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, radioEventFrameLayout.createSequentialGroup()
523                        .addComponent(cancelButton)
524                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 246, Short.MAX_VALUE)
525                        .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))
526                .addContainerGap())
527        );
528        radioEventFrameLayout.setVerticalGroup(
529            radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
530            .addGroup(radioEventFrameLayout.createSequentialGroup()
531                .addContainerGap()
532                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
533                    .addComponent(labelRadioType)
534                    .addComponent(radioTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
535                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
536                .addComponent(labelRadioMessage)
537                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
538                .addComponent(radioMessageScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
539                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
540                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
541                    .addComponent(okButton)
542                    .addComponent(cancelButton))
543                .addContainerGap())
544        );
545
546        editEventList.setText("Edit...");
547        editEventList.addActionListener(new java.awt.event.ActionListener()
548        {
549            public void actionPerformed(java.awt.event.ActionEvent evt)
550            {
551                editEventListActionPerformed(evt);
552            }
553        });
554        eventListPopupMenu.add(editEventList);
555
556        deleteEventList.setText("Delete...");
557        eventListPopupMenu.add(deleteEventList);
558
559        incidentFrame.setTitle("Incident");
560        incidentFrame.setMinimumSize(new java.awt.Dimension(400, 400));
561
562        labelIncidentNumber.setText("Incident Number: ");
563
564        labelIncidentName.setText("Incident Name:");
565
566        labelIncidentColor.setText("Incident Color: ");
567
568        labelIncidentDescription.setText("Incident Description:");
569
570        incidentPropertiesScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
571        incidentPropertiesScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
572
573        addIncidentDescription.setColumns(20);
574        addIncidentDescription.setLineWrap(true);
575        addIncidentDescription.setRows(5);
576        addIncidentDescription.setWrapStyleWord(true);
577        incidentPropertiesScrollPane.setViewportView(addIncidentDescription);
578
579        incidentOkButton.setText("OK");
580        incidentOkButton.addActionListener(new java.awt.event.ActionListener()
581        {
582            public void actionPerformed(java.awt.event.ActionEvent evt)
583            {
584                incidentOkButtonActionPerformed(evt);
585            }
586        });
587
588        incidentCancelButton.setText("Cancel");
589        incidentCancelButton.addActionListener(new java.awt.event.ActionListener()
590        {
591            public void actionPerformed(java.awt.event.ActionEvent evt)
592            {
593                incidentCancelButtonActionPerformed(evt);
594            }
595        });
596
597        addIncidentNumber.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(101), Integer.valueOf(101), null, Integer.valueOf(1)));
598
599        labelIncidentLength.setText("Incident Length in Minutes: ");
600
601        labelIncidentStart.setText("Incident Start Time in Minutes:");
602
603        addIncidentStart.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));
604
605        btnChooseColor.setText("Choose...");
606        btnChooseColor.addActionListener(new java.awt.event.ActionListener()
607        {
608            public void actionPerformed(java.awt.event.ActionEvent evt)
609            {
610                btnChooseColorActionPerformed(evt);
611            }
612        });
613
614        incidentColorField.setEditable(false);
615        incidentColorField.setBackground(new java.awt.Color(0, 0, 0));
616
617        txtIncidentLength.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
618        txtIncidentLength.setText("0");
619        txtIncidentLength.setToolTipText("");
620
621        javax.swing.GroupLayout incidentFrameLayout = new javax.swing.GroupLayout(incidentFrame.getContentPane());
622        incidentFrame.getContentPane().setLayout(incidentFrameLayout);
623        incidentFrameLayout.setHorizontalGroup(
624            incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
625            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentFrameLayout.createSequentialGroup()
626                .addContainerGap()
627                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
628                    .addComponent(incidentPropertiesScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)
629                    .addComponent(labelIncidentDescription, javax.swing.GroupLayout.Alignment.LEADING)
630                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()
631                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
632                            .addComponent(labelIncidentNumber)
633                            .addComponent(labelIncidentName)
634                            .addComponent(labelIncidentColor))
635                        .addGap(18, 18, 18)
636                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
637                            .addComponent(addIncidentName, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
638                            .addComponent(addIncidentNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)
639                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentFrameLayout.createSequentialGroup()
640                                .addComponent(incidentColorField, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
641                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
642                                .addComponent(btnChooseColor, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))))
643                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()
644                        .addComponent(incidentCancelButton)
645                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 188, Short.MAX_VALUE)
646                        .addComponent(incidentOkButton, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
647                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()
648                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
649                            .addComponent(labelIncidentStart)
650                            .addComponent(labelIncidentLength))
651                        .addGap(18, 18, 18)
652                        .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
653                            .addGroup(incidentFrameLayout.createSequentialGroup()
654                                .addGap(6, 6, 6)
655                                .addComponent(txtIncidentLength, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
656                                .addGap(22, 22, 22))
657                            .addComponent(addIncidentStart, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE))))
658                .addContainerGap())
659        );
660        incidentFrameLayout.setVerticalGroup(
661            incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
662            .addGroup(incidentFrameLayout.createSequentialGroup()
663                .addContainerGap()
664                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
665                    .addComponent(labelIncidentNumber)
666                    .addComponent(addIncidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
667                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
668                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
669                    .addComponent(labelIncidentName)
670                    .addComponent(addIncidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
671                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
672                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
673                    .addComponent(labelIncidentColor)
674                    .addComponent(btnChooseColor)
675                    .addComponent(incidentColorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
676                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
677                .addComponent(labelIncidentDescription)
678                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
679                .addComponent(incidentPropertiesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)
680                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
681                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
682                    .addComponent(addIncidentStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
683                    .addComponent(labelIncidentStart))
684                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
685                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
686                    .addComponent(labelIncidentLength)
687                    .addComponent(txtIncidentLength))
688                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
689                .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
690                    .addComponent(incidentCancelButton)
691                    .addComponent(incidentOkButton))
692                .addContainerGap())
693        );
694
695        addNoiseFrame.setTitle("Generate Noise");
696        addNoiseFrame.setMinimumSize(new java.awt.Dimension(395, 315));
697        addNoiseFrame.setResizable(false);
698
699        labelRadioChatter.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
700        labelRadioChatter.setText("Radio Chatter: ");
701
702        labelLaneClosures.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
703        labelLaneClosures.setText("Lane Closures:");
704
705        labelTMCALLogs.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
706        labelTMCALLogs.setText("TMCAL Logs:");
707
708        txtNoiseDescription.setEditable(false);
709        txtNoiseDescription.setColumns(20);
710        txtNoiseDescription.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
711        txtNoiseDescription.setLineWrap(true);
712        txtNoiseDescription.setRows(5);
713        txtNoiseDescription.setText("Noise events will be randomly generated for the simulation with frequencies based on the control selections made below");
714        txtNoiseDescription.setWrapStyleWord(true);
715        txtNoiseDescription.setAutoscrolls(false);
716        txtNoiseDescription.setBorder(null);
717        txtNoiseDescription.setDisabledTextColor(new java.awt.Color(0, 0, 0));
718        txtNoiseDescription.setFocusable(false);
719        txtNoiseDescription.setOpaque(false);
720
721        labelBackgroundNoise.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
722        labelBackgroundNoise.setText("Background Noise: ");
723
724        labelMinorEvents.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
725        labelMinorEvents.setText("Minor Events:");
726
727        btnCancelNoise.setText("Cancel");
728        btnCancelNoise.addActionListener(new java.awt.event.ActionListener()
729        {
730            public void actionPerformed(java.awt.event.ActionEvent evt)
731            {
732                btnCancelNoiseActionPerformed(evt);
733            }
734        });
735
736        btnGenerateNoise.setText("Generate");
737        btnGenerateNoise.addActionListener(new java.awt.event.ActionListener()
738        {
739            public void actionPerformed(java.awt.event.ActionEvent evt)
740            {
741                btnGenerateNoiseActionPerformed(evt);
742            }
743        });
744
745        labelLeastFreq.setText("Least Frequent");
746
747        labelMostFreq.setText("Most Frequent");
748
749        javax.swing.GroupLayout addNoiseFrameLayout = new javax.swing.GroupLayout(addNoiseFrame.getContentPane());
750        addNoiseFrame.getContentPane().setLayout(addNoiseFrameLayout);
751        addNoiseFrameLayout.setHorizontalGroup(
752            addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
753            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
754                .addContainerGap(21, Short.MAX_VALUE)
755                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
756                    .addComponent(txtNoiseDescription, javax.swing.GroupLayout.Alignment.LEADING)
757                    .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
758                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup()
759                            .addComponent(btnCancelNoise)
760                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
761                            .addComponent(btnGenerateNoise))
762                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup()
763                            .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
764                                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
765                                    .addComponent(labelBackgroundNoise)
766                                    .addComponent(labelLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
767                                    .addComponent(labelTMCALLogs, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
768                                    .addComponent(labelRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
769                                .addComponent(labelMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
770                            .addGap(4, 4, 4)
771                            .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
772                                .addComponent(radioChatterSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
773                                .addComponent(laneClosuresSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
774                                .addComponent(TMCALSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
775                                .addComponent(minorEventsSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
776                                .addComponent(backgroundNoiseSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
777                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
778                                    .addComponent(labelLeastFreq)
779                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
780                                    .addComponent(labelMostFreq))))))
781                .addGap(20, 20, 20))
782        );
783        addNoiseFrameLayout.setVerticalGroup(
784            addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
785            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
786                .addContainerGap()
787                .addComponent(txtNoiseDescription, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
788                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
789                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
790                    .addComponent(labelMostFreq)
791                    .addComponent(labelLeastFreq))
792                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
793                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
794                    .addComponent(labelRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
795                    .addComponent(radioChatterSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
796                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
797                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
798                    .addComponent(labelLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
799                    .addComponent(laneClosuresSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
800                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
801                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
802                    .addComponent(labelTMCALLogs)
803                    .addComponent(TMCALSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
804                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
805                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
806                    .addComponent(backgroundNoiseSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
807                    .addComponent(labelBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
808                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
809                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
810                    .addComponent(minorEventsSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
811                    .addComponent(labelMinorEvents))
812                .addGap(18, 18, 18)
813                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
814                    .addComponent(btnCancelNoise)
815                    .addComponent(btnGenerateNoise))
816                .addContainerGap())
817        );
818
819        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
820        setTitle("Script Builder");
821        setBounds(new java.awt.Rectangle(0, 23, 800, 700));
822        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
823        setMinimumSize(new java.awt.Dimension(800, 700));
824
825        timelinesScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
826        timelinesScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
827        timelinesScrollPane.setFocusCycleRoot(true);
828        timelinesScrollPane.setFocusTraversalPolicyProvider(true);
829        timelinesScrollPane.setPreferredSize(new java.awt.Dimension(72000, 1341));
830        timelinesScrollPane.setWheelScrollingEnabled(false);
831
832        timelineTickPanel.setMaximumSize(new java.awt.Dimension(7200, 32767));
833        timelineTickPanel.setMinimumSize(new java.awt.Dimension(7200, 0));
834        timelineTickPanel.setPreferredSize(new java.awt.Dimension(7200, 1317));
835
836        incidentTimelinePanel1.setMaximumSize(new java.awt.Dimension(32767, 100));
837        incidentTimelinePanel1.setOpaque(false);
838        incidentTimelinePanel1.setPreferredSize(new java.awt.Dimension(691, 100));
839
840        javax.swing.GroupLayout incidentTimelinePanel1Layout = new javax.swing.GroupLayout(incidentTimelinePanel1);
841        incidentTimelinePanel1.setLayout(incidentTimelinePanel1Layout);
842        incidentTimelinePanel1Layout.setHorizontalGroup(
843            incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
844            .addGap(0, 691, Short.MAX_VALUE)
845        );
846        incidentTimelinePanel1Layout.setVerticalGroup(
847            incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
848            .addGap(0, 100, Short.MAX_VALUE)
849        );
850
851        incidentTimelinePanel2.setOpaque(false);
852
853        javax.swing.GroupLayout incidentTimelinePanel2Layout = new javax.swing.GroupLayout(incidentTimelinePanel2);
854        incidentTimelinePanel2.setLayout(incidentTimelinePanel2Layout);
855        incidentTimelinePanel2Layout.setHorizontalGroup(
856            incidentTimelinePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
857            .addGap(0, 0, Short.MAX_VALUE)
858        );
859        incidentTimelinePanel2Layout.setVerticalGroup(
860            incidentTimelinePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
861            .addGap(0, 0, Short.MAX_VALUE)
862        );
863
864        incidentTimelinePanel8.setOpaque(false);
865
866        javax.swing.GroupLayout incidentTimelinePanel8Layout = new javax.swing.GroupLayout(incidentTimelinePanel8);
867        incidentTimelinePanel8.setLayout(incidentTimelinePanel8Layout);
868        incidentTimelinePanel8Layout.setHorizontalGroup(
869            incidentTimelinePanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
870            .addGap(0, 0, Short.MAX_VALUE)
871        );
872        incidentTimelinePanel8Layout.setVerticalGroup(
873            incidentTimelinePanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
874            .addGap(0, 0, Short.MAX_VALUE)
875        );
876
877        incidentTimelinePanel3.setOpaque(false);
878
879        javax.swing.GroupLayout incidentTimelinePanel3Layout = new javax.swing.GroupLayout(incidentTimelinePanel3);
880        incidentTimelinePanel3.setLayout(incidentTimelinePanel3Layout);
881        incidentTimelinePanel3Layout.setHorizontalGroup(
882            incidentTimelinePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
883            .addGap(0, 0, Short.MAX_VALUE)
884        );
885        incidentTimelinePanel3Layout.setVerticalGroup(
886            incidentTimelinePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
887            .addGap(0, 0, Short.MAX_VALUE)
888        );
889
890        incidentTimelinePanel6.setOpaque(false);
891
892        javax.swing.GroupLayout incidentTimelinePanel6Layout = new javax.swing.GroupLayout(incidentTimelinePanel6);
893        incidentTimelinePanel6.setLayout(incidentTimelinePanel6Layout);
894        incidentTimelinePanel6Layout.setHorizontalGroup(
895            incidentTimelinePanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
896            .addGap(0, 0, Short.MAX_VALUE)
897        );
898        incidentTimelinePanel6Layout.setVerticalGroup(
899            incidentTimelinePanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
900            .addGap(0, 0, Short.MAX_VALUE)
901        );
902
903        incidentTimelinePanel5.setOpaque(false);
904
905        javax.swing.GroupLayout incidentTimelinePanel5Layout = new javax.swing.GroupLayout(incidentTimelinePanel5);
906        incidentTimelinePanel5.setLayout(incidentTimelinePanel5Layout);
907        incidentTimelinePanel5Layout.setHorizontalGroup(
908            incidentTimelinePanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
909            .addGap(0, 0, Short.MAX_VALUE)
910        );
911        incidentTimelinePanel5Layout.setVerticalGroup(
912            incidentTimelinePanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
913            .addGap(0, 0, Short.MAX_VALUE)
914        );
915
916        incidentTimelinePanel4.setOpaque(false);
917
918        javax.swing.GroupLayout incidentTimelinePanel4Layout = new javax.swing.GroupLayout(incidentTimelinePanel4);
919        incidentTimelinePanel4.setLayout(incidentTimelinePanel4Layout);
920        incidentTimelinePanel4Layout.setHorizontalGroup(
921            incidentTimelinePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
922            .addGap(0, 0, Short.MAX_VALUE)
923        );
924        incidentTimelinePanel4Layout.setVerticalGroup(
925            incidentTimelinePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
926            .addGap(0, 0, Short.MAX_VALUE)
927        );
928
929        incidentTimelinePanel7.setOpaque(false);
930
931        javax.swing.GroupLayout incidentTimelinePanel7Layout = new javax.swing.GroupLayout(incidentTimelinePanel7);
932        incidentTimelinePanel7.setLayout(incidentTimelinePanel7Layout);
933        incidentTimelinePanel7Layout.setHorizontalGroup(
934            incidentTimelinePanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
935            .addGap(0, 0, Short.MAX_VALUE)
936        );
937        incidentTimelinePanel7Layout.setVerticalGroup(
938            incidentTimelinePanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
939            .addGap(0, 0, Short.MAX_VALUE)
940        );
941
942        incidentTimelinePanel10.setOpaque(false);
943
944        javax.swing.GroupLayout incidentTimelinePanel10Layout = new javax.swing.GroupLayout(incidentTimelinePanel10);
945        incidentTimelinePanel10.setLayout(incidentTimelinePanel10Layout);
946        incidentTimelinePanel10Layout.setHorizontalGroup(
947            incidentTimelinePanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
948            .addGap(0, 0, Short.MAX_VALUE)
949        );
950        incidentTimelinePanel10Layout.setVerticalGroup(
951            incidentTimelinePanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
952            .addGap(0, 0, Short.MAX_VALUE)
953        );
954
955        incidentTimelinePanel9.setOpaque(false);
956
957        javax.swing.GroupLayout incidentTimelinePanel9Layout = new javax.swing.GroupLayout(incidentTimelinePanel9);
958        incidentTimelinePanel9.setLayout(incidentTimelinePanel9Layout);
959        incidentTimelinePanel9Layout.setHorizontalGroup(
960            incidentTimelinePanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
961            .addGap(0, 0, Short.MAX_VALUE)
962        );
963        incidentTimelinePanel9Layout.setVerticalGroup(
964            incidentTimelinePanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
965            .addGap(0, 0, Short.MAX_VALUE)
966        );
967
968        incidentNumberPanel1.setOpaque(false);
969
970        javax.swing.GroupLayout incidentNumberPanel1Layout = new javax.swing.GroupLayout(incidentNumberPanel1);
971        incidentNumberPanel1.setLayout(incidentNumberPanel1Layout);
972        incidentNumberPanel1Layout.setHorizontalGroup(
973            incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
974            .addGap(0, 0, Short.MAX_VALUE)
975        );
976        incidentNumberPanel1Layout.setVerticalGroup(
977            incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
978            .addGap(0, 0, Short.MAX_VALUE)
979        );
980
981        incidentNumberPanel2.setOpaque(false);
982
983        javax.swing.GroupLayout incidentNumberPanel2Layout = new javax.swing.GroupLayout(incidentNumberPanel2);
984        incidentNumberPanel2.setLayout(incidentNumberPanel2Layout);
985        incidentNumberPanel2Layout.setHorizontalGroup(
986            incidentNumberPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
987            .addGap(0, 0, Short.MAX_VALUE)
988        );
989        incidentNumberPanel2Layout.setVerticalGroup(
990            incidentNumberPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
991            .addGap(0, 0, Short.MAX_VALUE)
992        );
993
994        incidentNumberPanel3.setOpaque(false);
995
996        javax.swing.GroupLayout incidentNumberPanel3Layout = new javax.swing.GroupLayout(incidentNumberPanel3);
997        incidentNumberPanel3.setLayout(incidentNumberPanel3Layout);
998        incidentNumberPanel3Layout.setHorizontalGroup(
999            incidentNumberPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1000            .addGap(0, 0, Short.MAX_VALUE)
1001        );
1002        incidentNumberPanel3Layout.setVerticalGroup(
1003            incidentNumberPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1004            .addGap(0, 0, Short.MAX_VALUE)
1005        );
1006
1007        incidentNumberPanel4.setOpaque(false);
1008
1009        javax.swing.GroupLayout incidentNumberPanel4Layout = new javax.swing.GroupLayout(incidentNumberPanel4);
1010        incidentNumberPanel4.setLayout(incidentNumberPanel4Layout);
1011        incidentNumberPanel4Layout.setHorizontalGroup(
1012            incidentNumberPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1013            .addGap(0, 0, Short.MAX_VALUE)
1014        );
1015        incidentNumberPanel4Layout.setVerticalGroup(
1016            incidentNumberPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1017            .addGap(0, 0, Short.MAX_VALUE)
1018        );
1019
1020        incidentNumberPanel5.setOpaque(false);
1021
1022        javax.swing.GroupLayout incidentNumberPanel5Layout = new javax.swing.GroupLayout(incidentNumberPanel5);
1023        incidentNumberPanel5.setLayout(incidentNumberPanel5Layout);
1024        incidentNumberPanel5Layout.setHorizontalGroup(
1025            incidentNumberPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1026            .addGap(0, 0, Short.MAX_VALUE)
1027        );
1028        incidentNumberPanel5Layout.setVerticalGroup(
1029            incidentNumberPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1030            .addGap(0, 0, Short.MAX_VALUE)
1031        );
1032
1033        incidentNumberPanel6.setOpaque(false);
1034
1035        javax.swing.GroupLayout incidentNumberPanel6Layout = new javax.swing.GroupLayout(incidentNumberPanel6);
1036        incidentNumberPanel6.setLayout(incidentNumberPanel6Layout);
1037        incidentNumberPanel6Layout.setHorizontalGroup(
1038            incidentNumberPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1039            .addGap(0, 0, Short.MAX_VALUE)
1040        );
1041        incidentNumberPanel6Layout.setVerticalGroup(
1042            incidentNumberPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1043            .addGap(0, 0, Short.MAX_VALUE)
1044        );
1045
1046        incidentNumberPanel7.setOpaque(false);
1047
1048        javax.swing.GroupLayout incidentNumberPanel7Layout = new javax.swing.GroupLayout(incidentNumberPanel7);
1049        incidentNumberPanel7.setLayout(incidentNumberPanel7Layout);
1050        incidentNumberPanel7Layout.setHorizontalGroup(
1051            incidentNumberPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1052            .addGap(0, 0, Short.MAX_VALUE)
1053        );
1054        incidentNumberPanel7Layout.setVerticalGroup(
1055            incidentNumberPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1056            .addGap(0, 0, Short.MAX_VALUE)
1057        );
1058
1059        incidentNumberPanel8.setOpaque(false);
1060
1061        javax.swing.GroupLayout incidentNumberPanel8Layout = new javax.swing.GroupLayout(incidentNumberPanel8);
1062        incidentNumberPanel8.setLayout(incidentNumberPanel8Layout);
1063        incidentNumberPanel8Layout.setHorizontalGroup(
1064            incidentNumberPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1065            .addGap(0, 0, Short.MAX_VALUE)
1066        );
1067        incidentNumberPanel8Layout.setVerticalGroup(
1068            incidentNumberPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1069            .addGap(0, 0, Short.MAX_VALUE)
1070        );
1071
1072        incidentNumberPanel9.setOpaque(false);
1073
1074        javax.swing.GroupLayout incidentNumberPanel9Layout = new javax.swing.GroupLayout(incidentNumberPanel9);
1075        incidentNumberPanel9.setLayout(incidentNumberPanel9Layout);
1076        incidentNumberPanel9Layout.setHorizontalGroup(
1077            incidentNumberPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1078            .addGap(0, 0, Short.MAX_VALUE)
1079        );
1080        incidentNumberPanel9Layout.setVerticalGroup(
1081            incidentNumberPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1082            .addGap(0, 0, Short.MAX_VALUE)
1083        );
1084
1085        incidentNumberPanel10.setOpaque(false);
1086
1087        javax.swing.GroupLayout incidentNumberPanel10Layout = new javax.swing.GroupLayout(incidentNumberPanel10);
1088        incidentNumberPanel10.setLayout(incidentNumberPanel10Layout);
1089        incidentNumberPanel10Layout.setHorizontalGroup(
1090            incidentNumberPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1091            .addGap(0, 0, Short.MAX_VALUE)
1092        );
1093        incidentNumberPanel10Layout.setVerticalGroup(
1094            incidentNumberPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1095            .addGap(0, 0, Short.MAX_VALUE)
1096        );
1097
1098        javax.swing.GroupLayout timelineTickPanelLayout = new javax.swing.GroupLayout(timelineTickPanel);
1099        timelineTickPanel.setLayout(timelineTickPanelLayout);
1100        timelineTickPanelLayout.setHorizontalGroup(
1101            timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1102            .addGroup(timelineTickPanelLayout.createSequentialGroup()
1103                .addContainerGap()
1104                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1105                    .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1106                        .addComponent(incidentNumberPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1107                        .addComponent(incidentNumberPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1108                    .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1109                        .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1110                        .addComponent(incidentNumberPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1111                        .addComponent(incidentNumberPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1112                        .addComponent(incidentNumberPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1113                        .addComponent(incidentNumberPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1114                        .addComponent(incidentNumberPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1115                        .addComponent(incidentNumberPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1116                    .addComponent(incidentNumberPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1117                .addGap(10, 10, 10)
1118                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1119                    .addComponent(incidentTimelinePanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1120                    .addComponent(incidentTimelinePanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1121                    .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
1122                        .addComponent(incidentTimelinePanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1123                        .addComponent(incidentTimelinePanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1124                    .addComponent(incidentTimelinePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1125                    .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1126                    .addComponent(incidentTimelinePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1127                    .addComponent(incidentTimelinePanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1128                    .addComponent(incidentTimelinePanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1129                    .addComponent(incidentTimelinePanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1130                .addGap(190, 190, 190))
1131        );
1132        timelineTickPanelLayout.setVerticalGroup(
1133            timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1134            .addGroup(timelineTickPanelLayout.createSequentialGroup()
1135                .addContainerGap()
1136                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1137                    .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1138                    .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1139                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1140                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1141                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1142                        .addComponent(incidentNumberPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1143                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1144                        .addComponent(incidentNumberPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1145                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1146                        .addComponent(incidentNumberPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1147                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1148                        .addComponent(incidentNumberPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1149                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1150                        .addComponent(incidentNumberPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1151                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1152                        .addComponent(incidentTimelinePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1153                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1154                        .addComponent(incidentTimelinePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1155                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1156                        .addComponent(incidentTimelinePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1157                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1158                        .addComponent(incidentTimelinePanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1159                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1160                        .addComponent(incidentTimelinePanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
1161                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1162                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1163                    .addComponent(incidentTimelinePanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1164                    .addComponent(incidentNumberPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1165                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1166                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1167                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1168                        .addComponent(incidentTimelinePanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1169                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1170                        .addComponent(incidentTimelinePanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1171                    .addGroup(timelineTickPanelLayout.createSequentialGroup()
1172                        .addComponent(incidentNumberPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1173                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1174                        .addComponent(incidentNumberPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
1175                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1176                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1177                    .addComponent(incidentNumberPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1178                    .addComponent(incidentTimelinePanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1179                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1180        );
1181
1182        timelinesScrollPane.setViewportView(timelineTickPanel);
1183
1184        zoomSlider.setMaximum(22);
1185        zoomSlider.setMinimum(4);
1186        zoomSlider.setValue(4);
1187        zoomSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
1188        zoomSlider.setFocusable(false);
1189        zoomSlider.addChangeListener(new javax.swing.event.ChangeListener()
1190        {
1191            public void stateChanged(javax.swing.event.ChangeEvent evt)
1192            {
1193                zoomSliderStateChanged(evt);
1194            }
1195        });
1196
1197        zoomInIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomIn.png"))); // NOI18N
1198        zoomInIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1199        zoomInIcon.addMouseListener(new java.awt.event.MouseAdapter()
1200        {
1201            public void mouseClicked(java.awt.event.MouseEvent evt)
1202            {
1203                zoomInIconMouseClicked(evt);
1204            }
1205        });
1206
1207        zoomOutIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomOut.png"))); // NOI18N
1208        zoomOutIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1209        zoomOutIcon.addMouseListener(new java.awt.event.MouseAdapter()
1210        {
1211            public void mouseClicked(java.awt.event.MouseEvent evt)
1212            {
1213                zoomOutIconMouseClicked(evt);
1214            }
1215        });
1216
1217        timeStampScrollPane.setBorder(null);
1218        timeStampScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
1219        timeStampScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1220
1221        javax.swing.GroupLayout timeStampPanelLayout = new javax.swing.GroupLayout(timeStampPanel);
1222        timeStampPanel.setLayout(timeStampPanelLayout);
1223        timeStampPanelLayout.setHorizontalGroup(
1224            timeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1225            .addGap(0, 0, Short.MAX_VALUE)
1226        );
1227        timeStampPanelLayout.setVerticalGroup(
1228            timeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1229            .addGap(0, 0, Short.MAX_VALUE)
1230        );
1231
1232        timeStampScrollPane.setViewportView(timeStampPanel);
1233
1234        btnAddTime.setText("+15:00");
1235        btnAddTime.addActionListener(new java.awt.event.ActionListener()
1236        {
1237            public void actionPerformed(java.awt.event.ActionEvent evt)
1238            {
1239                btnAddTimeActionPerformed(evt);
1240            }
1241        });
1242
1243        fileMenu.setText("File");
1244        fileMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1245        fileMenu.addActionListener(new java.awt.event.ActionListener()
1246        {
1247            public void actionPerformed(java.awt.event.ActionEvent evt)
1248            {
1249                fileMenuActionPerformed(evt);
1250            }
1251        });
1252
1253        fileNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1254        fileNew.setText("New");
1255        fileNew.addActionListener(new java.awt.event.ActionListener()
1256        {
1257            public void actionPerformed(java.awt.event.ActionEvent evt)
1258            {
1259                fileNewActionPerformed(evt);
1260            }
1261        });
1262        fileMenu.add(fileNew);
1263        fileMenu.add(jSeparator1);
1264
1265        fileOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1266        fileOpen.setText("Open...");
1267        fileOpen.addActionListener(new java.awt.event.ActionListener()
1268        {
1269            public void actionPerformed(java.awt.event.ActionEvent evt)
1270            {
1271                fileOpenActionPerformed(evt);
1272            }
1273        });
1274        fileMenu.add(fileOpen);
1275        fileMenu.add(jSeparator2);
1276
1277        fileSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
1278        fileSave.setText("Save");
1279        fileSave.addActionListener(new java.awt.event.ActionListener()
1280        {
1281            public void actionPerformed(java.awt.event.ActionEvent evt)
1282            {
1283                fileSaveActionPerformed(evt);
1284            }
1285        });
1286        fileMenu.add(fileSave);
1287
1288        fileSaveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1289        fileSaveAs.setText("Save as...");
1290        fileSaveAs.addActionListener(new java.awt.event.ActionListener()
1291        {
1292            public void actionPerformed(java.awt.event.ActionEvent evt)
1293            {
1294                fileSaveAsActionPerformed(evt);
1295            }
1296        });
1297        fileMenu.add(fileSaveAs);
1298
1299        scriptBuilderMenuBar.add(fileMenu);
1300
1301        generateMenu.setLabel("Generate");
1302        generateMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1303
1304        generateNotebooks.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1305        generateNotebooks.setText("Generate Notebooks...");
1306        generateNotebooks.addActionListener(new java.awt.event.ActionListener()
1307        {
1308            public void actionPerformed(java.awt.event.ActionEvent evt)
1309            {
1310                generateNotebooksActionPerformed(evt);
1311            }
1312        });
1313        generateMenu.add(generateNotebooks);
1314
1315        generateWebNotebook.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1316        generateWebNotebook.setText("Generate Web Notebook...");
1317        generateWebNotebook.addActionListener(new java.awt.event.ActionListener()
1318        {
1319            public void actionPerformed(java.awt.event.ActionEvent evt)
1320            {
1321                generateWebNotebookActionPerformed(evt);
1322            }
1323        });
1324        generateMenu.add(generateWebNotebook);
1325
1326        generateScorecards.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1327        generateScorecards.setText("Generate Scorecards...");
1328        generateScorecards.addActionListener(new java.awt.event.ActionListener()
1329        {
1330            public void actionPerformed(java.awt.event.ActionEvent evt)
1331            {
1332                generateScorecardsActionPerformed(evt);
1333            }
1334        });
1335        generateMenu.add(generateScorecards);
1336
1337        generateOrganizationChart.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1338        generateOrganizationChart.setText("Generate D14 TMC Org Chart...");
1339        generateOrganizationChart.addActionListener(new java.awt.event.ActionListener()
1340        {
1341            public void actionPerformed(java.awt.event.ActionEvent evt)
1342            {
1343                generateOrganizationChartActionPerformed(evt);
1344            }
1345        });
1346        generateMenu.add(generateOrganizationChart);
1347        generateMenu.add(jSeparator3);
1348
1349        generateProjectRequirements.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
1350        generateProjectRequirements.setText("Generate Project Worklist...");
1351        generateProjectRequirements.addActionListener(new java.awt.event.ActionListener()
1352        {
1353            public void actionPerformed(java.awt.event.ActionEvent evt)
1354            {
1355                generateProjectRequirementsActionPerformed(evt);
1356            }
1357        });
1358        generateMenu.add(generateProjectRequirements);
1359
1360        scriptBuilderMenuBar.add(generateMenu);
1361
1362        incidentMenu.setText("Incidents");
1363        incidentMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1364
1365        newIncident.setText("New Incident...");
1366        newIncident.addActionListener(new java.awt.event.ActionListener()
1367        {
1368            public void actionPerformed(java.awt.event.ActionEvent evt)
1369            {
1370                newIncidentActionPerformed(evt);
1371            }
1372        });
1373        incidentMenu.add(newIncident);
1374
1375        deleteIncident.setText("Delete Incident");
1376        deleteIncident.addActionListener(new java.awt.event.ActionListener()
1377        {
1378            public void actionPerformed(java.awt.event.ActionEvent evt)
1379            {
1380                deleteIncidentActionPerformed(evt);
1381            }
1382        });
1383        incidentMenu.add(deleteIncident);
1384        incidentMenu.add(jSeparator4);
1385
1386        saveIncident.setText("Save Incident...");
1387        saveIncident.addActionListener(new java.awt.event.ActionListener()
1388        {
1389            public void actionPerformed(java.awt.event.ActionEvent evt)
1390            {
1391                saveIncidentActionPerformed(evt);
1392            }
1393        });
1394        incidentMenu.add(saveIncident);
1395
1396        loadIncident.setText("Load Incident...");
1397        loadIncident.addActionListener(new java.awt.event.ActionListener()
1398        {
1399            public void actionPerformed(java.awt.event.ActionEvent evt)
1400            {
1401                loadIncidentActionPerformed(evt);
1402            }
1403        });
1404        incidentMenu.add(loadIncident);
1405
1406        scriptBuilderMenuBar.add(incidentMenu);
1407
1408        generateNoiseMenu.setText("Noise");
1409
1410        generateNoiseOption.setText("Generate Noise...");
1411        generateNoiseOption.addActionListener(new java.awt.event.ActionListener()
1412        {
1413            public void actionPerformed(java.awt.event.ActionEvent evt)
1414            {
1415                generateNoiseOptionActionPerformed(evt);
1416            }
1417        });
1418        generateNoiseMenu.add(generateNoiseOption);
1419
1420        scriptBuilderMenuBar.add(generateNoiseMenu);
1421
1422        helpMenu.setText("Help");
1423        helpMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));
1424
1425        helpTutorial.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
1426        helpTutorial.setText("Tutorial...");
1427        helpTutorial.addActionListener(new java.awt.event.ActionListener()
1428        {
1429            public void actionPerformed(java.awt.event.ActionEvent evt)
1430            {
1431                helpTutorialActionPerformed(evt);
1432            }
1433        });
1434        helpMenu.add(helpTutorial);
1435
1436        helpAbout.setText("About...");
1437        helpAbout.addActionListener(new java.awt.event.ActionListener()
1438        {
1439            public void actionPerformed(java.awt.event.ActionEvent evt)
1440            {
1441                helpAboutActionPerformed(evt);
1442            }
1443        });
1444        helpMenu.add(helpAbout);
1445
1446        scriptBuilderMenuBar.add(helpMenu);
1447
1448        setJMenuBar(scriptBuilderMenuBar);
1449
1450        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
1451        getContentPane().setLayout(layout);
1452        layout.setHorizontalGroup(
1453            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1454            .addGroup(layout.createSequentialGroup()
1455                .addContainerGap()
1456                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1457                    .addComponent(timelinesScrollPane, 0, 0, Short.MAX_VALUE)
1458                    .addComponent(timeStampScrollPane)
1459                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1460                        .addGap(0, 604, Short.MAX_VALUE)
1461                        .addComponent(zoomOutIcon)
1462                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1463                        .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1464                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1465                        .addComponent(zoomInIcon)
1466                        .addGap(18, 18, 18)
1467                        .addComponent(btnAddTime)
1468                        .addGap(21, 21, 21)))
1469                .addContainerGap())
1470        );
1471        layout.setVerticalGroup(
1472            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1473            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1474                .addContainerGap()
1475                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1476                    .addComponent(zoomOutIcon)
1477                    .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1478                    .addComponent(zoomInIcon)
1479                    .addComponent(btnAddTime))
1480                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1481                .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
1482                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1483                .addComponent(timelinesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1289, Short.MAX_VALUE)
1484                .addContainerGap())
1485        );
1486
1487        pack();
1488    }// </editor-fold>//GEN-END:initComponents
1489
1490    /**
1491     * Scale the timeline width based on zoom slider position.
1492     *
1493     * @param evt the state change event
1494     */
1495    private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged
1496        //Changing the zoom level always refreshes the window
1497        ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue();
1498        this.update(script, script);
1499        pack();
1500        repaint();
1501    }//GEN-LAST:event_zoomSliderStateChanged
1502
1503    private void cadEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMousePressed
1504    }//GEN-LAST:event_cadEventMousePressed
1505
1506    private void radioEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radioEventMousePressed
1507    }//GEN-LAST:event_radioEventMousePressed
1508
1509    private void cadEventMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMouseReleased
1510    }//GEN-LAST:event_cadEventMouseReleased
1511
1512    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
1513    }//GEN-LAST:event_okButtonActionPerformed
1514
1515    /**
1516     * If cancel button is pressed, close radio event editor
1517     *
1518     * @param evt the button press event
1519     */
1520    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
1521        radioMessage.setText("");
1522        radioTypeComboBox.setSelectedIndex(0);
1523        radioEventFrame.setVisible(false);
1524    }//GEN-LAST:event_cancelButtonActionPerformed
1525
1526    private void editEventListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editEventListActionPerformed
1527    }//GEN-LAST:event_editEventListActionPerformed
1528
1529    /**
1530     * Executed when the "OK" button is pressed on the Incident editor. If
1531     * incident is new, and is valid, adds it to the model and updates. If
1532     * editing existing incident, verifies changes are valid and applies them.
1533     * Then closes editor window.
1534     *
1535     * @param evt the button press event
1536     */
1537    private void incidentOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentOkButtonActionPerformed
1538        if (!editingIncident)//adding new incident
1539        {
1540            boolean found = false;
1541            int indx = 0;
1542            // ALERT: Wacky logic follows
1543            // Examine all the incidents contained in this script
1544            for (ScriptIncident inci : script.incidents)
1545            {
1546                // If this spot in the list of incidents hasn't been assigned yet
1547                if (inci == null)
1548                {
1549                    found = true;
1550                    break;
1551                }
1552                ++indx;
1553                // Does the new incident number match an existing one?
1554                if (inci.number == (Integer) addIncidentNumber.getValue())
1555                {
1556                    JOptionPane.showMessageDialog(this, "Incident number already in use.",
1557                            "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
1558                    incidentFrame.setVisible(true);
1559                    return;
1560                }
1561            }
1562            // We examined all incidents and there wasn't an empty slot
1563            if (!found)
1564            {
1565                JOptionPane.showMessageDialog(this, "Script already has the max number of incidents.",
1566                        "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);
1567                incidentFrame.setVisible(true);
1568                // ALERT: exit from middle of method
1569                return;
1570            }
1571
1572            // We found a spot for the new incident
1573            script.incidents.remove(indx); // remove the null incident placeholder
1574            SimulationScript.incidentColors[indx] = selectedColor;
1575            // Add the new incident to the list
1576            script.incidents.add(indx,
1577                    new ScriptIncident(SimulationScript.incidentColors[indx],
1578                            (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),
1579                            script));
1580            script.incidents.get(indx).setOffset((Integer) addIncidentStart.getValue() * 60);
1581            script.numberOfIncidents++;
1582            IncidentEditorFrame editor = new IncidentEditorFrame(script.incidents.get(indx), this);
1583
1584            editor.setVisible(true);
1585        }
1586        else//editing existing incident
1587        {
1588            //adjust incident color
1589            script.incidents.get(oldIncidentIndex).color = selectedColor;
1590            //adjust incident name
1591            script.incidents.get(oldIncidentIndex).name = addIncidentName.getText();
1592            //adjust incident description
1593            script.incidents.get(oldIncidentIndex).description = addIncidentDescription.getText();
1594            //change offset of incident
1595            script.incidents.get(oldIncidentIndex).setOffset(((int) addIncidentStart.getValue()) * 60);
1596            //update incident number, if it was changed
1597            if ((int) addIncidentNumber.getValue() == script.incidents.get(oldIncidentIndex).number
1598                    || !scriptContainsLogNum(script, (int) addIncidentNumber.getValue()))
1599            {
1600                script.incidents.get(oldIncidentIndex).number = (int) addIncidentNumber.getValue();
1601            }
1602            else//if the updated value conflicts with an existing inc number,
1603            //the inc number update fails
1604            {
1605                JOptionPane.showMessageDialog(this, "Incident number already in use.",
1606                        "Unable To Alter Incident Detail", JOptionPane.ERROR_MESSAGE);
1607            }
1608        }
1609
1610        //close this frame
1611        incidentFrame.setVisible(false);
1612        this.update(script, script);
1613        repaint();
1614    }//GEN-LAST:event_incidentOkButtonActionPerformed
1615
1616    /**
1617     * Determine if the given incident number is already present in the script.
1618     *
1619     * @param script the current simulation script
1620     * @param num the incident log number to check
1621     * @return true if one of the existing incidents in the script uses that log
1622     * number
1623     */
1624    private boolean scriptContainsLogNum(SimulationScript script, int num)
1625    {
1626        for (ScriptIncident incident : script.incidents)
1627        {
1628            if (incident != null && incident.number == num)
1629            {
1630                return true;
1631            }
1632        }
1633        return false;
1634    }
1635
1636    /**
1637     * Closes editor window upon click of cancel button.
1638     *
1639     * @param evt the button press event
1640     */
1641    private void incidentCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentCancelButtonActionPerformed
1642        incidentFrame.setVisible(false);
1643    }//GEN-LAST:event_incidentCancelButtonActionPerformed
1644
1645    /**
1646     * Opens incident editor window and preps for addition of new incident, upon
1647     * click of "New Incident" menu option.
1648     *
1649     * @param evt the button press event
1650     */
1651    private void newIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newIncidentActionPerformed
1652        editingIncident = false;
1653
1654        addIncidentName.setText("");
1655
1656        int newLogNum = 100;
1657        boolean found = false;
1658        while (!found)
1659        {
1660            newLogNum++;
1661            if (!scriptContainsLogNum(script, newLogNum))
1662            {
1663                found = true;
1664                for (ScriptIncident incident : script.incidents)
1665                {
1666                    if (incident != null && incident.number == newLogNum)
1667                    {
1668                        found = false;
1669                    }
1670                }
1671            }
1672        }
1673
1674        addIncidentNumber.setValue(newLogNum);
1675        addIncidentStart.setValue(0);
1676        txtIncidentLength.setText("0");
1677        incidentColorField.setBackground(Color.BLACK);
1678        String colStr = "" + Integer.toHexString(Color.BLACK.getRed())
1679                + Integer.toHexString(Color.BLACK.getGreen())
1680                + Integer.toHexString(Color.BLACK.getBlue());
1681        incidentColorField.setText(colStr);
1682        selectedColor = Color.BLACK;
1683        addIncidentDescription.setText("");
1684
1685        incidentFrame.setVisible(true);
1686    }//GEN-LAST:event_newIncidentActionPerformed
1687
1688    private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileMenuActionPerformed
1689    }//GEN-LAST:event_fileMenuActionPerformed
1690
1691    /**
1692     * Upon click of "Open file" menu option, opens a window to load a new .sim
1693     * file.
1694     *
1695     * @param evt the button press event
1696     */
1697    private void fileOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileOpenActionPerformed
1698        JFileChooser fc = new JFileChooser();
1699
1700        //Search for .xml files
1701        fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",
1702                new String[]
1703                {
1704                    "xml"
1705                }));
1706        if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)
1707        {
1708            //make a new script and load it with values from the selected file
1709            script = new SimulationScript();
1710            script.loadScriptFromFile(fc.getSelectedFile());
1711            script.saveFile = fc.getSelectedFile();
1712        }
1713        this.update(script, script);
1714        //zoom out all the way so that the whole imported script is visible
1715        zoomSlider.setValue(zoomSlider.getMinimum());
1716        repaint();
1717    }//GEN-LAST:event_fileOpenActionPerformed
1718
1719    /**
1720     * Upon click of "Save as" menu option, opens a window to choose a .sim file
1721     * to save this as.
1722     *
1723     * @param evt the button press event
1724     */
1725    private void fileSaveAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveAsActionPerformed
1726        JFileChooser fc = new JFileChooser();
1727        boolean wasNull = false;
1728        if (script.saveFile == null)
1729        {
1730            wasNull = true;
1731            String fName = "untitled";
1732            int untitledCount = 1;
1733            while (new File("" + fName + untitledCount + ".xml").exists())
1734            {
1735                untitledCount++;
1736            }
1737            script.saveFile = new File("" + fName + untitledCount + ".xml");
1738        }
1739
1740        fc.setSelectedFile(script.saveFile);
1741        fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",
1742                new String[]
1743                {
1744                    "xml"
1745                }));
1746
1747        if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)
1748        {
1749            String filename = fc.getSelectedFile().toString();
1750            if (!filename.endsWith(".xml"))
1751            {
1752                filename += ".xml";
1753
1754            }
1755            script.saveScriptToFile(new File(filename));
1756            script.saveFile = new File(filename);
1757        }
1758        else
1759        {
1760            if (wasNull)
1761            {
1762                script.saveFile = null;
1763            }
1764        }
1765        this.update(script, 0);
1766    }//GEN-LAST:event_fileSaveAsActionPerformed
1767
1768    /**
1769     * Upon click of "Save" menu option, opens a window to choose a .sim file to
1770     * save this as.
1771     *
1772     * @param evt the button press event
1773     */
1774    private void fileSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveActionPerformed
1775        //If the script has never been saved before, we need to name or create a
1776        //file in which to save it
1777        if (script.saveFile == null)
1778        {
1779            fileSaveAsActionPerformed(evt);
1780        }
1781        //Otherwise, just save to the previously selected save spot
1782        else
1783        {
1784            script.saveScriptToFile(script.saveFile);
1785        }
1786    }//GEN-LAST:event_fileSaveActionPerformed
1787
1788    /**
1789     * Allow this window to refresh itself, after a different window loses
1790     * focus.
1791     */
1792    public void returnFocus()
1793    {
1794        zoomSlider.setValue(zoomSlider.getMinimum());
1795        zoomSliderStateChanged(new ChangeEvent(script));
1796    }
1797
1798    /**
1799     * Set up the incident details/properties window so that it reflects the
1800     * values of the selected incident. Then, make the window visible.
1801     *
1802     * @param i the incident to be represented by this details window
1803     */
1804    public void incidentDetailsScreen(ScriptIncident i)
1805    {
1806        editingIncident = true;
1807        oldIncidentIndex = script.incidents.indexOf(i);
1808
1809        addIncidentName.setText(i.name);
1810        addIncidentNumber.setValue(i.number);
1811        addIncidentStart.setValue(i.offset / 60);
1812        txtIncidentLength.setText("" + (i.length / 60));
1813        txtIncidentLength.setHorizontalTextPosition(SwingConstants.RIGHT);
1814        //addIncidentLength.setValue(i.length / 60);
1815        incidentColorField.setBackground(i.color);
1816        String colStr = "" + Integer.toHexString(i.color.getRed())
1817                + Integer.toHexString(i.color.getGreen())
1818                + Integer.toHexString(i.color.getBlue());
1819        incidentColorField.setText(colStr);
1820        selectedColor = i.color;
1821        addIncidentDescription.setText(i.description);
1822
1823        incidentFrame.setVisible(true);
1824    }
1825
1826    /**
1827     * Brings up the noise generation screen upon click of the "Generate Noise"
1828     * menu option.
1829     *
1830     * @param evt the button press event
1831     */
1832    private void generateNoiseOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNoiseOptionActionPerformed
1833        addNoiseFrame.setVisible(true);
1834    }//GEN-LAST:event_generateNoiseOptionActionPerformed
1835
1836    /**
1837     * Hides the noise generation screen upon click of the "Cancel" button.
1838     *
1839     * @param evt the button press event
1840     */
1841    private void btnCancelNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelNoiseActionPerformed
1842        addNoiseFrame.setVisible(false);
1843    }//GEN-LAST:event_btnCancelNoiseActionPerformed
1844
1845    /**
1846     * Generates random noise upon click of the "Generate" button, then hides
1847     * the noise generation screen.
1848     *
1849     * @param evt the button press event
1850     */
1851    private void btnGenerateNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerateNoiseActionPerformed
1852        Random rng = new Random();
1853        ScriptEventType[] eventTypes = ScriptEventType.values();
1854
1855        /*This feature has not yet been implemented. Show a message and just return.*/
1856        if (true)
1857        {
1858            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
1859                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
1860
1861            return;
1862        }
1863
1864        /* For prototyping purpose, ignore the sliders and average their values */
1865        int total = radioChatterSlider.getValue() + laneClosuresSlider.getValue() + TMCALSlider.getValue() + minorEventsSlider.getValue() + backgroundNoiseSlider.getValue();
1866        total /= 5;
1867
1868        for (int i = 0; i < script.incidents.get(9).slices.size(); i++)
1869        {
1870            script.incidents.get(9).slices.get(i).events.clear();
1871        }
1872
1873        for (int i = 0; i < total; i++)
1874        {
1875            int n = rng.nextInt();
1876            int s = rng.nextInt();
1877            int e = rng.nextInt();
1878            if (n < 0)
1879            {
1880                n *= -1;
1881            }
1882            if (s < 0)
1883            {
1884                s *= -1;
1885            }
1886            if (e < 0)
1887            {
1888                e *= -1;
1889            }
1890
1891            script.incidents.get(9).slices.get(s % (script.incidents.get(9).slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length]));
1892        }
1893
1894        addNoiseFrame.setVisible(false);
1895
1896        this.update(script, script);
1897        repaint();
1898}//GEN-LAST:event_btnGenerateNoiseActionPerformed
1899
1900    /**
1901     * Allow the user to pick an incident from a dropdown, then save it to an
1902     * XML file.
1903     *
1904     * @param evt the button press event
1905     */
1906    private void saveIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveIncidentActionPerformed
1907        Object[] incidentList = script.incidents.toArray();
1908        String input = "";
1909        ScriptIncident inc = null;
1910
1911        //Pick the incident to save
1912        Object result = JOptionPane.showInputDialog(
1913                this,
1914                "Select Incident:",
1915                "Save Incident",
1916                JOptionPane.PLAIN_MESSAGE,
1917                null,
1918                incidentList,
1919                script.incidents.get(0));
1920        if (result == null)
1921        {
1922            return;
1923        }
1924        input = result.toString();
1925        int i = 0;
1926        for (ScriptIncident incident : script.incidents)
1927        {
1928            if (incident == null)
1929            {
1930                continue;
1931            }
1932            if (incident.toString().equals(input))
1933            {
1934                inc = incident;
1935            }
1936        }
1937
1938        if (inc == null)
1939        {
1940            return;
1941        }
1942
1943        String fs = System.getProperty("file.separator");
1944        //Pick the file to save it to
1945        JFileChooser fc = new JFileChooser();
1946        fc.setSelectedFile(new File("" + System.getProperty("user.dir") + fs + "Incidents" + fs + "inc_" + inc.number + ".xml"));
1947        fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]
1948        {
1949            "xml"
1950        }));
1951        if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)
1952        {
1953            String filename = fc.getSelectedFile().toString();
1954            if (!filename.endsWith(".xml"))
1955            {
1956                filename += ".xml";
1957
1958            }
1959            inc.saveIncidentToFile(new File(filename));
1960        }
1961    }//GEN-LAST:event_saveIncidentActionPerformed
1962
1963    /**
1964     * Bring up the incident palette for loading of new incidents.
1965     *
1966     * @param evt the menu click event
1967     */
1968    private void loadIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadIncidentActionPerformed
1969        new IncidentPaletteFrame(script, this).setVisible(true);
1970        zoomSlider.setValue(zoomSlider.getMinimum());
1971    }//GEN-LAST:event_loadIncidentActionPerformed
1972
1973    //Unsupported as of 2017/09/05
1974    private void generateProjectRequirementsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateProjectRequirementsActionPerformed
1975        JFileChooser fc = new JFileChooser();
1976        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
1977        {
1978            "pdf"
1979        }));
1980        fc.setSelectedFile(new File("Requirements.pdf"));
1981        fc.showSaveDialog(this);
1982        /*This feature has not yet been implemented. Show a message and just return.*/
1983        if (true)
1984        {
1985            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
1986                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
1987
1988            return;
1989        }
1990    }//GEN-LAST:event_generateProjectRequirementsActionPerformed
1991
1992    //Unsupported as of 2017/09/05
1993    private void generateNotebooksActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNotebooksActionPerformed
1994        JFileChooser fc = new JFileChooser();
1995        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
1996        {
1997            "pdf"
1998        }));
1999        fc.setSelectedFile(new File("Notebooks.pdf"));
2000        fc.showSaveDialog(this);
2001        /*This feature has not yet been implemented. Show a message and just return.*/
2002        if (true)
2003        {
2004            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
2005                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
2006
2007            return;
2008        }
2009    }//GEN-LAST:event_generateNotebooksActionPerformed
2010
2011    //Unsupported as of 2017/09/05
2012    private void generateScorecardsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateScorecardsActionPerformed
2013        JFileChooser fc = new JFileChooser();
2014        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2015        {
2016            "pdf"
2017        }));
2018        fc.setSelectedFile(new File("Scorecards.pdf"));
2019        fc.showSaveDialog(this);
2020        /*This feature has not yet been implemented. Show a message and just return.*/
2021        if (true)
2022        {
2023            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
2024                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
2025
2026            return;
2027        }
2028    }//GEN-LAST:event_generateScorecardsActionPerformed
2029
2030    //Unsupported as of 2017/09/05
2031    private void generateOrganizationChartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateOrganizationChartActionPerformed
2032        JFileChooser fc = new JFileChooser();
2033        fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]
2034        {
2035            "pdf"
2036        }));
2037        fc.setSelectedFile(new File("OrganizationChart.pdf"));
2038        fc.showSaveDialog(this);
2039        /*This feature has not yet been implemented. Show a message and just return.*/
2040        if (true)
2041        {
2042            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
2043                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
2044
2045            return;
2046        }
2047    }//GEN-LAST:event_generateOrganizationChartActionPerformed
2048
2049    /**
2050     * Increases zoom level upon click of the "Zoom in" icon.
2051     *
2052     * @param evt the mouse event
2053     */
2054    private void zoomInIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomInIconMouseClicked
2055        if (script != null && script.numberOfIncidents > 0)
2056        {
2057            zoomSlider.setValue(zoomSlider.getValue() >= 22 ? 22 : zoomSlider.getValue() + 1);
2058        }
2059    }//GEN-LAST:event_zoomInIconMouseClicked
2060
2061    /**
2062     * Decreases zoom level upon click of the "Zoom out" icon.
2063     *
2064     * @param evt the mouse event
2065     */
2066    private void zoomOutIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomOutIconMouseClicked
2067        if (script != null && script.numberOfIncidents > 0)
2068        {
2069            zoomSlider.setValue(zoomSlider.getValue() <= 4 ? 4 : zoomSlider.getValue() - 1);
2070        }
2071    }//GEN-LAST:event_zoomOutIconMouseClicked
2072    private Color selectedColor = Color.BLACK;
2073
2074    private void btnChooseColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnChooseColorActionPerformed
2075        //For whatever reason, this causes the incident properties frame to be hidden
2076        Color newColor = incidentColorChooser.showDialog(this, "Incident Color", incidentColorField.getBackground());
2077        if (newColor != null)
2078        {
2079            //If the user selected a color, apply it to the properties frame
2080            selectedColor = newColor;
2081            incidentColorField.setBackground(newColor);
2082            String colStr = "" + Integer.toHexString(newColor.getRed())
2083                    + Integer.toHexString(newColor.getGreen())
2084                    + Integer.toHexString(newColor.getBlue());
2085            incidentColorField.setText(colStr);
2086        }
2087        //Return focus to the properties frame
2088        incidentFrame.setVisible(true);
2089    }//GEN-LAST:event_btnChooseColorActionPerformed
2090
2091    /* Help > About simply displays the current SVN revision number so
2092     * the user can determine which version of the source code was used to
2093     * build the executable she is running.
2094     */
2095    private void helpAboutActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_helpAboutActionPerformed
2096    {//GEN-HEADEREND:event_helpAboutActionPerformed
2097        JOptionPane.showMessageDialog(rootPane, "Revision: " + getAppVersion(), "About", JOptionPane.INFORMATION_MESSAGE);
2098    }//GEN-LAST:event_helpAboutActionPerformed
2099
2100    /**
2101     * Replaces the current script with a new, blank script.
2102     *
2103     * @param evt the menu selection event
2104     */
2105    private void fileNewActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_fileNewActionPerformed
2106    {//GEN-HEADEREND:event_fileNewActionPerformed
2107        script = new SimulationScript();
2108        script.update();
2109        this.update(null, script);
2110        repaint();
2111    }//GEN-LAST:event_fileNewActionPerformed
2112
2113    /**
2114     * Allows the user to delete an incident from the current script.
2115     *
2116     * @param evt the menu selection event
2117     */
2118    private void deleteIncidentActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_deleteIncidentActionPerformed
2119    {//GEN-HEADEREND:event_deleteIncidentActionPerformed
2120        Object[] incidentList = script.incidents.toArray();
2121        String input = "";
2122        ScriptIncident inc = null;
2123        //Choose the incident to be deleted
2124        Object result = JOptionPane.showInputDialog(
2125                this,
2126                "Select Incident:",
2127                "Delete Incident",
2128                JOptionPane.PLAIN_MESSAGE,
2129                null,
2130                incidentList,
2131                script.incidents.get(0));
2132
2133        if (result != null)
2134        {
2135            input = result.toString();
2136            for (ScriptIncident incident : script.incidents)
2137            {
2138                if (incident == null)
2139                {
2140                    continue;
2141                }
2142                if (incident.toString().equals(input))
2143                {
2144                    inc = incident;
2145                }
2146            }
2147
2148            //Allow user to verify deletion before proceeding
2149            if (inc != null)
2150            {
2151                int confirm = JOptionPane.showConfirmDialog(this,
2152                        "Are you sure you want to delete " + inc.toString() + "?");
2153                if (confirm == JOptionPane.YES_OPTION)
2154                {
2155                    //Remove the incident and replace it with a null placeholder
2156                    script.incidents.remove(inc);
2157                    script.incidents.add(null);
2158                    script.numberOfIncidents--;
2159                }
2160            }
2161        }
2162        //Refresh
2163        this.update(script, script);
2164        repaint();
2165    }//GEN-LAST:event_deleteIncidentActionPerformed
2166    /**
2167     * Add 15 minutes to the end of the visible timeline.
2168     *
2169     * @param evt the button press event.
2170     */
2171    private void btnAddTimeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnAddTimeActionPerformed
2172    {//GEN-HEADEREND:event_btnAddTimeActionPerformed
2173        IncidentTimelinePanel.requestedScriptBuilderFillerTime += IncidentTimelinePanel.FILLER_INTERVAL_SECONDS;
2174        this.update(script, script);
2175    }//GEN-LAST:event_btnAddTimeActionPerformed
2176
2177    private void cadEventActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_cadEventActionPerformed
2178    {//GEN-HEADEREND:event_cadEventActionPerformed
2179        /*This feature has not yet been implemented. Show a message and just return.*/
2180        if (true)
2181        {
2182            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
2183                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
2184
2185            return;
2186        }
2187    }//GEN-LAST:event_cadEventActionPerformed
2188
2189    private void generateWebNotebookActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_generateWebNotebookActionPerformed
2190    {//GEN-HEADEREND:event_generateWebNotebookActionPerformed
2191        /*This feature has not yet been implemented. Show a message and just return.*/
2192        if (true)
2193        {
2194            JOptionPane.showMessageDialog(this, "This feature has not yet been implemented.\n",
2195                    "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);
2196
2197            return;
2198        }
2199    }//GEN-LAST:event_generateWebNotebookActionPerformed
2200
2201    private void helpTutorialActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_helpTutorialActionPerformed
2202    {//GEN-HEADEREND:event_helpTutorialActionPerformed
2203        final String quickStartURL = "http://git.tokomak.net:8888/wiki/ScriptBuilder_QuickStart";
2204
2205        if (Desktop.isDesktopSupported())
2206        {
2207            Desktop dt = Desktop.getDesktop();
2208            if (dt.isSupported(Desktop.Action.BROWSE))
2209            {
2210                try
2211                {
2212                    URI uri = new URI(quickStartURL);
2213                    dt.browse(uri);
2214                }
2215                catch (Exception e)
2216                {
2217                }
2218            }
2219        }
2220// TODO add your handling code here:
2221    }//GEN-LAST:event_helpTutorialActionPerformed
2222
2223    /**
2224     * Read the version number from the application properties. The file
2225     * 'application.properties' is generated by build.xml.
2226     *
2227     * @return a version string obtained from application.properties file, or
2228     * "Version: unknown" if an IOerror prevents us from reading the file.
2229     */
2230    private String getAppVersion()
2231    {
2232        String propfilename = "/scriptbuilder/gui/application.properties";
2233        String propKey = "Application.revision";
2234        String version = "unknown";
2235        // Load the application properties (created by build.xml)
2236        try
2237        {
2238            Properties props = new Properties();
2239            props.load(this.getClass().getResourceAsStream(propfilename));
2240            version = (String) props.get(propKey);
2241        }
2242        catch (IOException ex)
2243        {
2244            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
2245                    "ScriptBuilderFrame.getAppVersion()."
2246                    + " IOError reading " + propfilename);
2247        }
2248        catch (NullPointerException npe)
2249        {
2250            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
2251                    "ScriptBuilderFrame.getAppVersion().load."
2252                    + " Missing file: " + propfilename);
2253        }
2254        return version;
2255    }
2256
2257    /**
2258     * Runs the script builder. This is the main method for the whole program.
2259     *
2260     * @param args the command line arguments
2261     */
2262    public static void main(String args[])
2263    {
2264        try
2265        {
2266            UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
2267        }
2268        catch (Exception ex)
2269        {
2270            //Apparently we don't do any special exception processing
2271        }
2272
2273        try
2274        {
2275            UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
2276        }
2277        catch (Exception ex)
2278        {
2279            //Apparently we don't do any special exception processing
2280        }
2281
2282        java.awt.EventQueue.invokeLater(
2283                new Runnable()
2284                {
2285                    public void run()
2286                    {
2287                        new ScriptBuilderFrame().setVisible(true);
2288                    }
2289                });
2290    }
2291    // Variables declaration - do not modify//GEN-BEGIN:variables
2292    private javax.swing.JSlider TMCALSlider;
2293    private javax.swing.JTextArea addIncidentDescription;
2294    private javax.swing.JTextField addIncidentName;
2295    private javax.swing.JSpinner addIncidentNumber;
2296    private javax.swing.JSpinner addIncidentStart;
2297    private javax.swing.JFrame addNoiseFrame;
2298    private javax.swing.JSlider backgroundNoiseSlider;
2299    private javax.swing.JButton btnAddTime;
2300    private javax.swing.JButton btnCancelNoise;
2301    private javax.swing.JButton btnChooseColor;
2302    private javax.swing.JButton btnGenerateNoise;
2303    private javax.swing.JMenuItem cadEvent;
2304    private javax.swing.JFrame cadEventFrame;
2305    private javax.swing.JButton cancelButton;
2306    private javax.swing.JMenuItem deleteEventList;
2307    private javax.swing.JMenuItem deleteIncident;
2308    private javax.swing.JMenuItem editEventList;
2309    private javax.swing.JPopupMenu eventListPopupMenu;
2310    private javax.swing.JPopupMenu eventPopupMenu;
2311    private javax.swing.JMenu fileMenu;
2312    private javax.swing.JMenuItem fileNew;
2313    private javax.swing.JMenuItem fileOpen;
2314    private javax.swing.JMenuItem fileSave;
2315    private javax.swing.JMenuItem fileSaveAs;
2316    private javax.swing.JMenu generateMenu;
2317    private javax.swing.JMenu generateNoiseMenu;
2318    private javax.swing.JMenuItem generateNoiseOption;
2319    private javax.swing.JMenuItem generateNotebooks;
2320    private javax.swing.JMenuItem generateOrganizationChart;
2321    private javax.swing.JMenuItem generateProjectRequirements;
2322    private javax.swing.JMenuItem generateScorecards;
2323    private javax.swing.JMenuItem generateWebNotebook;
2324    private javax.swing.JMenuItem helpAbout;
2325    private javax.swing.JMenu helpMenu;
2326    private javax.swing.JMenuItem helpTutorial;
2327    private javax.swing.JButton incidentCancelButton;
2328    private javax.swing.JColorChooser incidentColorChooser;
2329    private javax.swing.JTextField incidentColorField;
2330    private javax.swing.JFrame incidentFrame;
2331    private javax.swing.JMenu incidentMenu;
2332    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel1;
2333    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel10;
2334    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel2;
2335    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel3;
2336    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel4;
2337    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel5;
2338    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel6;
2339    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel7;
2340    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel8;
2341    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel9;
2342    private javax.swing.JButton incidentOkButton;
2343    private javax.swing.JPopupMenu incidentPopupMenu;
2344    private javax.swing.JScrollPane incidentPropertiesScrollPane;
2345    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel1;
2346    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel10;
2347    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel2;
2348    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel3;
2349    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel4;
2350    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel5;
2351    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel6;
2352    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel7;
2353    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel8;
2354    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel9;
2355    private javax.swing.JMenuItem jMenuItem2;
2356    private javax.swing.JMenuItem jMenuItem4;
2357    private javax.swing.JMenuItem jMenuItem5;
2358    private javax.swing.JMenuItem jMenuItem6;
2359    private javax.swing.JPopupMenu.Separator jSeparator1;
2360    private javax.swing.JPopupMenu.Separator jSeparator2;
2361    private javax.swing.JPopupMenu.Separator jSeparator3;
2362    private javax.swing.JPopupMenu.Separator jSeparator4;
2363    private javax.swing.JLabel labelBackgroundNoise;
2364    private javax.swing.JLabel labelCADEntry;
2365    private javax.swing.JLabel labelIncidentColor;
2366    private javax.swing.JLabel labelIncidentDescription;
2367    private javax.swing.JLabel labelIncidentLength;
2368    private javax.swing.JLabel labelIncidentName;
2369    private javax.swing.JLabel labelIncidentNumber;
2370    private javax.swing.JLabel labelIncidentStart;
2371    private javax.swing.JLabel labelLaneClosures;
2372    private javax.swing.JLabel labelLeastFreq;
2373    private javax.swing.JLabel labelMinorEvents;
2374    private javax.swing.JLabel labelMostFreq;
2375    private javax.swing.JLabel labelRadioChatter;
2376    private javax.swing.JLabel labelRadioMessage;
2377    private javax.swing.JLabel labelRadioType;
2378    private javax.swing.JLabel labelTMCALLogs;
2379    private javax.swing.JSlider laneClosuresSlider;
2380    private javax.swing.JMenuItem loadIncident;
2381    private javax.swing.JSlider minorEventsSlider;
2382    private javax.swing.JMenuItem newIncident;
2383    private javax.swing.JButton okButton;
2384    private javax.swing.JMenuItem popupDeleteIncident;
2385    private javax.swing.JSlider radioChatterSlider;
2386    private javax.swing.JMenuItem radioEvent;
2387    private javax.swing.JFrame radioEventFrame;
2388    private javax.swing.JTextArea radioMessage;
2389    private javax.swing.JScrollPane radioMessageScrollPane;
2390    private javax.swing.JComboBox radioTypeComboBox;
2391    private javax.swing.JMenuItem saveIncident;
2392    private javax.swing.JMenuBar scriptBuilderMenuBar;
2393    private scriptbuilder.gui.panels.TimeStampPanel timeStampPanel;
2394    private javax.swing.JScrollPane timeStampScrollPane;
2395    private scriptbuilder.gui.panels.TimelineTickPanel timelineTickPanel;
2396    private javax.swing.JScrollPane timelinesScrollPane;
2397    private javax.swing.JLabel txtIncidentLength;
2398    private javax.swing.JTextArea txtNoiseDescription;
2399    private javax.swing.JLabel zoomInIcon;
2400    private javax.swing.JLabel zoomOutIcon;
2401    private javax.swing.JSlider zoomSlider;
2402    // End of variables declaration//GEN-END:variables
2403}
Note: See TracBrowser for help on using the repository browser.