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