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

Revision 129, 112.7 KB checked in by bmcguffin, 9 years ago (diff)

Added link to quickstart page on TMC wiki.

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