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

Revision 103, 108.4 KB checked in by bmcguffin, 9 years ago (diff)

Individual incident editor window now shows the relevant incident as though it started at 00:00:00. When window is closed, the incident is re-inserted into the correct position.

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