Changeset 113 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui
- Timestamp:
- 09/06/2017 11:37:48 AM (9 years ago)
- Location:
- trunk/src/scriptbuilder/gui
- Files:
-
- 3 edited
-
IncidentEditorFrame.form (modified) (1 diff)
-
IncidentEditorFrame.java (modified) (1 diff)
-
panels/IncidentTimelinePanel.java (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentEditorFrame.form
r110 r113 590 590 </Property> 591 591 </Properties> 592 <AuxValues> 593 <AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new scriptbuilder.gui.panels.IncidentTimelinePanel(false)"/> 594 </AuxValues> 592 595 593 596 <Layout> -
trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
r110 r113 443 443 timelinesScrollPane = new javax.swing.JScrollPane(); 444 444 timelineTickPanel = new scriptbuilder.gui.panels.TimelineTickPanel(); 445 incidentTimelinePanel1 = new scriptbuilder.gui.panels.IncidentTimelinePanel( );445 incidentTimelinePanel1 = new scriptbuilder.gui.panels.IncidentTimelinePanel(false); 446 446 incidentNumberPanel1 = new scriptbuilder.gui.panels.IncidentNumberPanel(); 447 447 scriptEventsPanel = new javax.swing.JPanel(); -
trunk/src/scriptbuilder/gui/panels/IncidentTimelinePanel.java
r106 r113 59 59 boolean focused; 60 60 61 /** 62 * If true, right-clicking on this panel will produce the popup menu. 63 */ 64 private boolean hasPopupAccess; 65 61 66 int cursorTime, lastSlice, x, y; 62 67 … … 147 152 if (e.getActionCommand().equals("Edit Events")) 148 153 { 149 IncidentEditorFrame editor = new IncidentEditorFrame(incident, (ScriptBuilderFrame) topFrame);154 IncidentEditorFrame editor = new IncidentEditorFrame(incident, (ScriptBuilderFrame) topFrame); 150 155 script.addObserver(editor); 151 156 editor.setVisible(true); … … 169 174 170 175 // Does user want a popup menu? 171 if (e.isPopupTrigger() )176 if (e.isPopupTrigger() && hasPopupAccess) 172 177 { 173 178 JPopupMenu popup = createPopup(); … … 229 234 ed.setSlice(incident.slices.get(newSlice)); 230 235 } 231 232 236 233 237 /** … … 319 323 super(); 320 324 325 hasPopupAccess = true; 326 321 327 requestedEditorFillerTime = 0; 322 328 // FACILITATOR_EVAL_EVENT, RADIO_EVAL_EVENT … … 348 354 349 355 /** 356 * Constructor. Generates a HashMap of all possible event types. 357 * 358 * @param usesPopup determines whether or not right-clicking on this panel 359 * will display a popup menu. 360 */ 361 public IncidentTimelinePanel(boolean usesPopup) 362 { 363 super(); 364 365 hasPopupAccess = usesPopup; 366 367 requestedEditorFillerTime = 0; 368 // FACILITATOR_EVAL_EVENT, RADIO_EVAL_EVENT 369 eventTypeToPropertyMap = new HashMap(); 370 eventTypeToPropertyMap.put(ScriptEventType.AUDIO_EVENT, Properties.Audio); 371 eventTypeToPropertyMap.put(ScriptEventType.CAD_EVENT, Properties.CADLog); 372 eventTypeToPropertyMap.put(ScriptEventType.CCTV_EVENT, Properties.CCTV); 373 eventTypeToPropertyMap.put(ScriptEventType.CHP_RADIO_EVENT, Properties.CHPRadio); 374 eventTypeToPropertyMap.put(ScriptEventType.PARAMICS_EVENT, Properties.Paramics); 375 eventTypeToPropertyMap.put(ScriptEventType.TOW_EVENT, Properties.Tow); 376 eventTypeToPropertyMap.put(ScriptEventType.UNIT_EVENT, Properties.Unit); 377 eventTypeToPropertyMap.put(ScriptEventType.WITNESS_EVENT, Properties.Witness); 378 eventTypeToPropertyMap.put(ScriptEventType.MAINTENANCE_RADIO_EVENT, Properties.MaintenanceRadio); 379 eventTypeToPropertyMap.put(ScriptEventType.TMT_RADIO_EVENT, Properties.TMTRadio); 380 eventTypeToPropertyMap.put(ScriptEventType.TELEPHONE_EVENT, Properties.Telephone); 381 eventTypeToPropertyMap.put(ScriptEventType.ATMS_EVAL_EVENT, Properties.ATMS); 382 eventTypeToPropertyMap.put(ScriptEventType.ACTIVITY_LOG_EVAL_EVENT, Properties.ActivityLog); 383 eventTypeToPropertyMap.put(ScriptEventType.CAD_EVAL_EVENT, Properties.CAD); 384 eventTypeToPropertyMap.put(ScriptEventType.CMS_EVAL_EVENT, Properties.CMS); 385 eventTypeToPropertyMap.put(ScriptEventType.FACILITATOR_EVAL_EVENT, Properties.Facilitator); 386 eventTypeToPropertyMap.put(ScriptEventType.RADIO_EVAL_EVENT, Properties.Radio); 387 388 // Add the mouse listener 389 IncidentTimelineMouseListener mouseListener 390 = new IncidentTimelineMouseListener(); 391 addMouseMotionListener(mouseListener); 392 addMouseListener(mouseListener); 393 } 394 395 /** 350 396 * Update the panel if it's changed collapsed status. Redraw it with the 351 397 * correct dimensions for its status.
Note: See TracChangeset
for help on using the changeset viewer.
