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

Revision 135, 93.3 KB checked in by jdalbey, 9 years ago (diff)

IncidentEditorFrame?: Change "15:00" to "15" in order to fit in panel on Windows.

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