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

Revision 184, 92.5 KB checked in by jdalbey, 6 years ago (diff)

Incident Editor Frame: Rearrange event buttons and panels into more meaningful groupings.

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