Changeset 119 in tmcsimulator-scriptbuilder for trunk/src/event/editor
- Timestamp:
- 09/13/2017 12:30:19 PM (9 years ago)
- Location:
- trunk/src/event/editor/frame
- Files:
-
- 3 edited
-
Editor.form (modified) (7 diffs)
-
Editor.java (modified) (25 diffs)
-
PropertyPanels.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/frame/Editor.form
r101 r119 3 3 <Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 4 <NonVisualComponents> 5 <Container class="javax.swing.JPanel" name="jPanel1"> 6 7 <Layout> 8 <DimensionLayout dim="0"> 9 <Group type="103" groupAlignment="0" attributes="0"> 10 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 11 </Group> 12 </DimensionLayout> 13 <DimensionLayout dim="1"> 14 <Group type="103" groupAlignment="0" attributes="0"> 15 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 16 </Group> 17 </DimensionLayout> 18 </Layout> 19 </Container> 20 <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> 5 <Menu class="javax.swing.JMenuBar" name="editorMenuBar"> 21 6 <SubComponents> 22 <Menu class="javax.swing.JMenu" name=" jMenu1">7 <Menu class="javax.swing.JMenu" name="menuEvaluations"> 23 8 <Properties> 24 9 <Property name="text" type="java.lang.String" value="Evaluations"/> … … 112 97 </SubComponents> 113 98 </Menu> 114 <Menu class="javax.swing.JMenu" name=" JMenu2">99 <Menu class="javax.swing.JMenu" name="menuInstructor"> 115 100 <Properties> 116 101 <Property name="text" type="java.lang.String" value="Instructor Actions"/> … … 161 146 </SubComponents> 162 147 </Menu> 163 <Menu class="javax.swing.JMenu" name=" jMenu3">148 <Menu class="javax.swing.JMenu" name="menuAutoData"> 164 149 <Properties> 165 150 <Property name="text" type="java.lang.String" value="Automated Data"/> … … 267 252 </Properties> 268 253 <SyntheticProperties> 269 <SyntheticProperty name="menuBar" type="java.lang.String" value=" jMenuBar1"/>254 <SyntheticProperty name="menuBar" type="java.lang.String" value="editorMenuBar"/> 270 255 <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 271 256 <SyntheticProperty name="generateCenter" type="boolean" value="false"/> … … 286 271 <DimensionLayout dim="0"> 287 272 <Group type="103" groupAlignment="0" attributes="0"> 288 <Component id=" jTabbedPane1" alignment="1" max="32767" attributes="0"/>273 <Component id="eventTabsPane" alignment="1" max="32767" attributes="0"/> 289 274 <Group type="102" alignment="0" attributes="0"> 290 275 <EmptySpace max="-2" attributes="0"/> 291 276 <Component id="txtEventStart" min="-2" max="-2" attributes="0"/> 292 277 <EmptySpace max="-2" attributes="0"/> 293 <Component id=" jPanel2" max="32767" attributes="0"/>278 <Component id="bottomFramePanel" max="32767" attributes="0"/> 294 279 <EmptySpace max="-2" attributes="0"/> 295 280 <Component id="btnRemoveCurrentEvent" min="-2" pref="226" max="-2" attributes="0"/> … … 302 287 <Group type="102" alignment="0" attributes="0"> 303 288 <EmptySpace max="-2" attributes="0"/> 304 <Component id=" jTabbedPane1" pref="534" max="32767" attributes="0"/>289 <Component id="eventTabsPane" pref="534" max="32767" attributes="0"/> 305 290 <EmptySpace max="-2" attributes="0"/> 306 291 <Group type="103" groupAlignment="0" attributes="0"> 307 <Component id=" jPanel2" min="-2" max="-2" attributes="0"/>292 <Component id="bottomFramePanel" min="-2" max="-2" attributes="0"/> 308 293 <Component id="txtEventStart" min="-2" max="-2" attributes="0"/> 309 294 <Component id="btnRemoveCurrentEvent" min="-2" max="-2" attributes="0"/> … … 314 299 </Layout> 315 300 <SubComponents> 316 <Container class="javax.swing.JTabbedPane" name=" jTabbedPane1">301 <Container class="javax.swing.JTabbedPane" name="eventTabsPane"> 317 302 318 303 <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> 319 304 </Container> 320 <Container class="javax.swing.JPanel" name=" jPanel2">305 <Container class="javax.swing.JPanel" name="bottomFramePanel"> 321 306 322 307 <Layout> -
trunk/src/event/editor/frame/Editor.java
r102 r119 100 100 101 101 // For each menu 102 for (int menuCtr = 0; menuCtr < jMenuBar1.getMenuCount(); menuCtr++)102 for (int menuCtr = 0; menuCtr < editorMenuBar.getMenuCount(); menuCtr++) 103 103 { 104 104 // for each menu item 105 for (java.awt.Component comp : jMenuBar1.getMenu(menuCtr).getMenuComponents())105 for (java.awt.Component comp : editorMenuBar.getMenu(menuCtr).getMenuComponents()) 106 106 { 107 107 JMenuItem item = (JMenuItem) comp; … … 164 164 { 165 165 166 jPanel1 = new javax.swing.JPanel(); 167 jTabbedPane1 = new javax.swing.JTabbedPane(); 168 jPanel2 = new javax.swing.JPanel(); 166 eventTabsPane = new javax.swing.JTabbedPane(); 167 bottomFramePanel = new javax.swing.JPanel(); 169 168 txtEventStart = new javax.swing.JTextField(); 170 169 btnRemoveCurrentEvent = new javax.swing.JButton(); 171 jMenuBar1= new javax.swing.JMenuBar();172 jMenu1= new javax.swing.JMenu();170 editorMenuBar = new javax.swing.JMenuBar(); 171 menuEvaluations = new javax.swing.JMenu(); 173 172 ATMS = new javax.swing.JCheckBoxMenuItem(); 174 173 ActivityLog = new javax.swing.JCheckBoxMenuItem(); … … 177 176 Facilitator = new javax.swing.JCheckBoxMenuItem(); 178 177 Radio = new javax.swing.JCheckBoxMenuItem(); 179 JMenu2= new javax.swing.JMenu();178 menuInstructor = new javax.swing.JMenu(); 180 179 MaintenanceRadio = new javax.swing.JCheckBoxMenuItem(); 181 180 TMTRadio = new javax.swing.JCheckBoxMenuItem(); 182 181 Telephone = new javax.swing.JCheckBoxMenuItem(); 183 jMenu3= new javax.swing.JMenu();182 menuAutoData = new javax.swing.JMenu(); 184 183 Audio = new javax.swing.JMenuItem(); 185 184 CADLog = new javax.swing.JMenuItem(); … … 191 190 Witness = new javax.swing.JMenuItem(); 192 191 193 org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);194 jPanel1.setLayout(jPanel1Layout);195 jPanel1Layout.setHorizontalGroup(196 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)197 .add(0, 100, Short.MAX_VALUE)198 );199 jPanel1Layout.setVerticalGroup(200 jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)201 .add(0, 100, Short.MAX_VALUE)202 );203 204 192 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); 205 193 setTitle("Event Editor"); 206 194 207 org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);208 jPanel2.setLayout(jPanel2Layout);209 jPanel2Layout.setHorizontalGroup(210 jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)195 org.jdesktop.layout.GroupLayout bottomFramePanelLayout = new org.jdesktop.layout.GroupLayout(bottomFramePanel); 196 bottomFramePanel.setLayout(bottomFramePanelLayout); 197 bottomFramePanelLayout.setHorizontalGroup( 198 bottomFramePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 211 199 .add(0, 613, Short.MAX_VALUE) 212 200 ); 213 jPanel2Layout.setVerticalGroup(214 jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)201 bottomFramePanelLayout.setVerticalGroup( 202 bottomFramePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 215 203 .add(0, 34, Short.MAX_VALUE) 216 204 ); … … 227 215 }); 228 216 229 jMenu1.setText("Evaluations");217 menuEvaluations.setText("Evaluations"); 230 218 231 219 ATMS.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); … … 239 227 } 240 228 }); 241 jMenu1.add(ATMS);229 menuEvaluations.add(ATMS); 242 230 243 231 ActivityLog.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK)); … … 251 239 } 252 240 }); 253 jMenu1.add(ActivityLog);241 menuEvaluations.add(ActivityLog); 254 242 255 243 CAD.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK)); … … 263 251 } 264 252 }); 265 jMenu1.add(CAD);253 menuEvaluations.add(CAD); 266 254 267 255 CMS.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); … … 282 270 } 283 271 }); 284 jMenu1.add(CMS);272 menuEvaluations.add(CMS); 285 273 286 274 Facilitator.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.CTRL_MASK)); … … 294 282 } 295 283 }); 296 jMenu1.add(Facilitator);284 menuEvaluations.add(Facilitator); 297 285 298 286 Radio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK)); … … 306 294 } 307 295 }); 308 jMenu1.add(Radio);309 310 jMenuBar1.add(jMenu1);311 312 JMenu2.setText("Instructor Actions");296 menuEvaluations.add(Radio); 297 298 editorMenuBar.add(menuEvaluations); 299 300 menuInstructor.setText("Instructor Actions"); 313 301 314 302 MaintenanceRadio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.CTRL_MASK)); … … 322 310 } 323 311 }); 324 JMenu2.add(MaintenanceRadio);312 menuInstructor.add(MaintenanceRadio); 325 313 326 314 TMTRadio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); … … 334 322 } 335 323 }); 336 JMenu2.add(TMTRadio);324 menuInstructor.add(TMTRadio); 337 325 338 326 Telephone.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); … … 346 334 } 347 335 }); 348 JMenu2.add(Telephone);349 350 jMenuBar1.add(JMenu2);351 352 jMenu3.setText("Automated Data");336 menuInstructor.add(Telephone); 337 338 editorMenuBar.add(menuInstructor); 339 340 menuAutoData.setText("Automated Data"); 353 341 354 342 Audio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); 355 343 Audio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Audio.png"))); // NOI18N 356 344 Audio.setText("Audio"); 357 jMenu3.add(Audio);345 menuAutoData.add(Audio); 358 346 359 347 CADLog.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK)); 360 348 CADLog.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/CAD.png"))); // NOI18N 361 349 CADLog.setText("CAD Log"); 362 jMenu3.add(CADLog);350 menuAutoData.add(CADLog); 363 351 364 352 CCTV.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK)); 365 353 CCTV.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/CCTV.png"))); // NOI18N 366 354 CCTV.setText("CCTV"); 367 jMenu3.add(CCTV);355 menuAutoData.add(CCTV); 368 356 369 357 CHPRadio.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK)); … … 377 365 } 378 366 }); 379 jMenu3.add(CHPRadio);367 menuAutoData.add(CHPRadio); 380 368 381 369 Paramics.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK)); 382 370 Paramics.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Paramics.png"))); // NOI18N 383 371 Paramics.setText("Paramics"); 384 jMenu3.add(Paramics);372 menuAutoData.add(Paramics); 385 373 386 374 Tow.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK)); 387 375 Tow.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Tow.png"))); // NOI18N 388 376 Tow.setText("Tow"); 389 jMenu3.add(Tow);377 menuAutoData.add(Tow); 390 378 391 379 Unit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK)); 392 380 Unit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Unit.png"))); // NOI18N 393 381 Unit.setText("Unit"); 394 jMenu3.add(Unit);382 menuAutoData.add(Unit); 395 383 396 384 Witness.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.CTRL_MASK)); 397 385 Witness.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Witness.png"))); // NOI18N 398 386 Witness.setText("Witness"); 399 jMenu3.add(Witness);400 401 jMenuBar1.add(jMenu3);402 403 setJMenuBar( jMenuBar1);387 menuAutoData.add(Witness); 388 389 editorMenuBar.add(menuAutoData); 390 391 setJMenuBar(editorMenuBar); 404 392 405 393 org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); … … 407 395 layout.setHorizontalGroup( 408 396 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 409 .add(org.jdesktop.layout.GroupLayout.TRAILING, jTabbedPane1)397 .add(org.jdesktop.layout.GroupLayout.TRAILING, eventTabsPane) 410 398 .add(layout.createSequentialGroup() 411 399 .addContainerGap() 412 400 .add(txtEventStart, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 413 401 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 414 .add( jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)402 .add(bottomFramePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 415 403 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 416 404 .add(btnRemoveCurrentEvent, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 226, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) … … 421 409 .add(layout.createSequentialGroup() 422 410 .addContainerGap() 423 .add( jTabbedPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE)411 .add(eventTabsPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE) 424 412 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 425 413 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 426 .add( jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)414 .add(bottomFramePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 427 415 .add(txtEventStart, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 428 416 .add(btnRemoveCurrentEvent))) … … 447 435 {//GEN-HEADEREND:event_btnRemoveCurrentEventActionPerformed 448 436 449 int index = jTabbedPane1.getSelectedIndex();450 451 if (index >= 0 && jTabbedPane1.getTabComponentAt(index) != null)452 { 453 JPanel removable = (JPanel) jTabbedPane1437 int index = eventTabsPane.getSelectedIndex(); 438 439 if (index >= 0 && eventTabsPane.getTabComponentAt(index) != null) 440 { 441 JPanel removable = (JPanel) eventTabsPane 454 442 .getSelectedComponent(); 455 this.model.properties.removeProperty(removable); 443 PropertyPanel update = this.model.properties.removeProperty(removable); 444 445 ((I_ScriptEventEditorPanel) update.getPanel()).removeAssociatedEvent(); 446 456 447 } 457 448 … … 466 457 int secs = Integer.parseInt(tokens[2]); 467 458 468 int time = (3600 * hrs) + (60 * mins) + secs;469 470 int index = jTabbedPane1.getSelectedIndex();471 472 if (index >= 0 && jTabbedPane1.getTabComponentAt(index) != null)473 { 474 JPanel removable = (JPanel) jTabbedPane1459 int newTime = (3600 * hrs) + (60 * mins) + secs; 460 461 int index = eventTabsPane.getSelectedIndex(); 462 463 if (index >= 0 && eventTabsPane.getTabComponentAt(index) != null) 464 { 465 JPanel removable = (JPanel) eventTabsPane 475 466 .getSelectedComponent(); 476 467 I_ScriptEvent ise = this.model.eventMap.get(removable); 477 if (time != slice.getTime()) 478 { 479 System.out.println("New time = " + time); 468 if (newTime != slice.getTime() && incident.changeEventStart(ise, slice.getTime(), newTime)) 469 { 480 470 this.model.properties.removeProperty(removable); 481 incident.addNewEvent(ise, time); 482 SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");483 df.setTimeZone(TimeZone.getTimeZone("GMT"));484 String eventTime = df.format(new Date(slice.getTime() * 1000));485 txtEventStart.setText(eventTime);486 }471 472 } 473 SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss"); 474 df.setTimeZone(TimeZone.getTimeZone("GMT")); 475 String eventTime = df.format(new Date(slice.getTime() * 1000)); 476 txtEventStart.setText(eventTime); 487 477 } 488 478 } … … 514 504 private javax.swing.JMenuItem CMS; 515 505 private javax.swing.JCheckBoxMenuItem Facilitator; 516 private javax.swing.JMenu JMenu2;517 506 private javax.swing.JCheckBoxMenuItem MaintenanceRadio; 518 507 private javax.swing.JMenuItem Paramics; … … 523 512 private javax.swing.JMenuItem Unit; 524 513 private javax.swing.JMenuItem Witness; 514 private javax.swing.JPanel bottomFramePanel; 525 515 private javax.swing.JButton btnRemoveCurrentEvent; 526 private javax.swing.JMenu jMenu1; 527 private javax.swing.JMenu jMenu3; 528 private javax.swing.JMenuBar jMenuBar1; 529 private javax.swing.JPanel jPanel1; 530 private javax.swing.JPanel jPanel2; 531 private javax.swing.JTabbedPane jTabbedPane1; 516 private javax.swing.JMenuBar editorMenuBar; 517 private javax.swing.JTabbedPane eventTabsPane; 518 private javax.swing.JMenu menuAutoData; 519 private javax.swing.JMenu menuEvaluations; 520 private javax.swing.JMenu menuInstructor; 532 521 private javax.swing.JTextField txtEventStart; 533 522 // End of variables declaration//GEN-END:variables … … 552 541 if (update.getType() == UpdateType.Add) 553 542 { 554 jTabbedPane1.insertTab(null, null,543 eventTabsPane.insertTab(null, null, 555 544 update.getPanel().getPanel(), null, update.getPosition()); 556 jTabbedPane1.setTabComponentAt(update.getPosition(), title);557 jTabbedPane1.setSelectedIndex(update.getPosition());545 eventTabsPane.setTabComponentAt(update.getPosition(), title); 546 eventTabsPane.setSelectedIndex(update.getPosition()); 558 547 topFrame.repaint(); 559 548 } 560 549 else if (update.getType() == UpdateType.Remove) 561 550 { 562 jTabbedPane1.remove(update.getPanel().getPanel()); 563 if (update.getPanel().getPanel() instanceof I_ScriptEventEditorPanel) 564 { 565 ((I_ScriptEventEditorPanel) update.getPanel().getPanel()).removeAssociatedEvent(); 566 } 551 eventTabsPane.remove(update.getPanel().getPanel()); 567 552 topFrame.repaint(); 568 553 } 569 554 else if (update.getType() == UpdateType.TitleChange) 570 555 { 571 final int index = jTabbedPane1.indexOfComponent(556 final int index = eventTabsPane.indexOfComponent( 572 557 update.getPanel().getPanel()); 573 558 … … 576 561 public void run() 577 562 { 578 Color c = jTabbedPane1.getForegroundAt(index);579 jTabbedPane1.setForegroundAt(index, Color.blue);563 Color c = eventTabsPane.getForegroundAt(index); 564 eventTabsPane.setForegroundAt(index, Color.blue); 580 565 try 581 566 { … … 585 570 { 586 571 } 587 if (index < jTabbedPane1.getTabCount())572 if (index < eventTabsPane.getTabCount()) 588 573 { 589 jTabbedPane1.setTabComponentAt(index, title);574 eventTabsPane.setTabComponentAt(index, title); 590 575 } 591 576 try … … 596 581 { 597 582 } 598 if (index < jTabbedPane1.getTabCount())583 if (index < eventTabsPane.getTabCount()) 599 584 { 600 jTabbedPane1.setForegroundAt(index, c);585 eventTabsPane.setForegroundAt(index, c); 601 586 } 602 587 } -
trunk/src/event/editor/frame/PropertyPanels.java
r94 r119 90 90 } 91 91 92 private boolean remove(PropertyPanel panel)92 private boolean remove(PropertyPanel removablePanel) 93 93 { 94 94 boolean result = false; 95 95 96 if ((result = properties.remove( panel)))96 if ((result = properties.remove(removablePanel))) 97 97 { 98 98 setChanged(); 99 notifyObservers(new PropertyUpdate(UpdateType.Remove, panel));99 notifyObservers(new PropertyUpdate(UpdateType.Remove, removablePanel)); 100 100 } 101 101 else … … 104 104 } 105 105 106 if ( panel.getProperty().getType() == PropertyTypes.Multiple)106 if (removablePanel.getProperty().getType() == PropertyTypes.Multiple) 107 107 { 108 108 Vector<MultPropertyPanel> panelsOfSameType = new Vector<MultPropertyPanel>(); 109 109 Vector<MultPropertyPanel> panelsOfGreaterIndex = new Vector<MultPropertyPanel>(); 110 110 111 propertyCounter.put( panel.getProperty(), propertyCounter.get(panel.getProperty()) - 1);111 propertyCounter.put(removablePanel.getProperty(), propertyCounter.get(removablePanel.getProperty()) - 1); 112 112 113 113 // extract panels of the same property type 114 114 for (PropertyPanel pan : properties) 115 115 { 116 if (pan.getProperty() == panel.getProperty())116 if (pan.getProperty() == removablePanel.getProperty()) 117 117 { 118 118 panelsOfSameType.add((MultPropertyPanel) pan); … … 124 124 for (MultPropertyPanel pan : panelsOfSameType) 125 125 { 126 if (pan.getIndex() > ((MultPropertyPanel) panel).getIndex())126 if (pan.getIndex() > ((MultPropertyPanel) removablePanel).getIndex()) 127 127 { 128 128 panelsOfGreaterIndex.add(pan); … … 138 138 } 139 139 } 140 else if ( panel.getProperty().getType() == PropertyTypes.Optional)140 else if (removablePanel.getProperty().getType() == PropertyTypes.Optional) 141 141 { 142 142 // do nothing
Note: See TracChangeset
for help on using the changeset viewer.
