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

Revision 121, 93.0 KB checked in by bmcguffin, 9 years ago (diff)

Removed select button. Added ability to deselect event buttons by clicking on them a second time.

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
874        incidentDescriptionPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
875
876        incidentDescription.setEditable(false);
877        incidentDescription.setColumns(20);
878        incidentDescription.setLineWrap(true);
879        incidentDescription.setRows(5);
880        incidentDescription.setText("All media message events are found in this incident.");
881        incidentDescription.setWrapStyleWord(true);
882        incidentDescriptionPane.setViewportView(incidentDescription);
883
884        incidentNumber.setEditable(false);
885        incidentNumber.setText("100");
886
887        javax.swing.GroupLayout incidentInformationPanelLayout = new javax.swing.GroupLayout(incidentInformationPanel);
888        incidentInformationPanel.setLayout(incidentInformationPanelLayout);
889        incidentInformationPanelLayout.setHorizontalGroup(
890            incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
891            .addGroup(incidentInformationPanelLayout.createSequentialGroup()
892                .addContainerGap()
893                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
894                    .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.Alignment.TRAILING)
895                    .addComponent(jLabel4)
896                    .addGroup(incidentInformationPanelLayout.createSequentialGroup()
897                        .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
898                            .addComponent(jLabel2)
899                            .addComponent(jLabel3))
900                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
901                        .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
902                            .addComponent(incidentName)
903                            .addComponent(incidentNumber))))
904                .addContainerGap())
905        );
906        incidentInformationPanelLayout.setVerticalGroup(
907            incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
908            .addGroup(incidentInformationPanelLayout.createSequentialGroup()
909                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
910                    .addComponent(jLabel2)
911                    .addComponent(incidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
912                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
913                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
914                    .addComponent(incidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
915                    .addComponent(jLabel3))
916                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
917                .addComponent(jLabel4)
918                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
919                .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
920                .addContainerGap())
921        );
922
923        incidentEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Events"));
924
925        maintenanceRadioButton.setText("Maintenance Radio");
926        maintenanceRadioButton.setToolTipText("");
927        maintenanceRadioButton.setFocusPainted(false);
928        maintenanceRadioButton.setIconTextGap(0);
929        maintenanceRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
930        maintenanceRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
931        maintenanceRadioButton.addActionListener(new java.awt.event.ActionListener()
932        {
933            public void actionPerformed(java.awt.event.ActionEvent evt)
934            {
935                maintenanceRadioButtonActionPerformed(evt);
936            }
937        });
938
939        tmtRadioButton.setText("TMT Radio");
940        tmtRadioButton.setToolTipText("");
941        tmtRadioButton.setFocusPainted(false);
942        tmtRadioButton.setIconTextGap(0);
943        tmtRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
944        tmtRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
945        tmtRadioButton.addActionListener(new java.awt.event.ActionListener()
946        {
947            public void actionPerformed(java.awt.event.ActionEvent evt)
948            {
949                tmtRadioButtonActionPerformed(evt);
950            }
951        });
952
953        telephoneButton.setText("Telephone");
954        telephoneButton.setToolTipText("");
955        telephoneButton.setFocusPainted(false);
956        telephoneButton.setIconTextGap(0);
957        telephoneButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
958        telephoneButton.setPreferredSize(new java.awt.Dimension(30, 25));
959        telephoneButton.addActionListener(new java.awt.event.ActionListener()
960        {
961            public void actionPerformed(java.awt.event.ActionEvent evt)
962            {
963                telephoneButtonActionPerformed(evt);
964            }
965        });
966
967        unitButton.setText("Unit");
968        unitButton.setToolTipText("");
969        unitButton.setFocusPainted(false);
970        unitButton.setIconTextGap(0);
971        unitButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
972        unitButton.setPreferredSize(new java.awt.Dimension(30, 25));
973        unitButton.addActionListener(new java.awt.event.ActionListener()
974        {
975            public void actionPerformed(java.awt.event.ActionEvent evt)
976            {
977                unitButtonActionPerformed(evt);
978            }
979        });
980
981        witnessButton.setText("Witness");
982        witnessButton.setToolTipText("");
983        witnessButton.setFocusPainted(false);
984        witnessButton.setIconTextGap(0);
985        witnessButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
986        witnessButton.setPreferredSize(new java.awt.Dimension(30, 25));
987        witnessButton.addActionListener(new java.awt.event.ActionListener()
988        {
989            public void actionPerformed(java.awt.event.ActionEvent evt)
990            {
991                witnessButtonActionPerformed(evt);
992            }
993        });
994
995        paramicsButton.setText("Paramics");
996        paramicsButton.setToolTipText("");
997        paramicsButton.setFocusPainted(false);
998        paramicsButton.setIconTextGap(0);
999        paramicsButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1000        paramicsButton.setPreferredSize(new java.awt.Dimension(30, 25));
1001        paramicsButton.addActionListener(new java.awt.event.ActionListener()
1002        {
1003            public void actionPerformed(java.awt.event.ActionEvent evt)
1004            {
1005                paramicsButtonActionPerformed(evt);
1006            }
1007        });
1008
1009        towButton.setText("Tow");
1010        towButton.setToolTipText("");
1011        towButton.setFocusPainted(false);
1012        towButton.setIconTextGap(0);
1013        towButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1014        towButton.setPreferredSize(new java.awt.Dimension(30, 25));
1015        towButton.addActionListener(new java.awt.event.ActionListener()
1016        {
1017            public void actionPerformed(java.awt.event.ActionEvent evt)
1018            {
1019                towButtonActionPerformed(evt);
1020            }
1021        });
1022
1023        audioButton.setText("Audio");
1024        audioButton.setToolTipText("");
1025        audioButton.setFocusPainted(false);
1026        audioButton.setIconTextGap(0);
1027        audioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1028        audioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1029        audioButton.addActionListener(new java.awt.event.ActionListener()
1030        {
1031            public void actionPerformed(java.awt.event.ActionEvent evt)
1032            {
1033                audioButtonActionPerformed(evt);
1034            }
1035        });
1036
1037        cctvButton.setText("CCTV");
1038        cctvButton.setToolTipText("");
1039        cctvButton.setFocusPainted(false);
1040        cctvButton.setIconTextGap(0);
1041        cctvButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1042        cctvButton.setPreferredSize(new java.awt.Dimension(30, 25));
1043        cctvButton.addActionListener(new java.awt.event.ActionListener()
1044        {
1045            public void actionPerformed(java.awt.event.ActionEvent evt)
1046            {
1047                cctvButtonActionPerformed(evt);
1048            }
1049        });
1050
1051        cadButton.setText("CAD");
1052        cadButton.setToolTipText("");
1053        cadButton.setFocusPainted(false);
1054        cadButton.setIconTextGap(0);
1055        cadButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1056        cadButton.setPreferredSize(new java.awt.Dimension(30, 25));
1057        cadButton.addActionListener(new java.awt.event.ActionListener()
1058        {
1059            public void actionPerformed(java.awt.event.ActionEvent evt)
1060            {
1061                cadButtonActionPerformed(evt);
1062            }
1063        });
1064
1065        chpRadioButton.setText("CHP Radio");
1066        chpRadioButton.setToolTipText("");
1067        chpRadioButton.setFocusPainted(false);
1068        chpRadioButton.setIconTextGap(0);
1069        chpRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1070        chpRadioButton.setPreferredSize(new java.awt.Dimension(30, 25));
1071        chpRadioButton.addActionListener(new java.awt.event.ActionListener()
1072        {
1073            public void actionPerformed(java.awt.event.ActionEvent evt)
1074            {
1075                chpRadioButtonActionPerformed(evt);
1076            }
1077        });
1078
1079        javax.swing.GroupLayout incidentEventsPanelLayout = new javax.swing.GroupLayout(incidentEventsPanel);
1080        incidentEventsPanel.setLayout(incidentEventsPanelLayout);
1081        incidentEventsPanelLayout.setHorizontalGroup(
1082            incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1083            .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1084                .addContainerGap()
1085                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1086                    .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1087                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentEventsPanelLayout.createSequentialGroup()
1088                            .addComponent(maintenanceRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1089                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1090                            .addComponent(tmtRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1091                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1092                            .addComponent(telephoneButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1093                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1094                            .addComponent(paramicsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE))
1095                        .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1096                            .addComponent(towButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1097                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1098                            .addComponent(unitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1099                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1100                            .addComponent(witnessButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1101                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1102                            .addComponent(audioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
1103                    .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1104                        .addComponent(cadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1105                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1106                        .addComponent(cctvButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)
1107                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1108                        .addComponent(chpRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 120, javax.swing.GroupLayout.PREFERRED_SIZE)))
1109                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1110        );
1111        incidentEventsPanelLayout.setVerticalGroup(
1112            incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1113            .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1114                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1115                    .addGroup(incidentEventsPanelLayout.createSequentialGroup()
1116                        .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1117                            .addComponent(maintenanceRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1118                            .addComponent(tmtRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1119                            .addComponent(telephoneButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1120                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1121                        .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1122                            .addComponent(towButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1123                            .addComponent(unitButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1124                            .addComponent(witnessButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1125                            .addComponent(audioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1126                    .addComponent(paramicsButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1127                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1128                .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
1129                    .addGroup(incidentEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1130                        .addComponent(cctvButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1131                        .addComponent(chpRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1132                    .addComponent(cadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1133        );
1134
1135        evaluationEventsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Evaluation Events"));
1136
1137        atmsEvalButton.setText("ATMS Evaluation");
1138        atmsEvalButton.setToolTipText("");
1139        atmsEvalButton.setFocusPainted(false);
1140        atmsEvalButton.setIconTextGap(0);
1141        atmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1142        atmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1143        atmsEvalButton.addActionListener(new java.awt.event.ActionListener()
1144        {
1145            public void actionPerformed(java.awt.event.ActionEvent evt)
1146            {
1147                atmsEvalButtonActionPerformed(evt);
1148            }
1149        });
1150
1151        cmsEvalButton.setText("CMS Evaluation");
1152        cmsEvalButton.setToolTipText("");
1153        cmsEvalButton.setFocusPainted(false);
1154        cmsEvalButton.setIconTextGap(0);
1155        cmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1156        cmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1157        cmsEvalButton.addActionListener(new java.awt.event.ActionListener()
1158        {
1159            public void actionPerformed(java.awt.event.ActionEvent evt)
1160            {
1161                cmsEvalButtonActionPerformed(evt);
1162            }
1163        });
1164
1165        cadEvalButton.setText("CAD Evaluation");
1166        cadEvalButton.setToolTipText("");
1167        cadEvalButton.setFocusPainted(false);
1168        cadEvalButton.setIconTextGap(0);
1169        cadEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1170        cadEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1171        cadEvalButton.addActionListener(new java.awt.event.ActionListener()
1172        {
1173            public void actionPerformed(java.awt.event.ActionEvent evt)
1174            {
1175                cadEvalButtonActionPerformed(evt);
1176            }
1177        });
1178
1179        facilitatorEvalButton.setText("Facilitator Evaluation");
1180        facilitatorEvalButton.setToolTipText("");
1181        facilitatorEvalButton.setFocusPainted(false);
1182        facilitatorEvalButton.setIconTextGap(0);
1183        facilitatorEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1184        facilitatorEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1185        facilitatorEvalButton.addActionListener(new java.awt.event.ActionListener()
1186        {
1187            public void actionPerformed(java.awt.event.ActionEvent evt)
1188            {
1189                facilitatorEvalButtonActionPerformed(evt);
1190            }
1191        });
1192
1193        activityLogEvalButton.setText("Activity Log Evaluation");
1194        activityLogEvalButton.setToolTipText("");
1195        activityLogEvalButton.setFocusPainted(false);
1196        activityLogEvalButton.setIconTextGap(0);
1197        activityLogEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1198        activityLogEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1199        activityLogEvalButton.addActionListener(new java.awt.event.ActionListener()
1200        {
1201            public void actionPerformed(java.awt.event.ActionEvent evt)
1202            {
1203                activityLogEvalButtonActionPerformed(evt);
1204            }
1205        });
1206
1207        radioEvalButton.setText("Radio Evaluation");
1208        radioEvalButton.setToolTipText("");
1209        radioEvalButton.setFocusPainted(false);
1210        radioEvalButton.setIconTextGap(0);
1211        radioEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10));
1212        radioEvalButton.setPreferredSize(new java.awt.Dimension(30, 25));
1213        radioEvalButton.addActionListener(new java.awt.event.ActionListener()
1214        {
1215            public void actionPerformed(java.awt.event.ActionEvent evt)
1216            {
1217                radioEvalButtonActionPerformed(evt);
1218            }
1219        });
1220
1221        javax.swing.GroupLayout evaluationEventsPanelLayout = new javax.swing.GroupLayout(evaluationEventsPanel);
1222        evaluationEventsPanel.setLayout(evaluationEventsPanelLayout);
1223        evaluationEventsPanelLayout.setHorizontalGroup(
1224            evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1225            .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1226                .addContainerGap()
1227                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1228                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1229                        .addComponent(atmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1230                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1231                        .addComponent(activityLogEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
1232                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1233                        .addComponent(cmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1234                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1235                        .addComponent(facilitatorEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
1236                    .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1237                        .addComponent(cadEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
1238                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1239                        .addComponent(radioEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)))
1240                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1241        );
1242        evaluationEventsPanelLayout.setVerticalGroup(
1243            evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1244            .addGroup(evaluationEventsPanelLayout.createSequentialGroup()
1245                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1246                    .addComponent(cmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1247                    .addComponent(facilitatorEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1248                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1249                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1250                    .addComponent(atmsEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1251                    .addComponent(activityLogEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
1252                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1253                .addGroup(evaluationEventsPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
1254                    .addComponent(cadEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
1255                    .addComponent(radioEvalButton, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
1256        );
1257
1258        zoomInIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomIn.png"))); // NOI18N
1259        zoomInIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1260        zoomInIcon.addMouseListener(new java.awt.event.MouseAdapter()
1261        {
1262            public void mouseClicked(java.awt.event.MouseEvent evt)
1263            {
1264                zoomInIconMouseClicked(evt);
1265            }
1266        });
1267
1268        zoomOutIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomOut.png"))); // NOI18N
1269        zoomOutIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
1270        zoomOutIcon.addMouseListener(new java.awt.event.MouseAdapter()
1271        {
1272            public void mouseClicked(java.awt.event.MouseEvent evt)
1273            {
1274                zoomOutIconMouseClicked(evt);
1275            }
1276        });
1277
1278        timeStampScrollPane.setBorder(null);
1279        timeStampScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
1280        timeStampScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1281
1282        javax.swing.GroupLayout absoluteTimeStampPanelLayout = new javax.swing.GroupLayout(absoluteTimeStampPanel);
1283        absoluteTimeStampPanel.setLayout(absoluteTimeStampPanelLayout);
1284        absoluteTimeStampPanelLayout.setHorizontalGroup(
1285            absoluteTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1286            .addGap(0, 1088, Short.MAX_VALUE)
1287        );
1288        absoluteTimeStampPanelLayout.setVerticalGroup(
1289            absoluteTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1290            .addGap(0, 100, Short.MAX_VALUE)
1291        );
1292
1293        timeStampScrollPane.setViewportView(absoluteTimeStampPanel);
1294
1295        timeStampScrollPane1.setBorder(null);
1296        timeStampScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
1297        timeStampScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
1298
1299        javax.swing.GroupLayout relativeTimeStampPanelLayout = new javax.swing.GroupLayout(relativeTimeStampPanel);
1300        relativeTimeStampPanel.setLayout(relativeTimeStampPanelLayout);
1301        relativeTimeStampPanelLayout.setHorizontalGroup(
1302            relativeTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1303            .addGap(0, 1088, Short.MAX_VALUE)
1304        );
1305        relativeTimeStampPanelLayout.setVerticalGroup(
1306            relativeTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1307            .addGap(0, 100, Short.MAX_VALUE)
1308        );
1309
1310        timeStampScrollPane1.setViewportView(relativeTimeStampPanel);
1311
1312        btnAddTime.setText("+15:00");
1313        btnAddTime.addActionListener(new java.awt.event.ActionListener()
1314        {
1315            public void actionPerformed(java.awt.event.ActionEvent evt)
1316            {
1317                btnAddTimeActionPerformed(evt);
1318            }
1319        });
1320
1321        btnToggleTimeStart.setText("to Start");
1322        btnToggleTimeStart.addActionListener(new java.awt.event.ActionListener()
1323        {
1324            public void actionPerformed(java.awt.event.ActionEvent evt)
1325            {
1326                btnToggleTimeStartActionPerformed(evt);
1327            }
1328        });
1329
1330        btnToggleTimeEnd.setSelected(true);
1331        btnToggleTimeEnd.setText("to End");
1332        btnToggleTimeEnd.addActionListener(new java.awt.event.ActionListener()
1333        {
1334            public void actionPerformed(java.awt.event.ActionEvent evt)
1335            {
1336                btnToggleTimeEndActionPerformed(evt);
1337            }
1338        });
1339
1340        javax.swing.GroupLayout addTimePanelLayout = new javax.swing.GroupLayout(addTimePanel);
1341        addTimePanel.setLayout(addTimePanelLayout);
1342        addTimePanelLayout.setHorizontalGroup(
1343            addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1344            .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
1345            .addGroup(addTimePanelLayout.createSequentialGroup()
1346                .addGroup(addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1347                    .addComponent(btnToggleTimeStart)
1348                    .addComponent(btnToggleTimeEnd))
1349                .addGap(0, 0, Short.MAX_VALUE))
1350        );
1351        addTimePanelLayout.setVerticalGroup(
1352            addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1353            .addGroup(addTimePanelLayout.createSequentialGroup()
1354                .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
1355                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1356                .addComponent(btnToggleTimeStart)
1357                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1358                .addComponent(btnToggleTimeEnd)
1359                .addGap(0, 0, Short.MAX_VALUE))
1360        );
1361
1362        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
1363        getContentPane().setLayout(layout);
1364        layout.setHorizontalGroup(
1365            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1366            .addGroup(layout.createSequentialGroup()
1367                .addContainerGap()
1368                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1369                    .addGroup(layout.createSequentialGroup()
1370                        .addGap(46, 46, 46)
1371                        .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1372                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1373                        .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1374                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1375                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1376                            .addComponent(zoomInIcon)
1377                            .addComponent(zoomOutIcon)
1378                            .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1379                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1380                        .addComponent(addTimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1381                    .addComponent(timelinesScrollPane, 0, 0, Short.MAX_VALUE)
1382                    .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
1383                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1384                        .addComponent(incidentInformationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
1385                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1386                        .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1387                    .addComponent(timeStampScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
1388                .addContainerGap())
1389        );
1390        layout.setVerticalGroup(
1391            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1392            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
1393                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
1394                    .addGroup(layout.createSequentialGroup()
1395                        .addContainerGap()
1396                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1397                            .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1398                            .addComponent(incidentEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
1399                    .addGroup(layout.createSequentialGroup()
1400                        .addGap(9, 9, 9)
1401                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
1402                            .addGroup(layout.createSequentialGroup()
1403                                .addComponent(zoomInIcon)
1404                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1405                                .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
1406                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1407                                .addComponent(zoomOutIcon))
1408                            .addComponent(addTimePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
1409                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1410                .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
1411                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1412                .addComponent(timeStampScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
1413                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1414                .addComponent(timelinesScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
1415                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
1416                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
1417                    .addComponent(incidentInformationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
1418                    .addComponent(scriptEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
1419                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
1420        );
1421
1422        pack();
1423    }// </editor-fold>//GEN-END:initComponents
1424
1425    /**
1426     * Scale the timeline width based on zoom slider position.
1427     *
1428     * @param evt the state change event
1429     */
1430    private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged
1431        //Moving the zoom slider always refreshes the window
1432        ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue();
1433        this.update(null, theIncident);
1434        pack();
1435        repaint();
1436    }//GEN-LAST:event_zoomSliderStateChanged
1437
1438    private void cadEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMousePressed
1439    }//GEN-LAST:event_cadEventMousePressed
1440
1441    private void radioEventMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radioEventMousePressed
1442    }//GEN-LAST:event_radioEventMousePressed
1443
1444    private void cadEventMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cadEventMouseReleased
1445    }//GEN-LAST:event_cadEventMouseReleased
1446
1447    private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
1448    }//GEN-LAST:event_okButtonActionPerformed
1449
1450    /**
1451     * If cancel button is pressed, close radio event editor
1452     *
1453     * @param evt the button press event
1454     */
1455    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
1456        radioMessage.setText("");
1457        radioTypeComboBox.setSelectedIndex(0);
1458        radioEventFrame.setVisible(false);
1459    }//GEN-LAST:event_cancelButtonActionPerformed
1460
1461    private void editEventListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editEventListActionPerformed
1462    }//GEN-LAST:event_editEventListActionPerformed
1463
1464    private void toggleEventButton(JButton btn, ScriptEventType evt)
1465    {
1466        if (btn.isSelected())
1467        {
1468            currentEventType = null;
1469
1470            btn.setSelected(false);
1471        }
1472        else
1473        {
1474            currentEventType = evt;
1475            for (JButton eb : eventButtons)
1476            {
1477                eb.setSelected(false);
1478            }
1479            btn.setSelected(true);
1480        }
1481    }
1482
1483    /**
1484     * Selects CAD_EVENT as the current type of new event, upon click of "CAD
1485     * Event" button.
1486     *
1487     * @param evt the button press event
1488     */
1489    private void cadButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadButtonActionPerformed
1490        toggleEventButton(cadButton, ScriptEventType.CAD_EVENT);
1491    }//GEN-LAST:event_cadButtonActionPerformed
1492
1493    /**
1494     * Selects CCTV_EVENT as the current type of new event, upon click of "CCTV
1495     * Event" button.
1496     *
1497     * @param evt the button press event
1498     */
1499    private void cctvButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cctvButtonActionPerformed
1500        toggleEventButton(cctvButton, ScriptEventType.CCTV_EVENT);
1501    }//GEN-LAST:event_cctvButtonActionPerformed
1502
1503    /**
1504     * Selects CHP_RADIO_EVENT as the current type of new event, upon click of
1505     * "CHP Radio Event" button.
1506     *
1507     * @param evt the button press event
1508     */
1509    private void chpRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chpRadioButtonActionPerformed
1510        toggleEventButton(chpRadioButton, ScriptEventType.CHP_RADIO_EVENT);
1511    }//GEN-LAST:event_chpRadioButtonActionPerformed
1512
1513    /**
1514     * Hides the noise generation screen upon click of the "Cancel" button.
1515     *
1516     * @param evt the button press event
1517     */
1518    private void btnCancelNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelNoiseActionPerformed
1519        addNoiseFrame.setVisible(false);
1520    }//GEN-LAST:event_btnCancelNoiseActionPerformed
1521
1522    /**
1523     * Generates random noise upon click of the "OK" button, then hides the
1524     * noise generation screen.
1525     *
1526     * @param evt the button press event
1527     */
1528    private void btnGenerateNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerateNoiseActionPerformed
1529        Random rng = new Random();
1530        ScriptEventType[] eventTypes = ScriptEventType.values();
1531
1532        /* For prototyping purpose, ignore the sliders and average their values */
1533        int total = sliderRadioChatter.getValue() + sliderLaneClosures.getValue() + sliderTMCAL.getValue() + sliderMinorEvents.getValue() + sliderBackgroundNoise.getValue();
1534        total /= 5;
1535
1536        for (int i = 0; i < theIncident.slices.size(); i++)
1537        {
1538            theIncident.slices.get(i).events.clear();
1539        }
1540
1541        for (int i = 0; i < total; i++)
1542        {
1543            int n = rng.nextInt();
1544            int s = rng.nextInt();
1545            int e = rng.nextInt();
1546            if (n < 0)
1547            {
1548                n *= -1;
1549            }
1550            if (s < 0)
1551            {
1552                s *= -1;
1553            }
1554            if (e < 0)
1555            {
1556                e *= -1;
1557            }
1558
1559            theIncident.slices.get(s % (theIncident.slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length]));
1560        }
1561
1562        addNoiseFrame.setVisible(false);
1563
1564        this.update(null, theIncident);
1565}//GEN-LAST:event_btnGenerateNoiseActionPerformed
1566
1567    /**
1568     * Selects WITNESS_EVENT as the current type of new event, upon click of
1569     * "Witness Event" button.
1570     *
1571     * @param evt the button press event
1572     */
1573    private void witnessButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_witnessButtonActionPerformed
1574        toggleEventButton(witnessButton, ScriptEventType.WITNESS_EVENT);
1575    }//GEN-LAST:event_witnessButtonActionPerformed
1576
1577    /**
1578     * Selects UNIT_EVENT as the current type of new event, upon click of "Unit
1579     * Event" button.
1580     *
1581     * @param evt the button press event
1582     */
1583    private void unitButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_unitButtonActionPerformed
1584        toggleEventButton(unitButton, ScriptEventType.UNIT_EVENT);
1585    }//GEN-LAST:event_unitButtonActionPerformed
1586
1587    /**
1588     * Selects TOW_EVENT as the current type of new event, upon click of "TOW
1589     * Event" button.
1590     *
1591     * @param evt the button press event
1592     */
1593    private void towButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_towButtonActionPerformed
1594        toggleEventButton(towButton, ScriptEventType.TOW_EVENT);
1595    }//GEN-LAST:event_towButtonActionPerformed
1596
1597    /**
1598     * Selects PARAMICS_EVENT as the current type of new event, upon click of
1599     * "Paramics Event" button.
1600     *
1601     * @param evt the button press event
1602     */
1603    private void paramicsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_paramicsButtonActionPerformed
1604        toggleEventButton(paramicsButton, ScriptEventType.PARAMICS_EVENT);
1605    }//GEN-LAST:event_paramicsButtonActionPerformed
1606
1607    /**
1608     * Selects MAINTENANCE_RADIO_EVENT as the current type of new event, upon
1609     * click of "Maintenance Radio Event" button.
1610     *
1611     * @param evt the button press event
1612     */
1613    private void maintenanceRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_maintenanceRadioButtonActionPerformed
1614        toggleEventButton(maintenanceRadioButton, ScriptEventType.MAINTENANCE_RADIO_EVENT);
1615    }//GEN-LAST:event_maintenanceRadioButtonActionPerformed
1616
1617    /**
1618     * Selects ATMS_EVAL_EVENT as the current type of new event, upon click of
1619     * "ATMS Evaluation Event" button.
1620     *
1621     * @param evt the button press event
1622     */
1623    private void atmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_atmsEvalButtonActionPerformed
1624        toggleEventButton(atmsEvalButton, ScriptEventType.ATMS_EVAL_EVENT);
1625    }//GEN-LAST:event_atmsEvalButtonActionPerformed
1626
1627    /**
1628     * Selects TELEPHONE_EVENT as the current type of new event, upon click of
1629     * "Telephone Event" button.
1630     *
1631     * @param evt the button press event
1632     */
1633    private void telephoneButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_telephoneButtonActionPerformed
1634        toggleEventButton(telephoneButton, ScriptEventType.TELEPHONE_EVENT);
1635    }//GEN-LAST:event_telephoneButtonActionPerformed
1636
1637    /**
1638     * Selects TMT_RADIO_EVENT as the current type of new event, upon click of
1639     * "TMT Radio Event" button.
1640     *
1641     * @param evt the button press event
1642     */
1643    private void tmtRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tmtRadioButtonActionPerformed
1644        toggleEventButton(tmtRadioButton, ScriptEventType.TMT_RADIO_EVENT);
1645    }//GEN-LAST:event_tmtRadioButtonActionPerformed
1646
1647    /**
1648     * Selects CMS_EVAL_EVENT as the current type of new event, upon click of
1649     * "CMS Evaluation Event" button.
1650     *
1651     * @param evt the button press event
1652     */
1653    private void cmsEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmsEvalButtonActionPerformed
1654        toggleEventButton(cmsEvalButton, ScriptEventType.CMS_EVAL_EVENT);
1655    }//GEN-LAST:event_cmsEvalButtonActionPerformed
1656
1657    /**
1658     * Selects CAD_EVAL_EVENT as the current type of new event, upon click of
1659     * "CAD Evaluation Event" button.
1660     *
1661     * @param evt the button press event
1662     */
1663    private void cadEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cadEvalButtonActionPerformed
1664        toggleEventButton(cadEvalButton, ScriptEventType.CAD_EVAL_EVENT);
1665    }//GEN-LAST:event_cadEvalButtonActionPerformed
1666
1667    /**
1668     * Selects ACTIVITY_LOG_EVAL_EVENT as the current type of new event, upon
1669     * click of "Activity Log Evaluation Event" button.
1670     *
1671     * @param evt the button press event
1672     */
1673    private void activityLogEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_activityLogEvalButtonActionPerformed
1674        toggleEventButton(activityLogEvalButton, ScriptEventType.ACTIVITY_LOG_EVAL_EVENT);
1675    }//GEN-LAST:event_activityLogEvalButtonActionPerformed
1676
1677    /**
1678     * Selects RADIO_EVAL_EVENT as the current type of new event, upon click of
1679     * "Radio Evaluation Event" button.
1680     *
1681     * @param evt the button press event
1682     */
1683    private void radioEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioEvalButtonActionPerformed
1684        toggleEventButton(radioEvalButton, ScriptEventType.RADIO_EVAL_EVENT);
1685    }//GEN-LAST:event_radioEvalButtonActionPerformed
1686
1687    /**
1688     * Selects FACILITATOR_EVAL_EVENT as the current type of new event, upon
1689     * click of "Facilitator Evaluation Event" button.
1690     *
1691     * @param evt the button press event
1692     */
1693    private void facilitatorEvalButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_facilitatorEvalButtonActionPerformed
1694        toggleEventButton(facilitatorEvalButton, ScriptEventType.FACILITATOR_EVAL_EVENT);
1695    }//GEN-LAST:event_facilitatorEvalButtonActionPerformed
1696
1697    /**
1698     * Selects AUDIO_EVENT as the current type of new event, upon click of
1699     * "Audio Event" button.
1700     *
1701     * @param evt the button press event
1702     */
1703    private void audioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_audioButtonActionPerformed
1704        toggleEventButton(audioButton, ScriptEventType.AUDIO_EVENT);
1705    }//GEN-LAST:event_audioButtonActionPerformed
1706
1707    /**
1708     * Increases zoom level upon click of the "Zoom in" icon.
1709     *
1710     * @param evt the mouse event
1711     */
1712    private void zoomInIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomInIconMouseClicked
1713        zoomSlider.setValue(zoomSlider.getValue() >= 21 ? 21 : zoomSlider.getValue() + 1);
1714    }//GEN-LAST:event_zoomInIconMouseClicked
1715
1716    /**
1717     * Decreases zoom level upon click of the "Zoom out" icon.
1718     *
1719     * @param evt the mouse event
1720     */
1721    private void zoomOutIconMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_zoomOutIconMouseClicked
1722        zoomSlider.setValue(zoomSlider.getValue() <= 5 ? 5 : zoomSlider.getValue() - 1);
1723    }//GEN-LAST:event_zoomOutIconMouseClicked
1724
1725    /**
1726     * Add 15 minutes to the end of the timeline. This allows the user to add
1727     * new events past the current end of the incident
1728     *
1729     * @param evt the button press event
1730     */
1731    private void btnAddTimeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnAddTimeActionPerformed
1732    {//GEN-HEADEREND:event_btnAddTimeActionPerformed
1733        if (addToEnd)
1734        {
1735            incidentTimelinePanel1.requestedEditorFillerTime += IncidentTimelinePanel.FILLER_INTERVAL_SECONDS;
1736        }
1737        else
1738        {
1739            if (savedOffset - IncidentTimelinePanel.FILLER_INTERVAL_SECONDS >= 0)
1740            {
1741                savedOffset -= IncidentTimelinePanel.FILLER_INTERVAL_SECONDS;
1742                absoluteTimeStampPanel.setOffset(absoluteTimeStampPanel.offset
1743                        - IncidentTimelinePanel.FILLER_INTERVAL_SECONDS);
1744                theIncident.setOffset(theIncident.offset + IncidentTimelinePanel.FILLER_INTERVAL_SECONDS);
1745            }
1746            else
1747            {
1748                absoluteTimeStampPanel.setOffset(absoluteTimeStampPanel.offset
1749                        - savedOffset);
1750                theIncident.setOffset(theIncident.offset + savedOffset);
1751                savedOffset = 0;
1752            }
1753        }
1754        this.update(null, theIncident);
1755    }//GEN-LAST:event_btnAddTimeActionPerformed
1756
1757    private void btnToggleTimeEndActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnToggleTimeEndActionPerformed
1758    {//GEN-HEADEREND:event_btnToggleTimeEndActionPerformed
1759        btnToggleTimeEnd.setSelected(true);
1760        btnToggleTimeStart.setSelected(false);
1761        addToEnd = true;
1762    }//GEN-LAST:event_btnToggleTimeEndActionPerformed
1763
1764    private void btnToggleTimeStartActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnToggleTimeStartActionPerformed
1765    {//GEN-HEADEREND:event_btnToggleTimeStartActionPerformed
1766        btnToggleTimeStart.setSelected(true);
1767        btnToggleTimeEnd.setSelected(false);
1768        addToEnd = false;
1769    }//GEN-LAST:event_btnToggleTimeStartActionPerformed
1770
1771    /**
1772     * Read the version number from the application properties. The file
1773     * 'application.properties' is generated by build.xml.
1774     *
1775     * @return a version string obtained from application.properties file, or
1776     * "Version: unknown" if an IOerror prevents us from reading the file.
1777     */
1778    private String getAppVersion()
1779    {
1780        String propfilename = "/scriptbuilder/gui/application.properties";
1781        String propKey = "Application.revision";
1782        String version = "unknown";
1783        // Load the application properties (created by build.xml)
1784        try
1785        {
1786            Properties props = new Properties();
1787            props.load(this.getClass().getResourceAsStream(propfilename));
1788            version = (String) props.get(propKey);
1789        }
1790        catch (IOException ex)
1791        {
1792            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
1793                    "ScriptBuilderFrame.getAppVersion()."
1794                    + " IOError reading " + propfilename);
1795        }
1796        catch (NullPointerException npe)
1797        {
1798            Logger.getLogger("scriptbuilder.gui").log(Level.SEVERE,
1799                    "ScriptBuilderFrame.getAppVersion().load."
1800                    + " Missing file: " + propfilename);
1801        }
1802        return version;
1803    }
1804
1805    // Variables declaration - do not modify//GEN-BEGIN:variables
1806    private scriptbuilder.gui.panels.TimeStampPanel absoluteTimeStampPanel;
1807    private javax.swing.JButton activityLogEvalButton;
1808    private javax.swing.JFrame addNoiseFrame;
1809    private javax.swing.JPanel addTimePanel;
1810    private javax.swing.JButton atmsEvalButton;
1811    private javax.swing.JButton audioButton;
1812    private javax.swing.JButton btnAddTime;
1813    private javax.swing.JButton btnCancelNoise;
1814    private javax.swing.JButton btnGenerateNoise;
1815    private javax.swing.JRadioButton btnToggleTimeEnd;
1816    private javax.swing.JRadioButton btnToggleTimeStart;
1817    private javax.swing.JButton cadButton;
1818    private javax.swing.JButton cadEvalButton;
1819    private javax.swing.JMenuItem cadEvent;
1820    private javax.swing.JFrame cadEventFrame;
1821    private javax.swing.JButton cancelButton;
1822    private javax.swing.JButton cctvButton;
1823    private javax.swing.JButton chpRadioButton;
1824    private javax.swing.JButton cmsEvalButton;
1825    private javax.swing.JMenuItem deleteEventList;
1826    private javax.swing.JMenuItem editEventList;
1827    private javax.swing.JPanel evaluationEventsPanel;
1828    private javax.swing.JPopupMenu eventListPopupMenu;
1829    private javax.swing.JPopupMenu eventPopupMenu;
1830    private javax.swing.JButton facilitatorEvalButton;
1831    private javax.swing.JTextArea incidentDescription;
1832    private javax.swing.JScrollPane incidentDescriptionPane;
1833    private javax.swing.JPanel incidentEventsPanel;
1834    private javax.swing.JPanel incidentInformationPanel;
1835    private javax.swing.JTextField incidentName;
1836    private javax.swing.JTextField incidentNumber;
1837    private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel1;
1838    private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel1;
1839    private javax.swing.JLabel jLabel2;
1840    private javax.swing.JLabel jLabel3;
1841    private javax.swing.JLabel jLabel4;
1842    private javax.swing.JLabel jLabel5;
1843    private javax.swing.JLabel jLabel7;
1844    private javax.swing.JMenuItem jMenuItem2;
1845    private javax.swing.JMenuItem jMenuItem4;
1846    private javax.swing.JMenuItem jMenuItem5;
1847    private javax.swing.JMenuItem jMenuItem6;
1848    private javax.swing.JLabel labelBackgroundNoise;
1849    private javax.swing.JLabel labelLaneClosures;
1850    private javax.swing.JLabel labelLeastFreq;
1851    private javax.swing.JLabel labelMinorEvents;
1852    private javax.swing.JLabel labelMostFreq;
1853    private javax.swing.JTextArea labelNoiseDescription;
1854    private javax.swing.JLabel labelRadioChatter;
1855    private javax.swing.JLabel labelTMCAL;
1856    private javax.swing.JButton maintenanceRadioButton;
1857    private javax.swing.JButton okButton;
1858    private javax.swing.JButton paramicsButton;
1859    private javax.swing.JButton radioEvalButton;
1860    private javax.swing.JMenuItem radioEvent;
1861    private javax.swing.JFrame radioEventFrame;
1862    private javax.swing.JTextArea radioMessage;
1863    private javax.swing.JScrollPane radioMessageScrollPane;
1864    private javax.swing.JComboBox radioTypeComboBox;
1865    private javax.swing.JLabel radioTypeLabel;
1866    private scriptbuilder.gui.panels.TimeStampPanel relativeTimeStampPanel;
1867    private javax.swing.JList scriptEventsList;
1868    private javax.swing.JScrollPane scriptEventsPane;
1869    private javax.swing.JPanel scriptEventsPanel;
1870    private javax.swing.JSlider sliderBackgroundNoise;
1871    private javax.swing.JSlider sliderLaneClosures;
1872    private javax.swing.JSlider sliderMinorEvents;
1873    private javax.swing.JSlider sliderRadioChatter;
1874    private javax.swing.JSlider sliderTMCAL;
1875    private javax.swing.JButton telephoneButton;
1876    private javax.swing.JScrollPane timeStampScrollPane;
1877    private javax.swing.JScrollPane timeStampScrollPane1;
1878    private scriptbuilder.gui.panels.TimelineTickPanel timelineTickPanel;
1879    private javax.swing.JScrollPane timelinesScrollPane;
1880    private javax.swing.JButton tmtRadioButton;
1881    private javax.swing.JButton towButton;
1882    private javax.swing.JButton unitButton;
1883    private javax.swing.JButton witnessButton;
1884    private javax.swing.JLabel zoomInIcon;
1885    private javax.swing.JLabel zoomOutIcon;
1886    private javax.swing.JSlider zoomSlider;
1887    // End of variables declaration//GEN-END:variables
1888}
Note: See TracBrowser for help on using the repository browser.