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

Revision 160, 92.2 KB checked in by sdanthin, 6 years ago (diff)

IncidentEditorFrame?.java removed Audio button from GUI and removed associated functionality.

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