source: tmcsimulator-scriptbuilder/trunk/src/scriptbuilder/gui/IncidentEditorFrame.java @ 118

Revision 118, 96.2 KB checked in by bmcguffin, 9 years ago (diff)

Added a pair of radio buttons under the +15 button on IncidentEditorFrame? which can be toggled between. If "to start" is selected, then pressing the +15 button will add (up to) 15 minutes of screen space to the beginning of the incident. If "to end" is selected, then pressing the +15 button will add 15 minutes of screen space to the end of the incident. Selecting one button deselects the other.

Line 
1/**
2 * Frame for the Individual Incident Editor.
3 *
4 * @author Bryan McGuffin
5 * @version 2017/08/08
6 */
7package scriptbuilder.gui;
8
9import java.awt.Adjustable;
10import java.awt.event.AdjustmentEvent;
11import java.awt.event.AdjustmentListener;
12import java.awt.event.KeyEvent;
13import java.awt.event.KeyListener;
14import java.awt.event.WindowAdapter;
15import java.awt.event.WindowEvent;
16import java.io.IOException;
17import java.util.ArrayList;
18import java.util.Observable;
19import java.util.Observer;
20import java.util.Properties;
21import java.util.Random;
22import java.util.logging.Level;
23import java.util.logging.Logger;
24import javax.swing.DefaultListModel;
25import javax.swing.JButton;
26import scriptbuilder.gui.panels.IncidentTimelinePanel;
27import scriptbuilder.structures.ScriptEvent;
28import scriptbuilder.structures.ScriptEvent.ScriptEventType;
29import scriptbuilder.structures.ScriptIncident;
30import scriptbuilder.structures.ScriptIncident.IncidentFocusedEvent;
31import scriptbuilder.structures.ScriptIncident.SliceChangedEvent;
32import scriptbuilder.structures.TimeSlice;
33import scriptbuilder.structures.events.I_ScriptEvent;
34
35/**
36 * GUI for the script builder. Contains all panels and editor elements. Performs
37 * updates to reflect script model, which it observes.
38 *
39 * @author Greg Eddington
40 * @author Bryan McGuffin
41 */
42public class IncidentEditorFrame extends javax.swing.JFrame implements Observer
43{
44
45    /**
46     * The script incident currently being edited.
47     */
48    private ScriptIncident theIncident;
49
50    private ScriptBuilderFrame parent;
51
52    private int savedOffset;
53
54    private boolean addToEnd = true;
55
56    /**
57     * The current type of selected event.
58     */
59    public ScriptEventType currentEventType;
60    /**
61     * A list of all the event type buttons.
62     */
63    private ArrayList<JButton> eventButtons = null;
64
65    /**
66     * Get the script currently in use.
67     *
68     * @return the script model object
69     */
70    public ScriptIncident getIncident()
71    {
72        return theIncident;
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                timeStampScrollPane1.getHorizontalScrollBar()
95                        .setValue(timelinesScrollPane.getHorizontalScrollBar().getValue());
96            }
97            else
98            {
99                // Event from vertical scrollbar
100            }
101
102            repaint();
103        }
104    }
105
106    /**
107     * Listener for key presses. Used for hotkeys for different event types.
108     */
109    private class TimelineKeyListener implements KeyListener
110    {
111
112        /**
113         * If a hotkey is pressed, select that type of event.
114         *
115         * @param e the key event
116         */
117        @Override
118        public void keyPressed(KeyEvent e)
119        {
120            JButton lastButton = null;
121            for (JButton eb : eventButtons)
122            {
123                eb.setFocusPainted(false);
124                if (eb.isSelected())
125                {
126                    lastButton = eb;
127                }
128                eb.setSelected(false);
129            }
130
131            JButton newButton = lastButton;
132            switch (e.getKeyChar())
133            {
134                case 'u':
135                    currentEventType = ScriptEventType.AUDIO_EVENT;
136                    newButton = audioButton;
137                    break;
138                case 'c':
139                    currentEventType = ScriptEventType.CAD_EVENT;
140                    newButton = cadButton;
141                    break;
142                case 'v':
143                    currentEventType = ScriptEventType.CCTV_EVENT;
144                    newButton = cctvButton;
145                    break;
146                case 'h':
147                    currentEventType = ScriptEventType.CHP_RADIO_EVENT;
148                    newButton = chpRadioButton;
149                    break;
150                case 'p':
151                    currentEventType = ScriptEventType.PARAMICS_EVENT;
152                    newButton = paramicsButton;
153                    break;
154                case 'o':
155                    currentEventType = ScriptEventType.TOW_EVENT;
156                    newButton = towButton;
157                    break;
158                case 'n':
159                    currentEventType = ScriptEventType.UNIT_EVENT;
160                    newButton = unitButton;
161                    break;
162                case 'w':
163                    currentEventType = ScriptEventType.WITNESS_EVENT;
164                    newButton = witnessButton;
165                    break;
166                case 'm':
167                    currentEventType = ScriptEventType.MAINTENANCE_RADIO_EVENT;
168                    newButton = maintenanceRadioButton;
169                    break;
170                case 't':
171                    currentEventType = ScriptEventType.TMT_RADIO_EVENT;
172                    newButton = tmtRadioButton;
173                    break;
174                case 'e':
175                    currentEventType = ScriptEventType.TELEPHONE_EVENT;
176                    newButton = telephoneButton;
177                    break;
178                case 'a':
179                    currentEventType = ScriptEventType.ATMS_EVAL_EVENT;
180                    newButton = atmsEvalButton;
181                    break;
182                case 'l':
183                    currentEventType = ScriptEventType.ACTIVITY_LOG_EVAL_EVENT;
184                    newButton = activityLogEvalButton;
185                    break;
186                case 'd':
187                    currentEventType = ScriptEventType.CAD_EVAL_EVENT;
188                    newButton = cadEvalButton;
189                    break;
190                case 's':
191                    currentEventType = ScriptEventType.CMS_EVAL_EVENT;
192                    newButton = cmsEvalButton;
193                    break;
194                case 'f':
195                    currentEventType = ScriptEventType.FACILITATOR_EVAL_EVENT;
196                    newButton = facilitatorEvalButton;
197                    break;
198                case 'r':
199                    currentEventType = ScriptEventType.RADIO_EVAL_EVENT;
200                    newButton = radioEvalButton;
201                    break;
202                default:
203                    newButton = lastButton;
204            }
205
206            if (e.getKeyCode() == KeyEvent.VK_ESCAPE)
207            {
208                currentEventType = null;
209                newButton = selectButton;
210            }
211
212            if (newButton != null)
213            {
214                newButton.setSelected(true);
215            }
216
217            repaint();
218        }
219
220        /**
221         * Take no action upon key release.
222         *
223         * @param e the key event
224         */
225        @Override
226        public void keyReleased(KeyEvent e)
227        {
228        }
229
230        /**
231         * Take no action upon key release.
232         *
233         * @param e the key event
234         */
235        @Override
236        public void keyTyped(KeyEvent e)
237        {
238        }
239    }
240
241    /**
242     * Constructor. Prep new script model, initialize the GUI, and add listeners
243     * for all buttons.
244     *
245     * @param inc the Script Incident which this window will edit.
246     */
247    public IncidentEditorFrame(ScriptIncident inc, ScriptBuilderFrame topFrame)
248    {
249        this.theIncident = inc;
250        this.savedOffset = this.theIncident.offset;
251        this.theIncident.setOffset(0);
252        this.parent = topFrame;
253        initComponents();
254
255        absoluteTimeStampPanel.setOffset(savedOffset);
256        absoluteTimeStampPanel.setAbsolute(true);
257        timelineTickPanel.update(theIncident, incidentTimelinePanel1);
258        absoluteTimeStampPanel.update(theIncident, incidentTimelinePanel1);
259        relativeTimeStampPanel.update(theIncident, incidentTimelinePanel1);
260        incidentTimelinePanel1.timelinePanelUpdate(theIncident);
261
262        incidentNumberPanel1.update(theIncident);
263        selectButton.addKeyListener(new TimelineKeyListener());
264        cadButton.addKeyListener(new TimelineKeyListener());
265        cctvButton.addKeyListener(new TimelineKeyListener());
266        chpRadioButton.addKeyListener(new TimelineKeyListener());
267        paramicsButton.addKeyListener(new TimelineKeyListener());
268        towButton.addKeyListener(new TimelineKeyListener());
269        unitButton.addKeyListener(new TimelineKeyListener());
270        witnessButton.addKeyListener(new TimelineKeyListener());
271        maintenanceRadioButton.addKeyListener(new TimelineKeyListener());
272        tmtRadioButton.addKeyListener(new TimelineKeyListener());
273        telephoneButton.addKeyListener(new TimelineKeyListener());
274        atmsEvalButton.addKeyListener(new TimelineKeyListener());
275        activityLogEvalButton.addKeyListener(new TimelineKeyListener());
276        cadEvalButton.addKeyListener(new TimelineKeyListener());
277        cmsEvalButton.addKeyListener(new TimelineKeyListener());
278        facilitatorEvalButton.addKeyListener(new TimelineKeyListener());
279        radioEvalButton.addKeyListener(new TimelineKeyListener());
280
281//        // Hack to refresh the zoom
282//        zoomSlider.setValue(zoomSlider.getValue() - 1);
283//        zoomSlider.setValue(zoomSlider.getValue() + 1);
284        // Set listener for scroll pane
285        AdjustmentListener listener = new MyAdjustmentListener();
286        timelinesScrollPane.getHorizontalScrollBar().addAdjustmentListener(listener);
287        timelinesScrollPane.getVerticalScrollBar().addAdjustmentListener(listener);
288
289        // Button list
290        eventButtons = new ArrayList<JButton>();
291        eventButtons.add(maintenanceRadioButton);
292        eventButtons.add(tmtRadioButton);
293        eventButtons.add(telephoneButton);
294        eventButtons.add(paramicsButton);
295        eventButtons.add(towButton);
296        eventButtons.add(witnessButton);
297        eventButtons.add(unitButton);
298        eventButtons.add(audioButton);
299        eventButtons.add(cadButton);
300        eventButtons.add(cctvButton);
301        eventButtons.add(chpRadioButton);
302        eventButtons.add(selectButton);
303        eventButtons.add(cmsEvalButton);
304        eventButtons.add(atmsEvalButton);
305        eventButtons.add(cadEvalButton);
306        eventButtons.add(activityLogEvalButton);
307        eventButtons.add(facilitatorEvalButton);
308        eventButtons.add(radioEvalButton);
309
310        this.addWindowListener(new WindowAdapter()
311        {
312            @Override
313            public void windowClosing(WindowEvent e)
314            {
315                //Add previous offset back in
316                //If we didn't adjust the offset, this will just set it to the old value
317                //If we deleted the first event(s), this will add the offsets,
318                //to ensure that events stay at the correct times
319                theIncident.setOffset(theIncident.offset + savedOffset);
320                parent.returnFocus();
321            }
322        });
323
324        incidentNumber.setText("" + this.theIncident.number);
325        incidentName.setText("" + this.theIncident.name);
326        incidentDescription.setText("" + this.theIncident.description);
327        zoomSlider.setValue(zoomSlider.getMinimum());
328        this.update(null, this.theIncident);
329    }
330
331    /**
332     * Update the GUI to reflect the model. If the script changed, update all
333     * the incident panels. If a timeslice changed, add any new events to the
334     * model. If an incident gained focus, update the incident info screen to
335     * display its details.
336     *
337     * @param o The observed object
338     * @param arg Either the script model or an incident event, depending on who
339     * called this update
340     */
341    @Override
342    public void update(Observable o, Object arg)
343    {
344        //Three possibilities: This is a general script update, or it's one of
345        //two different focus updates
346        if (arg instanceof ScriptIncident)
347        {
348            theIncident = (ScriptIncident) arg;
349
350            //Update the appropriate panels
351            timelineTickPanel.update(theIncident, incidentTimelinePanel1);
352            absoluteTimeStampPanel.update(theIncident, incidentTimelinePanel1);
353            relativeTimeStampPanel.update(theIncident, incidentTimelinePanel1);
354
355            incidentTimelinePanel1.timelinePanelUpdate(theIncident);
356
357            incidentNumberPanel1.update(theIncident);
358
359            /**
360             * DefaultComboBoxModel model = new DefaultComboBoxModel(); for
361             * (ScriptIncident i : script.incidents) { if (i != null)
362             * model.addElement(i); } gotoIncident.setModel(model);*
363             */
364            this.setPreferredSize(this.getSize());
365            pack();
366        }
367        //A new timeslice has gained focus
368        else if (arg instanceof SliceChangedEvent)
369        {
370            TimeSlice slice = ((SliceChangedEvent) arg).slice;
371
372            //Put the relevant slice's events into a list
373            DefaultListModel model = new DefaultListModel();
374            for (I_ScriptEvent e : slice.events)
375            {
376                model.addElement(e);
377            }
378            scriptEventsList.setModel(model);
379        }
380        //A new incident has gained focus
381        //This really should only be called upon instantiaton of the window
382        else if (arg instanceof IncidentFocusedEvent)
383        {
384            ScriptIncident i = ((IncidentFocusedEvent) arg).incident;
385
386            //Put the incident's data in the incident description area
387            incidentNumber.setText(Integer.toString(i.number));
388            incidentName.setText(i.name);
389            incidentDescription.setText(i.description);
390
391            //gotoIncident.setSelectedItem(i);
392        }
393
394        //Regardless of update type, do these things to refresh the window
395        //Resize the zoom slider scale so that the most zoomed-out state displays
396        //the entire incident on the window
397        zoomSlider.setMinimum(((timelineTickPanel.getVisibleRect().width - 20)
398                * ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION)
399                / Math.max(theIncident.length, ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH));
400        zoomSlider.setMaximum(zoomSlider.getMinimum() + 20);
401    }
402
403    /**
404     * This method is called from within the constructor to initialize the form.
405     * WARNING: Do NOT modify this code. The content of this method is always
406     * regenerated by the Form Editor.
407     */
408    @SuppressWarnings("unchecked")
409    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
410    private void initComponents()
411    {
412
413        eventPopupMenu = new javax.swing.JPopupMenu();
414        cadEvent = new javax.swing.JMenuItem();
415        jMenuItem2 = new javax.swing.JMenuItem();
416        radioEvent = new javax.swing.JMenuItem();
417        jMenuItem4 = new javax.swing.JMenuItem();
418        jMenuItem5 = new javax.swing.JMenuItem();
419        jMenuItem6 = new javax.swing.JMenuItem();
420        cadEventFrame = new javax.swing.JFrame();
421        jLabel5 = new javax.swing.JLabel();
422        radioEventFrame = new javax.swing.JFrame();
423        radioTypeLabel = new javax.swing.JLabel();
424        jLabel7 = new javax.swing.JLabel();
425        radioTypeComboBox = new javax.swing.JComboBox();
426        radioMessageScrollPane = new javax.swing.JScrollPane();
427        radioMessage = new javax.swing.JTextArea();
428        okButton = new javax.swing.JButton();
429        cancelButton = new javax.swing.JButton();
430        eventListPopupMenu = new javax.swing.JPopupMenu();
431        editEventList = new javax.swing.JMenuItem();
432        deleteEventList = new javax.swing.JMenuItem();
433        addNoiseFrame = new javax.swing.JFrame();
434        labelRadioChatter = new javax.swing.JLabel();
435        sliderRadioChatter = new javax.swing.JSlider();
436        sliderLaneClosures = new javax.swing.JSlider();
437        labelLaneClosures = new javax.swing.JLabel();
438        sliderTMCAL = new javax.swing.JSlider();
439        labelTMCAL = new javax.swing.JLabel();
440        labelNoiseDescription = new javax.swing.JTextArea();
441        sliderBackgroundNoise = new javax.swing.JSlider();
442        labelBackgroundNoise = new javax.swing.JLabel();
443        sliderMinorEvents = new javax.swing.JSlider();
444        labelMinorEvents = new javax.swing.JLabel();
445        btnCancelNoise = new javax.swing.JButton();
446        btnGenerateNoise = new javax.swing.JButton();
447        labelLeastFreq = new javax.swing.JLabel();
448        labelMostFreq = new javax.swing.JLabel();
449        timelinesScrollPane = new javax.swing.JScrollPane();
450        timelineTickPanel = new scriptbuilder.gui.panels.TimelineTickPanel();
451        incidentTimelinePanel1 = new scriptbuilder.gui.panels.IncidentTimelinePanel(false);
452        incidentNumberPanel1 = new scriptbuilder.gui.panels.IncidentNumberPanel();
453        scriptEventsPanel = new javax.swing.JPanel();
454        scriptEventsPane = new javax.swing.JScrollPane();
455        scriptEventsList = new javax.swing.JList();
456        zoomSlider = new javax.swing.JSlider();
457        incidentInformationPanel = new javax.swing.JPanel();
458        jLabel2 = new javax.swing.JLabel();
459        jLabel3 = new javax.swing.JLabel();
460        jLabel4 = new javax.swing.JLabel();
461        incidentName = new javax.swing.JTextField();
462        incidentDescriptionPane = new javax.swing.JScrollPane();
463        incidentDescription = new javax.swing.JTextArea();
464        incidentNumber = new javax.swing.JTextField();
465        selectButton = new javax.swing.JButton();
466        incidentEventsPanel = new javax.swing.JPanel();
467        maintenanceRadioButton = new javax.swing.JButton();
468        tmtRadioButton = new javax.swing.JButton();
469        telephoneButton = new javax.swing.JButton();
470        unitButton = new javax.swing.JButton();
471        witnessButton = new javax.swing.JButton();
472        paramicsButton = new javax.swing.JButton();
473        towButton = new javax.swing.JButton();
474        audioButton = new javax.swing.JButton();
475        cctvButton = new javax.swing.JButton();
476        cadButton = new javax.swing.JButton();
477        chpRadioButton = new javax.swing.JButton();
478        evaluationEventsPanel = new javax.swing.JPanel();
479        atmsEvalButton = new javax.swing.JButton();
480        cmsEvalButton = new javax.swing.JButton();
481        cadEvalButton = new javax.swing.JButton();
482        facilitatorEvalButton = new javax.swing.JButton();
483        activityLogEvalButton = new javax.swing.JButton();
484        radioEvalButton = new javax.swing.JButton();
485        zoomInIcon = new javax.swing.JLabel();
486        zoomOutIcon = new javax.swing.JLabel();
487        timeStampScrollPane = new javax.swing.JScrollPane();
488        absoluteTimeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel();
489        timeStampScrollPane1 = new javax.swing.JScrollPane();
490        relativeTimeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel();
491        addTimePanel = new javax.swing.JPanel();
492        btnAddTime = new javax.swing.JButton();
493        btnToggleTimeStart = new javax.swing.JRadioButton();
494        btnToggleTimeEnd = new javax.swing.JRadioButton();
495
496        cadEvent.setText("CAD Event");
497        cadEvent.addMouseListener(new java.awt.event.MouseAdapter()
498        {
499            public void mousePressed(java.awt.event.MouseEvent evt)
500            {
501                cadEventMousePressed(evt);
502            }
503            public void mouseReleased(java.awt.event.MouseEvent evt)
504            {
505                cadEventMouseReleased(evt);
506            }
507        });
508        eventPopupMenu.add(cadEvent);
509
510        jMenuItem2.setText("Paramics Event");
511        eventPopupMenu.add(jMenuItem2);
512
513        radioEvent.setText("Radio Event");
514        radioEvent.addMouseListener(new java.awt.event.MouseAdapter()
515        {
516            public void mousePressed(java.awt.event.MouseEvent evt)
517            {
518                radioEventMousePressed(evt);
519            }
520        });
521        eventPopupMenu.add(radioEvent);
522
523        jMenuItem4.setText("Telephone Event");
524        eventPopupMenu.add(jMenuItem4);
525
526        jMenuItem5.setText("Video Event");
527        eventPopupMenu.add(jMenuItem5);
528
529        jMenuItem6.setText("Evaluation Event");
530        eventPopupMenu.add(jMenuItem6);
531
532        cadEventFrame.setMinimumSize(new java.awt.Dimension(400, 300));
533
534        jLabel5.setText("CAD Entry");
535
536        javax.swing.GroupLayout cadEventFrameLayout = new javax.swing.GroupLayout(cadEventFrame.getContentPane());
537        cadEventFrame.getContentPane().setLayout(cadEventFrameLayout);
538        cadEventFrameLayout.setHorizontalGroup(
539            cadEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
540            .addGroup(cadEventFrameLayout.createSequentialGroup()
541                .addContainerGap()
542                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
543                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
544        );
545        cadEventFrameLayout.setVerticalGroup(
546            cadEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
547            .addGroup(cadEventFrameLayout.createSequentialGroup()
548                .addContainerGap()
549                .addComponent(jLabel5)
550                .addContainerGap(1357, Short.MAX_VALUE))
551        );
552
553        radioEventFrame.setTitle("Add Radio Event");
554        radioEventFrame.setMinimumSize(new java.awt.Dimension(400, 300));
555
556        radioTypeLabel.setText("Radio Type:");
557
558        jLabel7.setText("Radio Message:");
559
560        radioTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "TMT", "Maintanence" }));
561
562        radioMessageScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
563
564        radioMessage.setColumns(20);
565        radioMessage.setLineWrap(true);
566        radioMessage.setRows(5);
567        radioMessage.setWrapStyleWord(true);
568        radioMessageScrollPane.setViewportView(radioMessage);
569
570        okButton.setText("OK");
571        okButton.addActionListener(new java.awt.event.ActionListener()
572        {
573            public void actionPerformed(java.awt.event.ActionEvent evt)
574            {
575                okButtonActionPerformed(evt);
576            }
577        });
578
579        cancelButton.setText("Cancel");
580        cancelButton.addActionListener(new java.awt.event.ActionListener()
581        {
582            public void actionPerformed(java.awt.event.ActionEvent evt)
583            {
584                cancelButtonActionPerformed(evt);
585            }
586        });
587
588        javax.swing.GroupLayout radioEventFrameLayout = new javax.swing.GroupLayout(radioEventFrame.getContentPane());
589        radioEventFrame.getContentPane().setLayout(radioEventFrameLayout);
590        radioEventFrameLayout.setHorizontalGroup(
591            radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
592            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, radioEventFrameLayout.createSequentialGroup()
593                .addContainerGap()
594                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
595                    .addComponent(radioMessageScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
596                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, radioEventFrameLayout.createSequentialGroup()
597                        .addComponent(radioTypeLabel)
598                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
599                        .addComponent(radioTypeComboBox, 0, 312, Short.MAX_VALUE))
600                    .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING)
601                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, radioEventFrameLayout.createSequentialGroup()
602                        .addComponent(cancelButton)
603                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 246, Short.MAX_VALUE)
604                        .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))
605                .addContainerGap())
606        );
607        radioEventFrameLayout.setVerticalGroup(
608            radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
609            .addGroup(radioEventFrameLayout.createSequentialGroup()
610                .addContainerGap()
611                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
612                    .addComponent(radioTypeLabel)
613                    .addComponent(radioTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
614                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
615                .addComponent(jLabel7)
616                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
617                .addComponent(radioMessageScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE)
618                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
619                .addGroup(radioEventFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
620                    .addComponent(okButton)
621                    .addComponent(cancelButton))
622                .addContainerGap())
623        );
624
625        editEventList.setText("Edit...");
626        editEventList.addActionListener(new java.awt.event.ActionListener()
627        {
628            public void actionPerformed(java.awt.event.ActionEvent evt)
629            {
630                editEventListActionPerformed(evt);
631            }
632        });
633        eventListPopupMenu.add(editEventList);
634
635        deleteEventList.setText("Delete...");
636        eventListPopupMenu.add(deleteEventList);
637
638        addNoiseFrame.setTitle("Generate Noise");
639        addNoiseFrame.setMinimumSize(new java.awt.Dimension(395, 315));
640        addNoiseFrame.setResizable(false);
641
642        labelRadioChatter.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
643        labelRadioChatter.setText("Radio Chatter: ");
644
645        labelLaneClosures.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
646        labelLaneClosures.setText("Lane Closures:");
647
648        labelTMCAL.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
649        labelTMCAL.setText("TMCAL Logs:");
650
651        labelNoiseDescription.setEditable(false);
652        labelNoiseDescription.setColumns(20);
653        labelNoiseDescription.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
654        labelNoiseDescription.setLineWrap(true);
655        labelNoiseDescription.setRows(5);
656        labelNoiseDescription.setText("Noise events will be randomly generated for the simulation with frequencies based on the control selections made below");
657        labelNoiseDescription.setWrapStyleWord(true);
658        labelNoiseDescription.setAutoscrolls(false);
659        labelNoiseDescription.setBorder(null);
660        labelNoiseDescription.setDisabledTextColor(new java.awt.Color(0, 0, 0));
661        labelNoiseDescription.setFocusable(false);
662        labelNoiseDescription.setOpaque(false);
663
664        labelBackgroundNoise.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
665        labelBackgroundNoise.setText("Background Noise: ");
666
667        labelMinorEvents.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
668        labelMinorEvents.setText("Minor Events:");
669
670        btnCancelNoise.setText("Cancel");
671        btnCancelNoise.addActionListener(new java.awt.event.ActionListener()
672        {
673            public void actionPerformed(java.awt.event.ActionEvent evt)
674            {
675                btnCancelNoiseActionPerformed(evt);
676            }
677        });
678
679        btnGenerateNoise.setText("Generate");
680        btnGenerateNoise.addActionListener(new java.awt.event.ActionListener()
681        {
682            public void actionPerformed(java.awt.event.ActionEvent evt)
683            {
684                btnGenerateNoiseActionPerformed(evt);
685            }
686        });
687
688        labelLeastFreq.setText("Least Frequent");
689
690        labelMostFreq.setText("Most Frequent");
691
692        javax.swing.GroupLayout addNoiseFrameLayout = new javax.swing.GroupLayout(addNoiseFrame.getContentPane());
693        addNoiseFrame.getContentPane().setLayout(addNoiseFrameLayout);
694        addNoiseFrameLayout.setHorizontalGroup(
695            addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
696            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
697                .addContainerGap(21, Short.MAX_VALUE)
698                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
699                    .addComponent(labelNoiseDescription, javax.swing.GroupLayout.Alignment.LEADING)
700                    .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
701                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup()
702                            .addComponent(btnCancelNoise)
703                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
704                            .addComponent(btnGenerateNoise))
705                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup()
706                            .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
707                                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
708                                    .addComponent(labelBackgroundNoise)
709                                    .addComponent(labelLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
710                                    .addComponent(labelTMCAL, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
711                                    .addComponent(labelRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
712                                .addComponent(labelMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
713                            .addGap(4, 4, 4)
714                            .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
715                                .addComponent(sliderRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
716                                .addComponent(sliderLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
717                                .addComponent(sliderTMCAL, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
718                                .addComponent(sliderMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
719                                .addComponent(sliderBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)
720                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
721                                    .addComponent(labelLeastFreq)
722                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
723                                    .addComponent(labelMostFreq))))))
724                .addGap(20, 20, 20))
725        );
726        addNoiseFrameLayout.setVerticalGroup(
727            addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
728            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup()
729                .addContainerGap()
730                .addComponent(labelNoiseDescription, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)
731                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
732                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
733                    .addComponent(labelMostFreq)
734                    .addComponent(labelLeastFreq))
735                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
736                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
737                    .addComponent(labelRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
738                    .addComponent(sliderRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
739                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
740                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
741                    .addComponent(labelLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
742                    .addComponent(sliderLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))
743                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
744                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
745                    .addComponent(labelTMCAL)
746                    .addComponent(sliderTMCAL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
747                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
748                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
749                    .addComponent(sliderBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
750                    .addComponent(labelBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
751                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
752                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
753                    .addComponent(sliderMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
754                    .addComponent(labelMinorEvents))
755                .addGap(18, 18, 18)
756                .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
757                    .addComponent(btnCancelNoise)
758                    .addComponent(btnGenerateNoise))
759                .addContainerGap())
760        );
761
762        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
763        setTitle("Incident Editor");
764        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
765        setMinimumSize(new java.awt.Dimension(800, 700));
766
767        timelinesScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
768        timelinesScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
769        timelinesScrollPane.setFocusCycleRoot(true);
770        timelinesScrollPane.setFocusTraversalPolicyProvider(true);
771        timelinesScrollPane.setPreferredSize(new java.awt.Dimension(72000, 1341));
772
773        timelineTickPanel.setMaximumSize(new java.awt.Dimension(7200, 32767));
774        timelineTickPanel.setMinimumSize(new java.awt.Dimension(7200, 0));
775        timelineTickPanel.setPreferredSize(new java.awt.Dimension(7200, 1317));
776
777        incidentTimelinePanel1.setMaximumSize(new java.awt.Dimension(32767, 100));
778        incidentTimelinePanel1.setOpaque(false);
779        incidentTimelinePanel1.setPreferredSize(new java.awt.Dimension(691, 100));
780
781        javax.swing.GroupLayout incidentTimelinePanel1Layout = new javax.swing.GroupLayout(incidentTimelinePanel1);
782        incidentTimelinePanel1.setLayout(incidentTimelinePanel1Layout);
783        incidentTimelinePanel1Layout.setHorizontalGroup(
784            incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
785            .addGap(0, 6776, Short.MAX_VALUE)
786        );
787        incidentTimelinePanel1Layout.setVerticalGroup(
788            incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
789            .addGap(0, 334, Short.MAX_VALUE)
790        );
791
792        incidentNumberPanel1.setOpaque(false);
793
794        javax.swing.GroupLayout incidentNumberPanel1Layout = new javax.swing.GroupLayout(incidentNumberPanel1);
795        incidentNumberPanel1.setLayout(incidentNumberPanel1Layout);
796        incidentNumberPanel1Layout.setHorizontalGroup(
797            incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
798            .addGap(0, 106, Short.MAX_VALUE)
799        );
800        incidentNumberPanel1Layout.setVerticalGroup(
801            incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
802            .addGap(0, 0, Short.MAX_VALUE)
803        );
804
805        javax.swing.GroupLayout timelineTickPanelLayout = new javax.swing.GroupLayout(timelineTickPanel);
806        timelineTickPanel.setLayout(timelineTickPanelLayout);
807        timelineTickPanelLayout.setHorizontalGroup(
808            timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
809            .addGroup(timelineTickPanelLayout.createSequentialGroup()
810                .addContainerGap()
811                .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
812                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
813                .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 6776, javax.swing.GroupLayout.PREFERRED_SIZE)
814                .addContainerGap(300, Short.MAX_VALUE))
815        );
816        timelineTickPanelLayout.setVerticalGroup(
817            timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
818            .addGroup(timelineTickPanelLayout.createSequentialGroup()
819                .addContainerGap()
820                .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
821                    .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 334, Short.MAX_VALUE)
822                    .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
823                .addContainerGap(977, Short.MAX_VALUE))
824        );
825
826        timelinesScrollPane.setViewportView(timelineTickPanel);
827
828        scriptEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Script Events"));
829
830        scriptEventsPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
831
832        scriptEventsList.setModel(new DefaultListModel());
833        scriptEventsList.setComponentPopupMenu(eventListPopupMenu);
834        scriptEventsPane.setViewportView(scriptEventsList);
835
836        javax.swing.GroupLayout scriptEventsPanelLayout = new javax.swing.GroupLayout(scriptEventsPanel);
837        scriptEventsPanel.setLayout(scriptEventsPanelLayout);
838        scriptEventsPanelLayout.setHorizontalGroup(
839            scriptEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
840            .addGroup(scriptEventsPanelLayout.createSequentialGroup()
841                .addContainerGap()
842                .addComponent(scriptEventsPane)
843                .addContainerGap())
844        );
845        scriptEventsPanelLayout.setVerticalGroup(
846            scriptEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
847            .addGroup(scriptEventsPanelLayout.createSequentialGroup()
848                .addComponent(scriptEventsPane, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
849                .addContainerGap())
850        );
851
852        zoomSlider.setMaximum(22);
853        zoomSlider.setMinimum(4);
854        zoomSlider.setOrientation(javax.swing.JSlider.VERTICAL);
855        zoomSlider.setValue(4);
856        zoomSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
857        zoomSlider.setFocusable(false);
858        zoomSlider.addChangeListener(new javax.swing.event.ChangeListener()
859        {
860            public void stateChanged(javax.swing.event.ChangeEvent evt)
861            {
862                zoomSliderStateChanged(evt);
863            }
864        });
865
866        incidentInformationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Information"));
867
868        jLabel2.setText("Incident Number:");
869
870        jLabel3.setText("Incident Name:");
871
872        jLabel4.setText("Incident Description:");
873
874        incidentName.setEditable(false);
875        incidentName.setText("Media");
876
877        incidentDescriptionPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
878
879        incidentDescription.setEditable(false);
880        incidentDescription.setColumns(20);
881        incidentDescription.setLineWrap(true);
882        incidentDescription.setRows(5);
883        incidentDescription.setText("All media message events are found in this incident.");
884        incidentDescription.setWrapStyleWord(true);
885        incidentDescriptionPane.setViewportView(incidentDescription);
886
887        incidentNumber.setEditable(false);
888        incidentNumber.setText("100");
889
890        javax.swing.GroupLayout incidentInformationPanelLayout = new javax.swing.GroupLayout(incidentInformationPanel);
891        incidentInformationPanel.setLayout(incidentInformationPanelLayout);
892        incidentInformationPanelLayout.setHorizontalGroup(
893            incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
894            .addGroup(incidentInformationPanelLayout.createSequentialGroup()
895                .addContainerGap()
896                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
897                    .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.Alignment.TRAILING)
898                    .addComponent(jLabel4)
899                    .addGroup(incidentInformationPanelLayout.createSequentialGroup()
900                        .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
901                            .addComponent(jLabel2)
902                            .addComponent(jLabel3))
903                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
904                        .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
905                            .addComponent(incidentName)
906                            .addComponent(incidentNumber))))
907                .addContainerGap())
908        );
909        incidentInformationPanelLayout.setVerticalGroup(
910            incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
911            .addGroup(incidentInformationPanelLayout.createSequentialGroup()
912                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
913                    .addComponent(jLabel2)
914                    .addComponent(incidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
915                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
916                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
917                    .addComponent(incidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
918                    .addComponent(jLabel3))
919                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
920                .addComponent(jLabel4)
921                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
922                .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
923                .addContainerGap())
924        );
925
926        selectButton.setToolTipText("Select");
927        selectButton.setFocusPainted(false);
928        selectButton.setIconTextGap(0);
929        selectButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
930        selectButton.setPreferredSize(new java.awt.Dimension(30, 25));
931        selectButton.addActionListener(new java.awt.event.ActionListener()
932        {
933            public void actionPerformed(java.awt.event.ActionEvent evt)
934            {
935                selectButtonActionPerformed(evt);
936            }
937        });
938
939        incidentEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Events"));
940
941        maintenanceRadioButton.setText("Maintenance Radio");
942        maintenanceRadioButton.setToolTipText("");
943        maintenanceRadioButton.setFocusPainted(false);
944        maintenanceRadioButton.setIconTextGap(0);
945        maintenanceRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
946        maintenanceRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
947        maintenanceRadioButton.addActionListener(new java.awt.event.ActionListener()
948        {
949            public void actionPerformed(java.awt.event.ActionEvent evt)
950            {
951                maintenanceRadioButtonActionPerformed(evt);
952            }
953        });
954
955        tmtRadioButton.setText("TMT Radio");
956        tmtRadioButton.setToolTipText("");
957        tmtRadioButton.setFocusPainted(false);
958        tmtRadioButton.setIconTextGap(0);
959        tmtRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
960        tmtRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
961        tmtRadioButton.addActionListener(new java.awt.event.ActionListener()
962        {
963            public void actionPerformed(java.awt.event.ActionEvent evt)
964            {
965                tmtRadioButtonActionPerformed(evt);
966            }
967        });
968
969        telephoneButton.setText("Telephone");
970        telephoneButton.setToolTipText("");
971        telephoneButton.setFocusPainted(false);
972        telephoneButton.setIconTextGap(0);
973        telephoneButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
974        telephoneButton.setPreferredSize(new java.awt.Dimension(30, 25));
975        telephoneButton.addActionListener(new java.awt.event.ActionListener()
976        {
977            public void actionPerformed(java.awt.event.ActionEvent evt)
978            {
979                telephoneButtonActionPerformed(evt);
980            }
981        });
982
983        unitButton.setText("Unit");
984        unitButton.setToolTipText("");
985        unitButton.setFocusPainted(false);
986        unitButton.setIconTextGap(0);
987        unitButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
988        unitButton.setPreferredSize(new java.awt.Dimension(30, 25));
989        unitButton.addActionListener(new java.awt.event.ActionListener()
990        {
991            public void actionPerformed(java.awt.event.ActionEvent evt)
992            {
993                unitButtonActionPerformed(evt);
994            }
995        });
996
997        witnessButton.setText("Witness");
998        witnessButton.setToolTipText("");
999        witnessButton.setFocusPainted(false);
1000        witnessButton.setIconTextGap(0);
1001        witnessButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1002        witnessButton.setPreferredSize(new java.awt.Dimension(30, 25));
1003        witnessButton.addActionListener(new java.awt.event.ActionListener()
1004        {
1005            public void actionPerformed(java.awt.event.ActionEvent evt)
1006            {
1007                witnessButtonActionPerformed(evt);
1008            }
1009        });
1010
1011        paramicsButton.setText("Paramics");
1012        paramicsButton.setToolTipText("");
1013        paramicsButton.setFocusPainted(false);
1014        paramicsButton.setIconTextGap(0);
1015        paramicsButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1016        paramicsButton.setPreferredSize(new java.awt.Dimension(30, 25));
1017        paramicsButton.addActionListener(new java.awt.event.ActionListener()
1018        {
1019            public void actionPerformed(java.awt.event.ActionEvent evt)
1020            {
1021                paramicsButtonActionPerformed(evt);
1022            }
1023        });
1024
1025        towButton.setText("Tow");
1026        towButton.setToolTipText("");
1027        towButton.setFocusPainted(false);
1028        towButton.setIconTextGap(0);
1029        towButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1030        towButton.setPreferredSize(new java.awt.Dimension(30, 25));
1031        towButton.addActionListener(new java.awt.event.ActionListener()
1032        {
1033            public void actionPerformed(java.awt.event.ActionEvent evt)
1034            {
1035                towButtonActionPerformed(evt);
1036            }
1037        });
1038
1039        audioButton.setText("Audio");
1040        audioButton.setToolTipText("");
1041        audioButton.setFocusPainted(false);
1042        audioButton.setIconTextGap(0);
1043        audioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1044        audioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1045        audioButton.addActionListener(new java.awt.event.ActionListener()
1046        {
1047            public void actionPerformed(java.awt.event.ActionEvent evt)
1048            {
1049                audioButtonActionPerformed(evt);
1050            }
1051        });
1052
1053        cctvButton.setText("CCTV");
1054        cctvButton.setToolTipText("");
1055        cctvButton.setFocusPainted(false);
1056        cctvButton.setIconTextGap(0);
1057        cctvButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1058        cctvButton.setPreferredSize(new java.awt.Dimension(30, 25));
1059        cctvButton.addActionListener(new java.awt.event.ActionListener()
1060        {
1061            public void actionPerformed(java.awt.event.ActionEvent evt)
1062            {
1063                cctvButtonActionPerformed(evt);
1064            }
1065        });
1066
1067        cadButton.setText("CAD");
1068        cadButton.setToolTipText("");
1069        cadButton.setFocusPainted(false);
1070        cadButton.setIconTextGap(0);
1071        cadButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1072        cadButton.setPreferredSize(new java.awt.Dimension(30, 25));
1073        cadButton.addActionListener(new java.awt.event.ActionListener()
1074        {
1075            public void actionPerformed(java.awt.event.ActionEvent evt)
1076            {
1077                cadButtonActionPerformed(evt);
1078            }
1079        });
1080
1081        chpRadioButton.setText("CHP Radio");
1082        chpRadioButton.setToolTipText("");
1083        chpRadioButton.setFocusPainted(false);
1084        chpRadioButton.setIconTextGap(0);
1085        chpRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1086        chpRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1087        chpRadioButton.addActionListener(new java.awt.event.ActionListener()
1088        {
1089            public void actionPerformed(java.awt.event.ActionEvent evt)
1090            {
1091                chpRadioButtonActionPerformed(evt);
1092            }
1093        });
1094
1095        javax.swing.GroupLayout incidentEventsPanelLayout = new javax.swing.GroupLayout(incidentEventsPanel);
1096        incidentEventsPanel.setLayout(incidentEventsPanelLayout);
1097        incidentEventsPanelLayout.setHorizontalGroup(
1098            incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1099            .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1100                .addContainerGap()
1101                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1102                    .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1103                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentEventsPanelLayout.createSequentialGroup()
1104                            .addComponent(maintenanceRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1105                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1106                            .addComponent(tmtRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1107                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1108                            .addComponent(telephoneButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1109                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1110                            .addComponent(paramicsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
1111                        .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1112                            .addComponent(towButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1113                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1114                            .addComponent(unitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1115                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1116                            .addComponent(witnessButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1117                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1118                            .addComponent(audioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
1119                    .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1120                        .addComponent(cadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1121                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1122                        .addComponent(cctvButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1123                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1124                        .addComponent(chpRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
1125                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1126        );
1127        incidentEventsPanelLayout.setVerticalGroup(
1128            incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1129            .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1130                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1131                    .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1132                        .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1133                            .addComponent(maintenanceRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1134                            .addComponent(tmtRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1135                            .addComponent(telephoneButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1136                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1137                        .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1138                            .addComponent(towButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1139                            .addComponent(unitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1140                            .addComponent(witnessButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1141                            .addComponent(audioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1142                    .addComponent(paramicsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1143                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1144                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1145                    .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1146                        .addComponent(cctvButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1147                        .addComponent(chpRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1148                    .addComponent(cadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1149        );
1150
1151        evaluationEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Evaluation Events"));
1152
1153        atmsEvalButton.setText("ATMS Evaluation");
1154        atmsEvalButton.setToolTipText("");
1155        atmsEvalButton.setFocusPainted(false);
1156        atmsEvalButton.setIconTextGap(0);
1157        atmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1158        atmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1159        atmsEvalButton.addActionListener(new java.awt.event.ActionListener()
1160        {
1161            public void actionPerformed(java.awt.event.ActionEvent evt)
1162            {
1163                atmsEvalButtonActionPerformed(evt);
1164            }
1165        });
1166
1167        cmsEvalButton.setText("CMS Evaluation");
1168        cmsEvalButton.setToolTipText("");
1169        cmsEvalButton.setFocusPainted(false);
1170        cmsEvalButton.setIconTextGap(0);
1171        cmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1172        cmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1173        cmsEvalButton.addActionListener(new java.awt.event.ActionListener()
1174        {
1175            public void actionPerformed(java.awt.event.ActionEvent evt)
1176            {
1177                cmsEvalButtonActionPerformed(evt);
1178            }
1179        });
1180
1181        cadEvalButton.setText("CAD Evaluation");
1182        cadEvalButton.setToolTipText("");
1183        cadEvalButton.setFocusPainted(false);
1184        cadEvalButton.setIconTextGap(0);
1185        cadEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1186        cadEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1187        cadEvalButton.addActionListener(new java.awt.event.ActionListener()
1188        {
1189            public void actionPerformed(java.awt.event.ActionEvent evt)
1190            {
1191                cadEvalButtonActionPerformed(evt);
1192            }
1193        });
1194
1195        facilitatorEvalButton.setText("Facilitator Evaluation");
1196        facilitatorEvalButton.setToolTipText("");
1197        facilitatorEvalButton.setFocusPainted(false);
1198        facilitatorEvalButton.setIconTextGap(0);
1199        facilitatorEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1200        facilitatorEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1201        facilitatorEvalButton.addActionListener(new java.awt.event.ActionListener()
1202        {
1203            public void actionPerformed(java.awt.event.ActionEvent evt)
1204            {
1205                facilitatorEvalButtonActionPerformed(evt);
1206            }
1207        });
1208
1209        activityLogEvalButton.setText("Activity Log Evaluation");
1210        activityLogEvalButton.setToolTipText("");
1211        activityLogEvalButton.setFocusPainted(false);
1212        activityLogEvalButton.setIconTextGap(0);
1213        activityLogEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1214        activityLogEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1215        activityLogEvalButton.addActionListener(new java.awt.event.ActionListener()
1216        {
1217            public void actionPerformed(java.awt.event.ActionEvent evt)
1218            {
1219                activityLogEvalButtonActionPerformed(evt);
1220            }
1221        });
1222
1223        radioEvalButton.setText("Radio Evaluation");
1224        radioEvalButton.setToolTipText("");
1225        radioEvalButton.setFocusPainted(false);
1226        radioEvalButton.setIconTextGap(0);
1227        radioEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1228        radioEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1229        radioEvalButton.addActionListener(new java.awt.event.ActionListener()
1230        {
1231            public void actionPerformed(java.awt.event.ActionEvent evt)
1232            {
1233                radioEvalButtonActionPerformed(evt);
1234            }
1235        });
1236
1237        javax.swing.GroupLayout evaluationEventsPanelLayout = new javax.swing.GroupLayout(evaluationEventsPanel);
1238        evaluationEventsPanel.setLayout(evaluationEventsPanelLayout);
1239        evaluationEventsPanelLayout.setHorizontalGroup(
1240            evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1241            .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1242                .addContainerGap()
1243                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1244                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1245                        .addComponent(atmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1246                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1247                        .addComponent(activityLogEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
1248                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1249                        .addComponent(cmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1250                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1251                        .addComponent(facilitatorEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
1252                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1253                        .addComponent(cadEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1254                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1255                        .addComponent(radioEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
1256                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1257        );
1258        evaluationEventsPanelLayout.setVerticalGroup(
1259            evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1260            .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1261                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1262                    .addComponent(cmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1263                    .addComponent(facilitatorEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1264                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1265                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1266                    .addComponent(atmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1267                    .addComponent(activityLogEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1268                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1269                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1270                    .addComponent(cadEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1271                    .addComponent(radioEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1272        );
1273
1274        zoomInIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomIn.png"))); // NOI18N
1275        zoomInIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1276        zoomInIcon.addMouseListener(new java.awt.event.MouseAdapter()
1277        {
1278            public void mouseClicked(java.awt.event.MouseEvent evt)
1279            {
1280                zoomInIconMouseClicked(evt);
1281            }
1282        });
1283
1284        zoomOutIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomOut.png"))); // NOI18N
1285        zoomOutIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1286        zoomOutIcon.addMouseListener(new java.awt.event.MouseAdapter()
1287        {
1288            public void mouseClicked(java.awt.event.MouseEvent evt)
1289            {
1290                zoomOutIconMouseClicked(evt);
1291            }
1292        });
1293
1294        timeStampScrollPane.setBorder(null);
1295        timeStampScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
1296        timeStampScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1297
1298        javax.swing.GroupLayout absoluteTimeStampPanelLayout = new javax.swing.GroupLayout(absoluteTimeStampPanel);
1299        absoluteTimeStampPanel.setLayout(absoluteTimeStampPanelLayout);
1300        absoluteTimeStampPanelLayout.setHorizontalGroup(
1301            absoluteTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1302            .addGap(0, 1088, Short.MAX_VALUE)
1303        );
1304        absoluteTimeStampPanelLayout.setVerticalGroup(
1305            absoluteTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1306            .addGap(0, 100, Short.MAX_VALUE)
1307        );
1308
1309        timeStampScrollPane.setViewportView(absoluteTimeStampPanel);
1310
1311        timeStampScrollPane1.setBorder(null);
1312        timeStampScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
1313        timeStampScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1314
1315        javax.swing.GroupLayout relativeTimeStampPanelLayout = new javax.swing.GroupLayout(relativeTimeStampPanel);
1316        relativeTimeStampPanel.setLayout(relativeTimeStampPanelLayout);
1317        relativeTimeStampPanelLayout.setHorizontalGroup(
1318            relativeTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1319            .addGap(0, 1088, Short.MAX_VALUE)
1320        );
1321        relativeTimeStampPanelLayout.setVerticalGroup(
1322            relativeTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1323            .addGap(0, 100, Short.MAX_VALUE)
1324        );
1325
1326        timeStampScrollPane1.setViewportView(relativeTimeStampPanel);
1327
1328        btnAddTime.setText("+15:00");
1329        btnAddTime.addActionListener(new java.awt.event.ActionListener()
1330        {
1331            public void actionPerformed(java.awt.event.ActionEvent evt)
1332            {
1333                btnAddTimeActionPerformed(evt);
1334            }
1335        });
1336
1337        btnToggleTimeStart.setText("to Start");
1338        btnToggleTimeStart.addActionListener(new java.awt.event.ActionListener()
1339        {
1340            public void actionPerformed(java.awt.event.ActionEvent evt)
1341            {
1342                btnToggleTimeStartActionPerformed(evt);
1343            }
1344        });
1345
1346        btnToggleTimeEnd.setSelected(true);
1347        btnToggleTimeEnd.setText("to End");
1348        btnToggleTimeEnd.addActionListener(new java.awt.event.ActionListener()
1349        {
1350            public void actionPerformed(java.awt.event.ActionEvent evt)
1351            {
1352                btnToggleTimeEndActionPerformed(evt);
1353            }
1354        });
1355
1356        javax.swing.GroupLayout addTimePanelLayout = new javax.swing.GroupLayout(addTimePanel);
1357        addTimePanel.setLayout(addTimePanelLayout);
1358        addTimePanelLayout.setHorizontalGroup(
1359            addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1360            .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
1361            .addGroup(addTimePanelLayout.createSequentialGroup()
1362                .addGroup(addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1363                    .addComponent(btnToggleTimeStart)
1364                    .addComponent(btnToggleTimeEnd))
1365                .addGap(0, 0, Short.MAX_VALUE))
1366        );
1367        addTimePanelLayout.setVerticalGroup(
1368            addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1369            .addGroup(addTimePanelLayout.createSequentialGroup()
1370                .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
1371                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1372                .addComponent(btnToggleTimeStart)
1373                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1374                .addComponent(btnToggleTimeEnd)
1375                .addGap(0, 0, Short.MAX_VALUE))
1376        );
1377
1378        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
1379        getContentPane().setLayout(layout);
1380        layout.setHorizontalGroup(
1381            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1382            .addGroup(layout.createSequentialGroup()
1383                .addContainerGap()
1384                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1385                    .addGroup(layout.createSequentialGroup()
1386                        .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
1387                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1388                        .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1389                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1390                        .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1391                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1392                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1393                            .addComponent(zoomInIcon)
1394                            .addComponent(zoomOutIcon)
1395                            .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1396                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1397                        .addComponent(addTimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1398                    .addComponent(timelinesScrollPane, 0, 0, Short.MAX_VALUE)
1399                    .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
1400                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1401                        .addComponent(incidentInformationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1402                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1403                        .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1404                    .addComponent(timeStampScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
1405                .addContainerGap())
1406        );
1407        layout.setVerticalGroup(
1408            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1409            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1410                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
1411                    .addGroup(layout.createSequentialGroup()
1412                        .addContainerGap()
1413                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1414                            .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1415                            .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1416                            .addGroup(layout.createSequentialGroup()
1417                                .addGap(47, 47, 47)
1418                                .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))))
1419                    .addGroup(layout.createSequentialGroup()
1420                        .addGap(9, 9, 9)
1421                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
1422                            .addGroup(layout.createSequentialGroup()
1423                                .addComponent(zoomInIcon)
1424                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1425                                .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
1426                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1427                                .addComponent(zoomOutIcon))
1428                            .addComponent(addTimePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
1429                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1430                .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
1431                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1432                .addComponent(timeStampScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
1433                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1434                .addComponent(timelinesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
1435                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1436                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1437                    .addComponent(incidentInformationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1438                    .addComponent(scriptEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1439                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1440        );
1441
1442        pack();
1443    }// </editor-fold>//GEN-END:initComponents
1444
1445    /**
1446     * Scale the timeline width based on zoom slider position.
1447     *
1448     * @param evt the state change event
1449     */
1450    private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged
1451        //Moving the zoom slider always refreshes the window
1452        ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue();
1453        this.update(null, theIncident);
1454        pack();
1455        repaint();
1456    }//GEN-LAST:event_zoomSliderStateChanged
1457
1458    private void cadEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMousePressed
1459    }//GEN-LAST:event_cadEventMousePressed
1460
1461    private void radioEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radioEventMousePressed
1462    }//GEN-LAST:event_radioEventMousePressed
1463
1464    private void cadEventMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMouseReleased
1465    }//GEN-LAST:event_cadEventMouseReleased
1466
1467    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
1468    }//GEN-LAST:event_okButtonActionPerformed
1469
1470    /**
1471     * If cancel button is pressed, close radio event editor
1472     *
1473     * @param evt the button press event
1474     */
1475    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
1476        radioMessage.setText("");
1477        radioTypeComboBox.setSelectedIndex(0);
1478        radioEventFrame.setVisible(false);
1479    }//GEN-LAST:event_cancelButtonActionPerformed
1480
1481    private void editEventListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editEventListActionPerformed
1482    }//GEN-LAST:event_editEventListActionPerformed
1483
1484    /**
1485     * Deselects new event type upon click of blank "select" button.
1486     *
1487     * @param evt the button press event
1488     */
1489    private void selectButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_selectButtonActionPerformed
1490        currentEventType = null;
1491        for (JButton eb : eventButtons)
1492        {
1493            eb.setSelected(false);
1494        }
1495        selectButton.setSelected(true);
1496    }//GEN-LAST:event_selectButtonActionPerformed
1497
1498    /**
1499     * Selects CAD_EVENT as the current type of new event, upon click of "CAD
1500     * Event" button.
1501     *
1502     * @param evt the button press event
1503     */
1504    private void cadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadButtonActionPerformed
1505        currentEventType = ScriptEventType.CAD_EVENT;
1506        for (JButton eb : eventButtons)
1507        {
1508            eb.setSelected(false);
1509        }
1510        cadButton.setSelected(true);
1511    }//GEN-LAST:event_cadButtonActionPerformed
1512
1513    /**
1514     * Selects CCTV_EVENT as the current type of new event, upon click of "CCTV
1515     * Event" button.
1516     *
1517     * @param evt the button press event
1518     */
1519    private void cctvButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cctvButtonActionPerformed
1520        currentEventType = ScriptEventType.CCTV_EVENT;
1521        for (JButton eb : eventButtons)
1522        {
1523            eb.setSelected(false);
1524        }
1525        cctvButton.setSelected(true);
1526    }//GEN-LAST:event_cctvButtonActionPerformed
1527
1528    /**
1529     * Selects CHP_RADIO_EVENT as the current type of new event, upon click of
1530     * "CHP Radio Event" button.
1531     *
1532     * @param evt the button press event
1533     */
1534    private void chpRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chpRadioButtonActionPerformed
1535        currentEventType = ScriptEventType.CHP_RADIO_EVENT;
1536        for (JButton eb : eventButtons)
1537        {
1538            eb.setSelected(false);
1539        }
1540        chpRadioButton.setSelected(true);
1541    }//GEN-LAST:event_chpRadioButtonActionPerformed
1542
1543    /**
1544     * Hides the noise generation screen upon click of the "Cancel" button.
1545     *
1546     * @param evt the button press event
1547     */
1548    private void btnCancelNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelNoiseActionPerformed
1549        addNoiseFrame.setVisible(false);
1550    }//GEN-LAST:event_btnCancelNoiseActionPerformed
1551
1552    /**
1553     * Generates random noise upon click of the "OK" button, then hides the
1554     * noise generation screen.
1555     *
1556     * @param evt the button press event
1557     */
1558    private void btnGenerateNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerateNoiseActionPerformed
1559        Random rng = new Random();
1560        ScriptEventType[] eventTypes = ScriptEventType.values();
1561
1562        /* For prototyping purpose, ignore the sliders and average their values */
1563        int total = sliderRadioChatter.getValue() + sliderLaneClosures.getValue() + sliderTMCAL.getValue() + sliderMinorEvents.getValue() + sliderBackgroundNoise.getValue();
1564        total /= 5;
1565
1566        for (int i = 0; i < theIncident.slices.size(); i++)
1567        {
1568            theIncident.slices.get(i).events.clear();
1569        }
1570
1571        for (int i = 0; i < total; i++)
1572        {
1573            int n = rng.nextInt();
1574            int s = rng.nextInt();
1575            int e = rng.nextInt();
1576            if (n < 0)
1577            {
1578                n *= -1;
1579            }
1580            if (s < 0)
1581            {
1582                s *= -1;
1583            }
1584            if (e < 0)
1585            {
1586                e *= -1;
1587            }
1588
1589            theIncident.slices.get(s % (theIncident.slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length]));
1590        }
1591
1592        addNoiseFrame.setVisible(false);
1593
1594        this.update(null, theIncident);
1595}//GEN-LAST:event_btnGenerateNoiseActionPerformed
1596
1597    /**
1598     * Selects WITNESS_EVENT as the current type of new event, upon click of
1599     * "Witness Event" button.
1600     *
1601     * @param evt the button press event
1602     */
1603    private void witnessButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_witnessButtonActionPerformed
1604        currentEventType = ScriptEventType.WITNESS_EVENT;
1605        for (JButton eb : eventButtons)
1606        {
1607            eb.setSelected(false);
1608        }
1609        witnessButton.setSelected(true);
1610    }//GEN-LAST:event_witnessButtonActionPerformed
1611
1612    /**
1613     * Selects UNIT_EVENT as the current type of new event, upon click of "Unit
1614     * Event" button.
1615     *
1616     * @param evt the button press event
1617     */
1618    private void unitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unitButtonActionPerformed
1619        currentEventType = ScriptEventType.UNIT_EVENT;
1620        for (JButton eb : eventButtons)
1621        {
1622            eb.setSelected(false);
1623        }
1624        unitButton.setSelected(true);
1625    }//GEN-LAST:event_unitButtonActionPerformed
1626
1627    /**
1628     * Selects TOW_EVENT as the current type of new event, upon click of "TOW
1629     * Event" button.
1630     *
1631     * @param evt the button press event
1632     */
1633    private void towButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_towButtonActionPerformed
1634        currentEventType = ScriptEventType.TOW_EVENT;
1635        for (JButton eb : eventButtons)
1636        {
1637            eb.setSelected(false);
1638        }
1639        towButton.setSelected(true);
1640    }//GEN-LAST:event_towButtonActionPerformed
1641
1642    /**
1643     * Selects PARAMICS_EVENT as the current type of new event, upon click of
1644     * "Paramics Event" button.
1645     *
1646     * @param evt the button press event
1647     */
1648    private void paramicsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_paramicsButtonActionPerformed
1649        currentEventType = ScriptEventType.PARAMICS_EVENT;
1650        for (JButton eb : eventButtons)
1651        {
1652            eb.setSelected(false);
1653        }
1654        paramicsButton.setSelected(true);
1655    }//GEN-LAST:event_paramicsButtonActionPerformed
1656
1657    /**
1658     * Selects MAINTENANCE_RADIO_EVENT as the current type of new event, upon
1659     * click of "Maintenance Radio Event" button.
1660     *
1661     * @param evt the button press event
1662     */
1663    private void maintenanceRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maintenanceRadioButtonActionPerformed
1664        currentEventType = ScriptEventType.MAINTENANCE_RADIO_EVENT;
1665        for (JButton eb : eventButtons)
1666        {
1667            eb.setSelected(false);
1668        }
1669        maintenanceRadioButton.setSelected(true);
1670    }//GEN-LAST:event_maintenanceRadioButtonActionPerformed
1671
1672    /**
1673     * Selects ATMS_EVAL_EVENT as the current type of new event, upon click of
1674     * "ATMS Evaluation Event" button.
1675     *
1676     * @param evt the button press event
1677     */
1678    private void atmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_atmsEvalButtonActionPerformed
1679        currentEventType = ScriptEventType.ATMS_EVAL_EVENT;
1680        for (JButton eb : eventButtons)
1681        {
1682            eb.setSelected(false);
1683        }
1684        atmsEvalButton.setSelected(true);
1685    }//GEN-LAST:event_atmsEvalButtonActionPerformed
1686
1687    /**
1688     * Selects TELEPHONE_EVENT as the current type of new event, upon click of
1689     * "Telephone Event" button.
1690     *
1691     * @param evt the button press event
1692     */
1693    private void telephoneButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_telephoneButtonActionPerformed
1694        currentEventType = ScriptEventType.TELEPHONE_EVENT;
1695        for (JButton eb : eventButtons)
1696        {
1697            eb.setSelected(false);
1698        }
1699        telephoneButton.setSelected(true);
1700    }//GEN-LAST:event_telephoneButtonActionPerformed
1701
1702    /**
1703     * Selects TMT_RADIO_EVENT as the current type of new event, upon click of
1704     * "TMT Radio Event" button.
1705     *
1706     * @param evt the button press event
1707     */
1708    private void tmtRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tmtRadioButtonActionPerformed
1709        currentEventType = ScriptEventType.TMT_RADIO_EVENT;
1710        for (JButton eb : eventButtons)
1711        {
1712            eb.setSelected(false);
1713        }
1714        tmtRadioButton.setSelected(true);
1715    }//GEN-LAST:event_tmtRadioButtonActionPerformed
1716
1717    /**
1718     * Selects CMS_EVAL_EVENT as the current type of new event, upon click of
1719     * "CMS Evaluation Event" button.
1720     *
1721     * @param evt the button press event
1722     */
1723    private void cmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmsEvalButtonActionPerformed
1724        currentEventType = ScriptEventType.CMS_EVAL_EVENT;
1725        for (JButton eb : eventButtons)
1726        {
1727            eb.setSelected(false);
1728        }
1729        cmsEvalButton.setSelected(true);
1730    }//GEN-LAST:event_cmsEvalButtonActionPerformed
1731
1732    /**
1733     * Selects CAD_EVAL_EVENT as the current type of new event, upon click of
1734     * "CAD Evaluation Event" button.
1735     *
1736     * @param evt the button press event
1737     */
1738    private void cadEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadEvalButtonActionPerformed
1739        currentEventType = ScriptEventType.CAD_EVAL_EVENT;
1740        for (JButton eb : eventButtons)
1741        {
1742            eb.setSelected(false);
1743        }
1744        cadEvalButton.setSelected(true);
1745    }//GEN-LAST:event_cadEvalButtonActionPerformed
1746
1747    /**
1748     * Selects ACTIVITY_LOG_EVAL_EVENT as the current type of new event, upon
1749     * click of "Activity Log Evaluation Event" button.
1750     *
1751     * @param evt the button press event
1752     */
1753    private void activityLogEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activityLogEvalButtonActionPerformed
1754        currentEventType = ScriptEventType.ACTIVITY_LOG_EVAL_EVENT;
1755        for (JButton eb : eventButtons)
1756        {
1757            eb.setSelected(false);
1758        }
1759        activityLogEvalButton.setSelected(true);
1760    }//GEN-LAST:event_activityLogEvalButtonActionPerformed
1761
1762    /**
1763     * Selects RADIO_EVAL_EVENT as the current type of new event, upon click of
1764     * "Radio Evaluation Event" button.
1765     *
1766     * @param evt the button press event
1767     */
1768    private void radioEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioEvalButtonActionPerformed
1769        currentEventType = ScriptEventType.RADIO_EVAL_EVENT;
1770        for (JButton eb : eventButtons)
1771        {
1772            eb.setSelected(false);
1773        }
1774        radioEvalButton.setSelected(true);
1775    }//GEN-LAST:event_radioEvalButtonActionPerformed
1776
1777    /**
1778     * Selects FACILITATOR_EVAL_EVENT as the current type of new event, upon
1779     * click of "Facilitator Evaluation Event" button.
1780     *
1781     * @param evt the button press event
1782     */
1783    private void facilitatorEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_facilitatorEvalButtonActionPerformed
1784        currentEventType = ScriptEventType.FACILITATOR_EVAL_EVENT;
1785        for (JButton eb : eventButtons)
1786        {
1787            eb.setSelected(false);
1788        }
1789        facilitatorEvalButton.setSelected(true);
1790    }//GEN-LAST:event_facilitatorEvalButtonActionPerformed
1791
1792    /**
1793     * Selects AUDIO_EVENT as the current type of new event, upon click of
1794     * "Audio Event" button.
1795     *
1796     * @param evt the button press event
1797     */
1798    private void audioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_audioButtonActionPerformed
1799        currentEventType = ScriptEventType.AUDIO_EVENT;
1800        for (JButton eb : eventButtons)
1801        {
1802            eb.setSelected(false);
1803        }
1804        audioButton.setSelected(true);
1805    }//GEN-LAST:event_audioButtonActionPerformed
1806
1807    /**
1808     * Increases zoom level upon click of the "Zoom in" icon.
1809     *
1810     * @param evt the mouse event
1811     */
1812    private void zoomInIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomInIconMouseClicked
1813        zoomSlider.setValue(zoomSlider.getValue() >= 21 ? 21 : zoomSlider.getValue() + 1);
1814    }//GEN-LAST:event_zoomInIconMouseClicked
1815
1816    /**
1817     * Decreases zoom level upon click of the "Zoom out" icon.
1818     *
1819     * @param evt the mouse event
1820     */
1821    private void zoomOutIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomOutIconMouseClicked
1822        zoomSlider.setValue(zoomSlider.getValue() <= 5 ? 5 : zoomSlider.getValue() - 1);
1823    }//GEN-LAST:event_zoomOutIconMouseClicked
1824
1825    /**
1826     * Add 15 minutes to the end of the timeline. This allows the user to add
1827     * new events past the current end of the incident
1828     *
1829     * @param evt the button press event
1830     */
1831    private void btnAddTimeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnAddTimeActionPerformed
1832    {//GEN-HEADEREND:event_btnAddTimeActionPerformed
1833        if (addToEnd)
1834        {
1835            incidentTimelinePanel1.requestedEditorFillerTime += IncidentTimelinePanel.FILLER_INTERVAL_SECONDS;
1836        }
1837        else
1838        {
1839            if (savedOffset - IncidentTimelinePanel.FILLER_INTERVAL_SECONDS >= 0)
1840            {
1841                savedOffset -= IncidentTimelinePanel.FILLER_INTERVAL_SECONDS;
1842                absoluteTimeStampPanel.setOffset(absoluteTimeStampPanel.offset
1843                        - IncidentTimelinePanel.FILLER_INTERVAL_SECONDS);
1844                theIncident.setOffset(theIncident.offset + IncidentTimelinePanel.FILLER_INTERVAL_SECONDS);
1845            }
1846            else
1847            {
1848                absoluteTimeStampPanel.setOffset(absoluteTimeStampPanel.offset
1849                        - savedOffset);
1850                theIncident.setOffset(theIncident.offset + savedOffset);
1851                savedOffset = 0;
1852            }
1853        }
1854        this.update(null, theIncident);
1855    }//GEN-LAST:event_btnAddTimeActionPerformed
1856
1857    private void btnToggleTimeEndActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnToggleTimeEndActionPerformed
1858    {//GEN-HEADEREND:event_btnToggleTimeEndActionPerformed
1859        btnToggleTimeEnd.setSelected(true);
1860        btnToggleTimeStart.setSelected(false);
1861        addToEnd = true;
1862    }//GEN-LAST:event_btnToggleTimeEndActionPerformed
1863
1864    private void btnToggleTimeStartActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnToggleTimeStartActionPerformed
1865    {//GEN-HEADEREND:event_btnToggleTimeStartActionPerformed
1866        btnToggleTimeStart.setSelected(true);
1867        btnToggleTimeEnd.setSelected(false);
1868        addToEnd = false;
1869    }//GEN-LAST:event_btnToggleTimeStartActionPerformed
1870
1871    /**
1872     * Read the version number from the application properties. The file
1873     * 'application.properties' is generated by build.xml.
1874     *
1875     * @return a version string obtained from application.properties file, or
1876     * "Version: unknown" if an IOerror prevents us from reading the file.
1877     */
1878    private String getAppVersion()
1879    {
1880        String propfilename = "/scriptbuilder/gui/application.properties";
1881        String propKey = "Application.revision";
1882        String version = "unknown";
1883        // Load the application properties (created by build.xml)
1884        try
1885        {
1886            Properties props = new Properties();
1887            props.load(this.getClass().getResourceAsStream(propfilename));
1888            version = (String) props.get(propKey);
1889        }
1890        catch (IOException ex)
1891        {
1892            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
1893                    "ScriptBuilderFrame.getAppVersion()."
1894                    + " IOError reading " + propfilename);
1895        }
1896        catch (NullPointerException npe)
1897        {
1898            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
1899                    "ScriptBuilderFrame.getAppVersion().load."
1900                    + " Missing file: " + propfilename);
1901        }
1902        return version;
1903    }
1904
1905    // Variables declaration - do not modify//GEN-BEGIN:variables
1906    private scriptbuilder.gui.panels.TimeStampPanel absoluteTimeStampPanel;
1907    private javax.swing.JButton activityLogEvalButton;
1908    private javax.swing.JFrame addNoiseFrame;
1909    private javax.swing.JPanel addTimePanel;
1910    private javax.swing.JButton atmsEvalButton;
1911    private javax.swing.JButton audioButton;
1912    private javax.swing.JButton btnAddTime;
1913    private javax.swing.JButton btnCancelNoise;
1914    private javax.swing.JButton btnGenerateNoise;
1915    private javax.swing.JRadioButton btnToggleTimeEnd;
1916    private javax.swing.JRadioButton btnToggleTimeStart;
1917    private javax.swing.JButton cadButton;
1918    private javax.swing.JButton cadEvalButton;
1919    private javax.swing.JMenuItem cadEvent;
1920    private javax.swing.JFrame cadEventFrame;
1921    private javax.swing.JButton cancelButton;
1922    private javax.swing.JButton cctvButton;
1923    private javax.swing.JButton chpRadioButton;
1924    private javax.swing.JButton cmsEvalButton;
1925    private javax.swing.JMenuItem deleteEventList;
1926    private javax.swing.JMenuItem editEventList;
1927    private javax.swing.JPanel evaluationEventsPanel;
1928    private javax.swing.JPopupMenu eventListPopupMenu;
1929    private javax.swing.JPopupMenu eventPopupMenu;
1930    private javax.swing.JButton facilitatorEvalButton;
1931    private javax.swing.JTextArea incidentDescription;
1932    private javax.swing.JScrollPane incidentDescriptionPane;
1933    private javax.swing.JPanel incidentEventsPanel;
1934    private javax.swing.JPanel incidentInformationPanel;
1935    private javax.swing.JTextField incidentName;
1936    private javax.swing.JTextField incidentNumber;
1937    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel1;
1938    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel1;
1939    private javax.swing.JLabel jLabel2;
1940    private javax.swing.JLabel jLabel3;
1941    private javax.swing.JLabel jLabel4;
1942    private javax.swing.JLabel jLabel5;
1943    private javax.swing.JLabel jLabel7;
1944    private javax.swing.JMenuItem jMenuItem2;
1945    private javax.swing.JMenuItem jMenuItem4;
1946    private javax.swing.JMenuItem jMenuItem5;
1947    private javax.swing.JMenuItem jMenuItem6;
1948    private javax.swing.JLabel labelBackgroundNoise;
1949    private javax.swing.JLabel labelLaneClosures;
1950    private javax.swing.JLabel labelLeastFreq;
1951    private javax.swing.JLabel labelMinorEvents;
1952    private javax.swing.JLabel labelMostFreq;
1953    private javax.swing.JTextArea labelNoiseDescription;
1954    private javax.swing.JLabel labelRadioChatter;
1955    private javax.swing.JLabel labelTMCAL;
1956    private javax.swing.JButton maintenanceRadioButton;
1957    private javax.swing.JButton okButton;
1958    private javax.swing.JButton paramicsButton;
1959    private javax.swing.JButton radioEvalButton;
1960    private javax.swing.JMenuItem radioEvent;
1961    private javax.swing.JFrame radioEventFrame;
1962    private javax.swing.JTextArea radioMessage;
1963    private javax.swing.JScrollPane radioMessageScrollPane;
1964    private javax.swing.JComboBox radioTypeComboBox;
1965    private javax.swing.JLabel radioTypeLabel;
1966    private scriptbuilder.gui.panels.TimeStampPanel relativeTimeStampPanel;
1967    private javax.swing.JList scriptEventsList;
1968    private javax.swing.JScrollPane scriptEventsPane;
1969    private javax.swing.JPanel scriptEventsPanel;
1970    private javax.swing.JButton selectButton;
1971    private javax.swing.JSlider sliderBackgroundNoise;
1972    private javax.swing.JSlider sliderLaneClosures;
1973    private javax.swing.JSlider sliderMinorEvents;
1974    private javax.swing.JSlider sliderRadioChatter;
1975    private javax.swing.JSlider sliderTMCAL;
1976    private javax.swing.JButton telephoneButton;
1977    private javax.swing.JScrollPane timeStampScrollPane;
1978    private javax.swing.JScrollPane timeStampScrollPane1;
1979    private scriptbuilder.gui.panels.TimelineTickPanel timelineTickPanel;
1980    private javax.swing.JScrollPane timelinesScrollPane;
1981    private javax.swing.JButton tmtRadioButton;
1982    private javax.swing.JButton towButton;
1983    private javax.swing.JButton unitButton;
1984    private javax.swing.JButton witnessButton;
1985    private javax.swing.JLabel zoomInIcon;
1986    private javax.swing.JLabel zoomOutIcon;
1987    private javax.swing.JSlider zoomSlider;
1988    // End of variables declaration//GEN-END:variables
1989}
Note: See TracBrowser for help on using the repository browser.