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

Revision 124, 92.7 KB checked in by jdalbey, 9 years ago (diff)

IncidentEditorFrame?.java: Make text fields in "Incident Information" panel of Incident Editor disabled and change disabled text color to black. Fixes #26.

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