Changeset 110 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder
- Timestamp:
- 09/05/2017 04:24:08 PM (9 years ago)
- Location:
- trunk/src/scriptbuilder/gui
- Files:
-
- 2 edited
-
IncidentEditorFrame.form (modified) (9 diffs)
-
IncidentEditorFrame.java (modified) (46 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentEditorFrame.form
r104 r110 231 231 <EmptySpace pref="21" max="32767" attributes="0"/> 232 232 <Group type="103" groupAlignment="1" attributes="0"> 233 <Component id=" jTextArea1" alignment="0" max="32767" attributes="1"/>233 <Component id="labelNoiseDescription" alignment="0" max="32767" attributes="1"/> 234 234 <Group type="103" alignment="1" groupAlignment="1" max="-2" attributes="0"> 235 235 <Group type="102" alignment="0" attributes="1"> 236 <Component id=" jButton1" min="-2" max="-2" attributes="0"/>236 <Component id="btnCancelNoise" min="-2" max="-2" attributes="0"/> 237 237 <EmptySpace max="32767" attributes="0"/> 238 <Component id=" jButton2" min="-2" max="-2" attributes="0"/>238 <Component id="btnGenerateNoise" min="-2" max="-2" attributes="0"/> 239 239 </Group> 240 240 <Group type="102" alignment="0" attributes="0"> 241 241 <Group type="103" groupAlignment="0" attributes="0"> 242 242 <Group type="103" alignment="0" groupAlignment="1" attributes="0"> 243 <Component id=" jLabel16" alignment="1" min="-2" max="-2" attributes="0"/>244 <Component id=" jLabel14" alignment="1" min="-2" pref="105" max="-2" attributes="0"/>245 <Component id=" jLabel15" alignment="1" min="-2" pref="105" max="-2" attributes="0"/>246 <Component id=" jLabel13" alignment="1" min="-2" pref="105" max="-2" attributes="0"/>243 <Component id="labelBackgroundNoise" alignment="1" min="-2" max="-2" attributes="0"/> 244 <Component id="labelLaneClosures" alignment="1" min="-2" pref="105" max="-2" attributes="0"/> 245 <Component id="labelTMCAL" alignment="1" min="-2" pref="105" max="-2" attributes="0"/> 246 <Component id="labelRadioChatter" alignment="1" min="-2" pref="105" max="-2" attributes="0"/> 247 247 </Group> 248 <Component id=" jLabel17" alignment="0" min="-2" pref="81" max="-2" attributes="0"/>248 <Component id="labelMinorEvents" alignment="0" min="-2" pref="81" max="-2" attributes="0"/> 249 249 </Group> 250 250 <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> 251 251 <Group type="103" groupAlignment="0" max="-2" attributes="0"> 252 <Component id=" jSlider1" alignment="0" min="-2" pref="245" max="-2" attributes="0"/>253 <Component id=" jSlider2" alignment="0" min="-2" pref="245" max="-2" attributes="0"/>254 <Component id=" jSlider3" alignment="0" min="-2" pref="245" max="-2" attributes="0"/>255 <Component id=" jSlider5" alignment="0" min="-2" pref="245" max="-2" attributes="0"/>256 <Component id=" jSlider4" alignment="0" min="-2" pref="245" max="-2" attributes="0"/>252 <Component id="sliderRadioChatter" alignment="0" min="-2" pref="245" max="-2" attributes="0"/> 253 <Component id="sliderLaneClosures" alignment="0" min="-2" pref="245" max="-2" attributes="0"/> 254 <Component id="sliderTMCAL" alignment="0" min="-2" pref="245" max="-2" attributes="0"/> 255 <Component id="sliderMinorEvents" alignment="0" min="-2" pref="245" max="-2" attributes="0"/> 256 <Component id="sliderBackgroundNoise" alignment="0" min="-2" pref="245" max="-2" attributes="0"/> 257 257 <Group type="102" alignment="1" attributes="1"> 258 <Component id=" jLabel20" min="-2" max="-2" attributes="0"/>258 <Component id="labelLeastFreq" min="-2" max="-2" attributes="0"/> 259 259 <EmptySpace max="32767" attributes="0"/> 260 <Component id=" jLabel21" min="-2" max="-2" attributes="0"/>260 <Component id="labelMostFreq" min="-2" max="-2" attributes="0"/> 261 261 </Group> 262 262 </Group> … … 272 272 <Group type="102" alignment="1" attributes="0"> 273 273 <EmptySpace max="-2" attributes="0"/> 274 <Component id=" jTextArea1" pref="39" max="32767" attributes="0"/>274 <Component id="labelNoiseDescription" pref="39" max="32767" attributes="0"/> 275 275 <EmptySpace max="-2" attributes="0"/> 276 276 <Group type="103" groupAlignment="1" attributes="0"> 277 <Component id=" jLabel21" min="-2" max="-2" attributes="0"/>278 <Component id=" jLabel20" min="-2" max="-2" attributes="0"/>277 <Component id="labelMostFreq" min="-2" max="-2" attributes="0"/> 278 <Component id="labelLeastFreq" min="-2" max="-2" attributes="0"/> 279 279 </Group> 280 280 <EmptySpace max="-2" attributes="0"/> 281 281 <Group type="103" groupAlignment="1" attributes="0"> 282 <Component id=" jLabel13" min="-2" pref="30" max="-2" attributes="1"/>283 <Component id=" jSlider1" alignment="1" min="-2" pref="30" max="-2" attributes="1"/>282 <Component id="labelRadioChatter" min="-2" pref="30" max="-2" attributes="1"/> 283 <Component id="sliderRadioChatter" alignment="1" min="-2" pref="30" max="-2" attributes="1"/> 284 284 </Group> 285 285 <EmptySpace max="-2" attributes="0"/> 286 286 <Group type="103" groupAlignment="1" attributes="0"> 287 <Component id=" jLabel14" min="-2" pref="28" max="-2" attributes="1"/>288 <Component id=" jSlider2" alignment="1" min="-2" pref="28" max="-2" attributes="1"/>287 <Component id="labelLaneClosures" min="-2" pref="28" max="-2" attributes="1"/> 288 <Component id="sliderLaneClosures" alignment="1" min="-2" pref="28" max="-2" attributes="1"/> 289 289 </Group> 290 290 <EmptySpace max="-2" attributes="0"/> 291 291 <Group type="103" groupAlignment="1" max="-2" attributes="0"> 292 <Component id=" jLabel15" min="-2" max="-2" attributes="1"/>293 <Component id=" jSlider3" alignment="1" min="-2" max="-2" attributes="1"/>292 <Component id="labelTMCAL" min="-2" max="-2" attributes="1"/> 293 <Component id="sliderTMCAL" alignment="1" min="-2" max="-2" attributes="1"/> 294 294 </Group> 295 295 <EmptySpace max="-2" attributes="0"/> 296 296 <Group type="103" groupAlignment="1" attributes="0"> 297 <Component id=" jSlider4" min="-2" pref="29" max="-2" attributes="1"/>298 <Component id=" jLabel16" min="-2" pref="29" max="-2" attributes="1"/>297 <Component id="sliderBackgroundNoise" min="-2" pref="29" max="-2" attributes="1"/> 298 <Component id="labelBackgroundNoise" min="-2" pref="29" max="-2" attributes="1"/> 299 299 </Group> 300 300 <EmptySpace max="-2" attributes="0"/> 301 301 <Group type="103" groupAlignment="0" attributes="0"> 302 <Component id=" jSlider5" min="-2" max="-2" attributes="1"/>303 <Component id=" jLabel17" min="-2" max="-2" attributes="1"/>302 <Component id="sliderMinorEvents" min="-2" max="-2" attributes="1"/> 303 <Component id="labelMinorEvents" min="-2" max="-2" attributes="1"/> 304 304 </Group> 305 305 <EmptySpace type="separate" max="-2" attributes="0"/> 306 306 <Group type="103" groupAlignment="0" attributes="0"> 307 <Component id=" jButton1" min="-2" max="-2" attributes="0"/>308 <Component id=" jButton2" min="-2" max="-2" attributes="0"/>307 <Component id="btnCancelNoise" min="-2" max="-2" attributes="0"/> 308 <Component id="btnGenerateNoise" min="-2" max="-2" attributes="0"/> 309 309 </Group> 310 310 <EmptySpace max="-2" attributes="0"/> … … 314 314 </Layout> 315 315 <SubComponents> 316 <Component class="javax.swing.JLabel" name=" jLabel13">316 <Component class="javax.swing.JLabel" name="labelRadioChatter"> 317 317 <Properties> 318 318 <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> … … 322 322 </Properties> 323 323 </Component> 324 <Component class="javax.swing.JSlider" name=" jSlider1">325 </Component> 326 <Component class="javax.swing.JSlider" name=" jSlider2">327 </Component> 328 <Component class="javax.swing.JLabel" name=" jLabel14">324 <Component class="javax.swing.JSlider" name="sliderRadioChatter"> 325 </Component> 326 <Component class="javax.swing.JSlider" name="sliderLaneClosures"> 327 </Component> 328 <Component class="javax.swing.JLabel" name="labelLaneClosures"> 329 329 <Properties> 330 330 <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> … … 334 334 </Properties> 335 335 </Component> 336 <Component class="javax.swing.JSlider" name=" jSlider3">337 </Component> 338 <Component class="javax.swing.JLabel" name=" jLabel15">336 <Component class="javax.swing.JSlider" name="sliderTMCAL"> 337 </Component> 338 <Component class="javax.swing.JLabel" name="labelTMCAL"> 339 339 <Properties> 340 340 <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> … … 344 344 </Properties> 345 345 </Component> 346 <Component class="javax.swing.JTextArea" name=" jTextArea1">346 <Component class="javax.swing.JTextArea" name="labelNoiseDescription"> 347 347 <Properties> 348 348 <Property name="editable" type="boolean" value="false"/> … … 366 366 </Properties> 367 367 </Component> 368 <Component class="javax.swing.JSlider" name=" jSlider4">369 </Component> 370 <Component class="javax.swing.JLabel" name=" jLabel16">368 <Component class="javax.swing.JSlider" name="sliderBackgroundNoise"> 369 </Component> 370 <Component class="javax.swing.JLabel" name="labelBackgroundNoise"> 371 371 <Properties> 372 372 <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> … … 376 376 </Properties> 377 377 </Component> 378 <Component class="javax.swing.JSlider" name=" jSlider5">379 </Component> 380 <Component class="javax.swing.JLabel" name=" jLabel17">378 <Component class="javax.swing.JSlider" name="sliderMinorEvents"> 379 </Component> 380 <Component class="javax.swing.JLabel" name="labelMinorEvents"> 381 381 <Properties> 382 382 <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> … … 386 386 </Properties> 387 387 </Component> 388 <Component class="javax.swing.JButton" name=" jButton1">388 <Component class="javax.swing.JButton" name="btnCancelNoise"> 389 389 <Properties> 390 390 <Property name="text" type="java.lang.String" value="Cancel"/> 391 391 </Properties> 392 392 <Events> 393 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler=" jButton1ActionPerformed"/>394 </Events> 395 </Component> 396 <Component class="javax.swing.JButton" name=" jButton2">393 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCancelNoiseActionPerformed"/> 394 </Events> 395 </Component> 396 <Component class="javax.swing.JButton" name="btnGenerateNoise"> 397 397 <Properties> 398 398 <Property name="text" type="java.lang.String" value="Generate"/> 399 399 </Properties> 400 400 <Events> 401 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler=" jButton2ActionPerformed"/>402 </Events> 403 </Component> 404 <Component class="javax.swing.JLabel" name=" jLabel20">401 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnGenerateNoiseActionPerformed"/> 402 </Events> 403 </Component> 404 <Component class="javax.swing.JLabel" name="labelLeastFreq"> 405 405 <Properties> 406 406 <Property name="text" type="java.lang.String" value="Least Frequent"/> 407 407 </Properties> 408 408 </Component> 409 <Component class="javax.swing.JLabel" name=" jLabel21">409 <Component class="javax.swing.JLabel" name="labelMostFreq"> 410 410 <Properties> 411 411 <Property name="text" type="java.lang.String" value="Most Frequent"/> -
trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
r107 r110 336 336 public void update(Observable o, Object arg) 337 337 { 338 //Three possibilities: This is a general script update, or it's one of 339 //two different focus updates 338 340 if (arg instanceof ScriptIncident) 339 341 { 340 342 theIncident = (ScriptIncident) arg; 341 343 344 //Update the appropriate panels 342 345 timelineTickPanel.update(theIncident, incidentTimelinePanel1); 343 346 timeStampPanel.update(theIncident, incidentTimelinePanel1); … … 355 358 pack(); 356 359 } 360 //A new timeslice has gained focus 357 361 else if (arg instanceof SliceChangedEvent) 358 362 { 359 363 TimeSlice slice = ((SliceChangedEvent) arg).slice; 360 364 365 //Put the relevant slice's events into a list 361 366 DefaultListModel model = new DefaultListModel(); 362 367 for (I_ScriptEvent e : slice.events) … … 366 371 scriptEventsList.setModel(model); 367 372 } 373 //A new incident has gained focus 374 //This really should only be called upon instantiaton of the window 368 375 else if (arg instanceof IncidentFocusedEvent) 369 376 { 370 377 ScriptIncident i = ((IncidentFocusedEvent) arg).incident; 371 378 379 //Put the incident's data in the incident description area 372 380 incidentNumber.setText(Integer.toString(i.number)); 373 381 incidentName.setText(i.name); … … 376 384 //gotoIncident.setSelectedItem(i); 377 385 } 386 387 //Regardless of update type, do these things to refresh the window 388 389 //Resize the zoom slider scale so that the most zoomed-out state displays 390 //the entire incident on the window 378 391 zoomSlider.setMinimum(((timelineTickPanel.getVisibleRect().width - 20) 379 392 * ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION) … … 389 402 @SuppressWarnings("unchecked") 390 403 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 391 private void initComponents() { 404 private void initComponents() 405 { 392 406 393 407 eventPopupMenu = new javax.swing.JPopupMenu(); … … 412 426 deleteEventList = new javax.swing.JMenuItem(); 413 427 addNoiseFrame = new javax.swing.JFrame(); 414 jLabel13= new javax.swing.JLabel();415 jSlider1= new javax.swing.JSlider();416 jSlider2= new javax.swing.JSlider();417 jLabel14= new javax.swing.JLabel();418 jSlider3= new javax.swing.JSlider();419 jLabel15= new javax.swing.JLabel();420 jTextArea1= new javax.swing.JTextArea();421 jSlider4= new javax.swing.JSlider();422 jLabel16= new javax.swing.JLabel();423 jSlider5= new javax.swing.JSlider();424 jLabel17= new javax.swing.JLabel();425 jButton1= new javax.swing.JButton();426 jButton2= new javax.swing.JButton();427 jLabel20= new javax.swing.JLabel();428 jLabel21= new javax.swing.JLabel();428 labelRadioChatter = new javax.swing.JLabel(); 429 sliderRadioChatter = new javax.swing.JSlider(); 430 sliderLaneClosures = new javax.swing.JSlider(); 431 labelLaneClosures = new javax.swing.JLabel(); 432 sliderTMCAL = new javax.swing.JSlider(); 433 labelTMCAL = new javax.swing.JLabel(); 434 labelNoiseDescription = new javax.swing.JTextArea(); 435 sliderBackgroundNoise = new javax.swing.JSlider(); 436 labelBackgroundNoise = new javax.swing.JLabel(); 437 sliderMinorEvents = new javax.swing.JSlider(); 438 labelMinorEvents = new javax.swing.JLabel(); 439 btnCancelNoise = new javax.swing.JButton(); 440 btnGenerateNoise = new javax.swing.JButton(); 441 labelLeastFreq = new javax.swing.JLabel(); 442 labelMostFreq = new javax.swing.JLabel(); 429 443 timelinesScrollPane = new javax.swing.JScrollPane(); 430 444 timelineTickPanel = new scriptbuilder.gui.panels.TimelineTickPanel(); … … 470 484 471 485 cadEvent.setText("CAD Event"); 472 cadEvent.addMouseListener(new java.awt.event.MouseAdapter() { 473 public void mousePressed(java.awt.event.MouseEvent evt) { 486 cadEvent.addMouseListener(new java.awt.event.MouseAdapter() 487 { 488 public void mousePressed(java.awt.event.MouseEvent evt) 489 { 474 490 cadEventMousePressed(evt); 475 491 } 476 public void mouseReleased(java.awt.event.MouseEvent evt) { 492 public void mouseReleased(java.awt.event.MouseEvent evt) 493 { 477 494 cadEventMouseReleased(evt); 478 495 } … … 484 501 485 502 radioEvent.setText("Radio Event"); 486 radioEvent.addMouseListener(new java.awt.event.MouseAdapter() { 487 public void mousePressed(java.awt.event.MouseEvent evt) { 503 radioEvent.addMouseListener(new java.awt.event.MouseAdapter() 504 { 505 public void mousePressed(java.awt.event.MouseEvent evt) 506 { 488 507 radioEventMousePressed(evt); 489 508 } … … 539 558 540 559 okButton.setText("OK"); 541 okButton.addActionListener(new java.awt.event.ActionListener() { 542 public void actionPerformed(java.awt.event.ActionEvent evt) { 560 okButton.addActionListener(new java.awt.event.ActionListener() 561 { 562 public void actionPerformed(java.awt.event.ActionEvent evt) 563 { 543 564 okButtonActionPerformed(evt); 544 565 } … … 546 567 547 568 cancelButton.setText("Cancel"); 548 cancelButton.addActionListener(new java.awt.event.ActionListener() { 549 public void actionPerformed(java.awt.event.ActionEvent evt) { 569 cancelButton.addActionListener(new java.awt.event.ActionListener() 570 { 571 public void actionPerformed(java.awt.event.ActionEvent evt) 572 { 550 573 cancelButtonActionPerformed(evt); 551 574 } … … 590 613 591 614 editEventList.setText("Edit..."); 592 editEventList.addActionListener(new java.awt.event.ActionListener() { 593 public void actionPerformed(java.awt.event.ActionEvent evt) { 615 editEventList.addActionListener(new java.awt.event.ActionListener() 616 { 617 public void actionPerformed(java.awt.event.ActionEvent evt) 618 { 594 619 editEventListActionPerformed(evt); 595 620 } … … 604 629 addNoiseFrame.setResizable(false); 605 630 606 jLabel13.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 607 jLabel13.setText("Radio Chatter: "); 608 609 jLabel14.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 610 jLabel14.setText("Lane Closures:"); 611 612 jLabel15.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 613 jLabel15.setText("TMCAL Logs:"); 614 615 jTextArea1.setEditable(false); 616 jTextArea1.setColumns(20); 617 jTextArea1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 618 jTextArea1.setLineWrap(true); 619 jTextArea1.setRows(5); 620 jTextArea1.setText("Noise events will be randomly generated for the simulation with frequencies based on the control selections made below"); 621 jTextArea1.setWrapStyleWord(true); 622 jTextArea1.setAutoscrolls(false); 623 jTextArea1.setBorder(null); 624 jTextArea1.setDisabledTextColor(new java.awt.Color(0, 0, 0)); 625 jTextArea1.setFocusable(false); 626 jTextArea1.setOpaque(false); 627 628 jLabel16.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 629 jLabel16.setText("Background Noise: "); 630 631 jLabel17.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 632 jLabel17.setText("Minor Events:"); 633 634 jButton1.setText("Cancel"); 635 jButton1.addActionListener(new java.awt.event.ActionListener() { 636 public void actionPerformed(java.awt.event.ActionEvent evt) { 637 jButton1ActionPerformed(evt); 638 } 639 }); 640 641 jButton2.setText("Generate"); 642 jButton2.addActionListener(new java.awt.event.ActionListener() { 643 public void actionPerformed(java.awt.event.ActionEvent evt) { 644 jButton2ActionPerformed(evt); 645 } 646 }); 647 648 jLabel20.setText("Least Frequent"); 649 650 jLabel21.setText("Most Frequent"); 631 labelRadioChatter.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 632 labelRadioChatter.setText("Radio Chatter: "); 633 634 labelLaneClosures.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 635 labelLaneClosures.setText("Lane Closures:"); 636 637 labelTMCAL.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 638 labelTMCAL.setText("TMCAL Logs:"); 639 640 labelNoiseDescription.setEditable(false); 641 labelNoiseDescription.setColumns(20); 642 labelNoiseDescription.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 643 labelNoiseDescription.setLineWrap(true); 644 labelNoiseDescription.setRows(5); 645 labelNoiseDescription.setText("Noise events will be randomly generated for the simulation with frequencies based on the control selections made below"); 646 labelNoiseDescription.setWrapStyleWord(true); 647 labelNoiseDescription.setAutoscrolls(false); 648 labelNoiseDescription.setBorder(null); 649 labelNoiseDescription.setDisabledTextColor(new java.awt.Color(0, 0, 0)); 650 labelNoiseDescription.setFocusable(false); 651 labelNoiseDescription.setOpaque(false); 652 653 labelBackgroundNoise.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 654 labelBackgroundNoise.setText("Background Noise: "); 655 656 labelMinorEvents.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N 657 labelMinorEvents.setText("Minor Events:"); 658 659 btnCancelNoise.setText("Cancel"); 660 btnCancelNoise.addActionListener(new java.awt.event.ActionListener() 661 { 662 public void actionPerformed(java.awt.event.ActionEvent evt) 663 { 664 btnCancelNoiseActionPerformed(evt); 665 } 666 }); 667 668 btnGenerateNoise.setText("Generate"); 669 btnGenerateNoise.addActionListener(new java.awt.event.ActionListener() 670 { 671 public void actionPerformed(java.awt.event.ActionEvent evt) 672 { 673 btnGenerateNoiseActionPerformed(evt); 674 } 675 }); 676 677 labelLeastFreq.setText("Least Frequent"); 678 679 labelMostFreq.setText("Most Frequent"); 651 680 652 681 javax.swing.GroupLayout addNoiseFrameLayout = new javax.swing.GroupLayout(addNoiseFrame.getContentPane()); … … 657 686 .addContainerGap(21, Short.MAX_VALUE) 658 687 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 659 .addComponent( jTextArea1, javax.swing.GroupLayout.Alignment.LEADING)688 .addComponent(labelNoiseDescription, javax.swing.GroupLayout.Alignment.LEADING) 660 689 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 661 690 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup() 662 .addComponent( jButton1)691 .addComponent(btnCancelNoise) 663 692 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 664 .addComponent( jButton2))693 .addComponent(btnGenerateNoise)) 665 694 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, addNoiseFrameLayout.createSequentialGroup() 666 695 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 667 696 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 668 .addComponent( jLabel16)669 .addComponent( jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)670 .addComponent( jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)671 .addComponent( jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))672 .addComponent( jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))697 .addComponent(labelBackgroundNoise) 698 .addComponent(labelLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) 699 .addComponent(labelTMCAL, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) 700 .addComponent(labelRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)) 701 .addComponent(labelMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)) 673 702 .addGap(4, 4, 4) 674 703 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 675 .addComponent( jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)676 .addComponent( jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)677 .addComponent( jSlider3, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)678 .addComponent( jSlider5, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)679 .addComponent( jSlider4, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)704 .addComponent(sliderRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE) 705 .addComponent(sliderLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE) 706 .addComponent(sliderTMCAL, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE) 707 .addComponent(sliderMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE) 708 .addComponent(sliderBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE) 680 709 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup() 681 .addComponent( jLabel20)710 .addComponent(labelLeastFreq) 682 711 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 683 .addComponent( jLabel21))))))712 .addComponent(labelMostFreq)))))) 684 713 .addGap(20, 20, 20)) 685 714 ); … … 688 717 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, addNoiseFrameLayout.createSequentialGroup() 689 718 .addContainerGap() 690 .addComponent( jTextArea1, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)719 .addComponent(labelNoiseDescription, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE) 691 720 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 692 721 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 693 .addComponent( jLabel21)694 .addComponent( jLabel20))722 .addComponent(labelMostFreq) 723 .addComponent(labelLeastFreq)) 695 724 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 696 725 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 697 .addComponent( jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)698 .addComponent( jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))726 .addComponent(labelRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) 727 .addComponent(sliderRadioChatter, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) 699 728 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 700 729 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 701 .addComponent( jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)702 .addComponent( jSlider2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))730 .addComponent(labelLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) 731 .addComponent(sliderLaneClosures, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) 703 732 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 704 733 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 705 .addComponent( jLabel15)706 .addComponent( jSlider3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))734 .addComponent(labelTMCAL) 735 .addComponent(sliderTMCAL, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 707 736 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 708 737 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 709 .addComponent( jSlider4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)710 .addComponent( jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))738 .addComponent(sliderBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) 739 .addComponent(labelBackgroundNoise, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) 711 740 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 712 741 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 713 .addComponent( jSlider5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)714 .addComponent( jLabel17))742 .addComponent(sliderMinorEvents, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 743 .addComponent(labelMinorEvents)) 715 744 .addGap(18, 18, 18) 716 745 .addGroup(addNoiseFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 717 .addComponent( jButton1)718 .addComponent( jButton2))746 .addComponent(btnCancelNoise) 747 .addComponent(btnGenerateNoise)) 719 748 .addContainerGap()) 720 749 ); … … 816 845 zoomSlider.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); 817 846 zoomSlider.setFocusable(false); 818 zoomSlider.addChangeListener(new javax.swing.event.ChangeListener() { 819 public void stateChanged(javax.swing.event.ChangeEvent evt) { 847 zoomSlider.addChangeListener(new javax.swing.event.ChangeListener() 848 { 849 public void stateChanged(javax.swing.event.ChangeEvent evt) 850 { 820 851 zoomSliderStateChanged(evt); 821 852 } … … 887 918 selectButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 888 919 selectButton.setPreferredSize(new java.awt.Dimension(30, 25)); 889 selectButton.addActionListener(new java.awt.event.ActionListener() { 890 public void actionPerformed(java.awt.event.ActionEvent evt) { 920 selectButton.addActionListener(new java.awt.event.ActionListener() 921 { 922 public void actionPerformed(java.awt.event.ActionEvent evt) 923 { 891 924 selectButtonActionPerformed(evt); 892 925 } … … 901 934 maintenanceRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 902 935 maintenanceRadioButton.setPreferredSize(new java.awt.Dimension(30, 25)); 903 maintenanceRadioButton.addActionListener(new java.awt.event.ActionListener() { 904 public void actionPerformed(java.awt.event.ActionEvent evt) { 936 maintenanceRadioButton.addActionListener(new java.awt.event.ActionListener() 937 { 938 public void actionPerformed(java.awt.event.ActionEvent evt) 939 { 905 940 maintenanceRadioButtonActionPerformed(evt); 906 941 } … … 913 948 tmtRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 914 949 tmtRadioButton.setPreferredSize(new java.awt.Dimension(30, 25)); 915 tmtRadioButton.addActionListener(new java.awt.event.ActionListener() { 916 public void actionPerformed(java.awt.event.ActionEvent evt) { 950 tmtRadioButton.addActionListener(new java.awt.event.ActionListener() 951 { 952 public void actionPerformed(java.awt.event.ActionEvent evt) 953 { 917 954 tmtRadioButtonActionPerformed(evt); 918 955 } … … 925 962 telephoneButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 926 963 telephoneButton.setPreferredSize(new java.awt.Dimension(30, 25)); 927 telephoneButton.addActionListener(new java.awt.event.ActionListener() { 928 public void actionPerformed(java.awt.event.ActionEvent evt) { 964 telephoneButton.addActionListener(new java.awt.event.ActionListener() 965 { 966 public void actionPerformed(java.awt.event.ActionEvent evt) 967 { 929 968 telephoneButtonActionPerformed(evt); 930 969 } … … 937 976 unitButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 938 977 unitButton.setPreferredSize(new java.awt.Dimension(30, 25)); 939 unitButton.addActionListener(new java.awt.event.ActionListener() { 940 public void actionPerformed(java.awt.event.ActionEvent evt) { 978 unitButton.addActionListener(new java.awt.event.ActionListener() 979 { 980 public void actionPerformed(java.awt.event.ActionEvent evt) 981 { 941 982 unitButtonActionPerformed(evt); 942 983 } … … 949 990 witnessButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 950 991 witnessButton.setPreferredSize(new java.awt.Dimension(30, 25)); 951 witnessButton.addActionListener(new java.awt.event.ActionListener() { 952 public void actionPerformed(java.awt.event.ActionEvent evt) { 992 witnessButton.addActionListener(new java.awt.event.ActionListener() 993 { 994 public void actionPerformed(java.awt.event.ActionEvent evt) 995 { 953 996 witnessButtonActionPerformed(evt); 954 997 } … … 961 1004 paramicsButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 962 1005 paramicsButton.setPreferredSize(new java.awt.Dimension(30, 25)); 963 paramicsButton.addActionListener(new java.awt.event.ActionListener() { 964 public void actionPerformed(java.awt.event.ActionEvent evt) { 1006 paramicsButton.addActionListener(new java.awt.event.ActionListener() 1007 { 1008 public void actionPerformed(java.awt.event.ActionEvent evt) 1009 { 965 1010 paramicsButtonActionPerformed(evt); 966 1011 } … … 973 1018 towButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 974 1019 towButton.setPreferredSize(new java.awt.Dimension(30, 25)); 975 towButton.addActionListener(new java.awt.event.ActionListener() { 976 public void actionPerformed(java.awt.event.ActionEvent evt) { 1020 towButton.addActionListener(new java.awt.event.ActionListener() 1021 { 1022 public void actionPerformed(java.awt.event.ActionEvent evt) 1023 { 977 1024 towButtonActionPerformed(evt); 978 1025 } … … 985 1032 audioButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 986 1033 audioButton.setPreferredSize(new java.awt.Dimension(30, 25)); 987 audioButton.addActionListener(new java.awt.event.ActionListener() { 988 public void actionPerformed(java.awt.event.ActionEvent evt) { 1034 audioButton.addActionListener(new java.awt.event.ActionListener() 1035 { 1036 public void actionPerformed(java.awt.event.ActionEvent evt) 1037 { 989 1038 audioButtonActionPerformed(evt); 990 1039 } … … 997 1046 cctvButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 998 1047 cctvButton.setPreferredSize(new java.awt.Dimension(30, 25)); 999 cctvButton.addActionListener(new java.awt.event.ActionListener() { 1000 public void actionPerformed(java.awt.event.ActionEvent evt) { 1048 cctvButton.addActionListener(new java.awt.event.ActionListener() 1049 { 1050 public void actionPerformed(java.awt.event.ActionEvent evt) 1051 { 1001 1052 cctvButtonActionPerformed(evt); 1002 1053 } … … 1009 1060 cadButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1010 1061 cadButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1011 cadButton.addActionListener(new java.awt.event.ActionListener() { 1012 public void actionPerformed(java.awt.event.ActionEvent evt) { 1062 cadButton.addActionListener(new java.awt.event.ActionListener() 1063 { 1064 public void actionPerformed(java.awt.event.ActionEvent evt) 1065 { 1013 1066 cadButtonActionPerformed(evt); 1014 1067 } … … 1021 1074 chpRadioButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1022 1075 chpRadioButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1023 chpRadioButton.addActionListener(new java.awt.event.ActionListener() { 1024 public void actionPerformed(java.awt.event.ActionEvent evt) { 1076 chpRadioButton.addActionListener(new java.awt.event.ActionListener() 1077 { 1078 public void actionPerformed(java.awt.event.ActionEvent evt) 1079 { 1025 1080 chpRadioButtonActionPerformed(evt); 1026 1081 } … … 1091 1146 atmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1092 1147 atmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1093 atmsEvalButton.addActionListener(new java.awt.event.ActionListener() { 1094 public void actionPerformed(java.awt.event.ActionEvent evt) { 1148 atmsEvalButton.addActionListener(new java.awt.event.ActionListener() 1149 { 1150 public void actionPerformed(java.awt.event.ActionEvent evt) 1151 { 1095 1152 atmsEvalButtonActionPerformed(evt); 1096 1153 } … … 1103 1160 cmsEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1104 1161 cmsEvalButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1105 cmsEvalButton.addActionListener(new java.awt.event.ActionListener() { 1106 public void actionPerformed(java.awt.event.ActionEvent evt) { 1162 cmsEvalButton.addActionListener(new java.awt.event.ActionListener() 1163 { 1164 public void actionPerformed(java.awt.event.ActionEvent evt) 1165 { 1107 1166 cmsEvalButtonActionPerformed(evt); 1108 1167 } … … 1115 1174 cadEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1116 1175 cadEvalButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1117 cadEvalButton.addActionListener(new java.awt.event.ActionListener() { 1118 public void actionPerformed(java.awt.event.ActionEvent evt) { 1176 cadEvalButton.addActionListener(new java.awt.event.ActionListener() 1177 { 1178 public void actionPerformed(java.awt.event.ActionEvent evt) 1179 { 1119 1180 cadEvalButtonActionPerformed(evt); 1120 1181 } … … 1127 1188 facilitatorEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1128 1189 facilitatorEvalButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1129 facilitatorEvalButton.addActionListener(new java.awt.event.ActionListener() { 1130 public void actionPerformed(java.awt.event.ActionEvent evt) { 1190 facilitatorEvalButton.addActionListener(new java.awt.event.ActionListener() 1191 { 1192 public void actionPerformed(java.awt.event.ActionEvent evt) 1193 { 1131 1194 facilitatorEvalButtonActionPerformed(evt); 1132 1195 } … … 1139 1202 activityLogEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1140 1203 activityLogEvalButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1141 activityLogEvalButton.addActionListener(new java.awt.event.ActionListener() { 1142 public void actionPerformed(java.awt.event.ActionEvent evt) { 1204 activityLogEvalButton.addActionListener(new java.awt.event.ActionListener() 1205 { 1206 public void actionPerformed(java.awt.event.ActionEvent evt) 1207 { 1143 1208 activityLogEvalButtonActionPerformed(evt); 1144 1209 } … … 1151 1216 radioEvalButton.setMargin(new java.awt.Insets(2, 10, 2, 10)); 1152 1217 radioEvalButton.setPreferredSize(new java.awt.Dimension(30, 25)); 1153 radioEvalButton.addActionListener(new java.awt.event.ActionListener() { 1154 public void actionPerformed(java.awt.event.ActionEvent evt) { 1218 radioEvalButton.addActionListener(new java.awt.event.ActionListener() 1219 { 1220 public void actionPerformed(java.awt.event.ActionEvent evt) 1221 { 1155 1222 radioEvalButtonActionPerformed(evt); 1156 1223 } … … 1196 1263 zoomInIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomIn.png"))); // NOI18N 1197 1264 zoomInIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); 1198 zoomInIcon.addMouseListener(new java.awt.event.MouseAdapter() { 1199 public void mouseClicked(java.awt.event.MouseEvent evt) { 1265 zoomInIcon.addMouseListener(new java.awt.event.MouseAdapter() 1266 { 1267 public void mouseClicked(java.awt.event.MouseEvent evt) 1268 { 1200 1269 zoomInIconMouseClicked(evt); 1201 1270 } … … 1204 1273 zoomOutIcon.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/ZoomOut.png"))); // NOI18N 1205 1274 zoomOutIcon.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); 1206 zoomOutIcon.addMouseListener(new java.awt.event.MouseAdapter() { 1207 public void mouseClicked(java.awt.event.MouseEvent evt) { 1275 zoomOutIcon.addMouseListener(new java.awt.event.MouseAdapter() 1276 { 1277 public void mouseClicked(java.awt.event.MouseEvent evt) 1278 { 1208 1279 zoomOutIconMouseClicked(evt); 1209 1280 } … … 1228 1299 1229 1300 btnAddTime.setText("+15:00"); 1230 btnAddTime.addActionListener(new java.awt.event.ActionListener() { 1231 public void actionPerformed(java.awt.event.ActionEvent evt) { 1301 btnAddTime.addActionListener(new java.awt.event.ActionListener() 1302 { 1303 public void actionPerformed(java.awt.event.ActionEvent evt) 1304 { 1232 1305 btnAddTimeActionPerformed(evt); 1233 1306 } … … 1310 1383 */ 1311 1384 private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged 1385 //Moving the zoom slider always refreshes the window 1312 1386 ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue(); 1313 1387 this.update(null, theIncident); … … 1406 1480 * @param evt the button press event 1407 1481 */ 1408 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed1482 private void btnCancelNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelNoiseActionPerformed 1409 1483 addNoiseFrame.setVisible(false); 1410 }//GEN-LAST:event_ jButton1ActionPerformed1484 }//GEN-LAST:event_btnCancelNoiseActionPerformed 1411 1485 1412 1486 /** … … 1416 1490 * @param evt the button press event 1417 1491 */ 1418 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed1492 private void btnGenerateNoiseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGenerateNoiseActionPerformed 1419 1493 Random rng = new Random(); 1420 1494 ScriptEventType[] eventTypes = ScriptEventType.values(); 1421 1495 1422 1496 /* For prototyping purpose, ignore the sliders and average their values */ 1423 int total = jSlider1.getValue() + jSlider2.getValue() + jSlider3.getValue() + jSlider5.getValue() + jSlider4.getValue();1497 int total = sliderRadioChatter.getValue() + sliderLaneClosures.getValue() + sliderTMCAL.getValue() + sliderMinorEvents.getValue() + sliderBackgroundNoise.getValue(); 1424 1498 total /= 5; 1425 1499 … … 1453 1527 1454 1528 this.update(null, theIncident); 1455 }//GEN-LAST:event_ jButton2ActionPerformed1529 }//GEN-LAST:event_btnGenerateNoiseActionPerformed 1456 1530 1457 1531 /** … … 1683 1757 }//GEN-LAST:event_zoomOutIconMouseClicked 1684 1758 1759 /** 1760 * Add 15 minutes to the end of the timeline. This allows the user to add 1761 * new events past the current end of the incident 1762 * 1763 * @param evt the button press event 1764 */ 1685 1765 private void btnAddTimeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnAddTimeActionPerformed 1686 1766 {//GEN-HEADEREND:event_btnAddTimeActionPerformed … … 1722 1802 return version; 1723 1803 } 1724 1725 // /** 1726 // * Runs the script builder. 1727 // * 1728 // * @param args the command line arguments 1729 // */ 1730 // public static void main(String args[]) 1731 // { 1732 // try 1733 // { 1734 // UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); 1735 // } 1736 // catch (ClassNotFoundException ex) 1737 // { 1738 // } 1739 // catch (InstantiationException ex) 1740 // { 1741 // } 1742 // catch (IllegalAccessException ex) 1743 // { 1744 // } 1745 // catch (UnsupportedLookAndFeelException ex) 1746 // { 1747 // } 1748 // 1749 // try 1750 // { 1751 // UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel"); 1752 // } 1753 // catch (ClassNotFoundException ex) 1754 // { 1755 // } 1756 // catch (InstantiationException ex) 1757 // { 1758 // } 1759 // catch (IllegalAccessException ex) 1760 // { 1761 // } 1762 // catch (UnsupportedLookAndFeelException ex) 1763 // { 1764 // } 1765 // 1766 // java.awt.EventQueue.invokeLater( 1767 // new Runnable() 1768 // { 1769 // public void run() 1770 // { 1771 // new IncidentEditorFrame().setVisible(true); 1772 // } 1773 // }); 1774 // } 1804 1775 1805 // Variables declaration - do not modify//GEN-BEGIN:variables 1776 1806 private javax.swing.JButton activityLogEvalButton; … … 1779 1809 private javax.swing.JButton audioButton; 1780 1810 private javax.swing.JButton btnAddTime; 1811 private javax.swing.JButton btnCancelNoise; 1812 private javax.swing.JButton btnGenerateNoise; 1781 1813 private javax.swing.JButton cadButton; 1782 1814 private javax.swing.JButton cadEvalButton; … … 1800 1832 private scriptbuilder.gui.panels.IncidentNumberPanel incidentNumberPanel1; 1801 1833 private scriptbuilder.gui.panels.IncidentTimelinePanel incidentTimelinePanel1; 1802 private javax.swing.JButton jButton1;1803 private javax.swing.JButton jButton2;1804 private javax.swing.JLabel jLabel13;1805 private javax.swing.JLabel jLabel14;1806 private javax.swing.JLabel jLabel15;1807 private javax.swing.JLabel jLabel16;1808 private javax.swing.JLabel jLabel17;1809 1834 private javax.swing.JLabel jLabel2; 1810 private javax.swing.JLabel jLabel20;1811 private javax.swing.JLabel jLabel21;1812 1835 private javax.swing.JLabel jLabel3; 1813 1836 private javax.swing.JLabel jLabel4; … … 1818 1841 private javax.swing.JMenuItem jMenuItem5; 1819 1842 private javax.swing.JMenuItem jMenuItem6; 1820 private javax.swing.JSlider jSlider1; 1821 private javax.swing.JSlider jSlider2; 1822 private javax.swing.JSlider jSlider3; 1823 private javax.swing.JSlider jSlider4; 1824 private javax.swing.JSlider jSlider5; 1825 private javax.swing.JTextArea jTextArea1; 1843 private javax.swing.JLabel labelBackgroundNoise; 1844 private javax.swing.JLabel labelLaneClosures; 1845 private javax.swing.JLabel labelLeastFreq; 1846 private javax.swing.JLabel labelMinorEvents; 1847 private javax.swing.JLabel labelMostFreq; 1848 private javax.swing.JTextArea labelNoiseDescription; 1849 private javax.swing.JLabel labelRadioChatter; 1850 private javax.swing.JLabel labelTMCAL; 1826 1851 private javax.swing.JButton maintenanceRadioButton; 1827 1852 private javax.swing.JButton okButton; … … 1839 1864 private javax.swing.JPanel scriptEventsPanel1; 1840 1865 private javax.swing.JButton selectButton; 1866 private javax.swing.JSlider sliderBackgroundNoise; 1867 private javax.swing.JSlider sliderLaneClosures; 1868 private javax.swing.JSlider sliderMinorEvents; 1869 private javax.swing.JSlider sliderRadioChatter; 1870 private javax.swing.JSlider sliderTMCAL; 1841 1871 private javax.swing.JButton telephoneButton; 1842 1872 private scriptbuilder.gui.panels.TimeStampPanel timeStampPanel;
Note: See TracChangeset
for help on using the changeset viewer.
