Changeset 54 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder
- Timestamp:
- 08/09/2017 04:12:39 PM (9 years ago)
- Location:
- trunk/src/scriptbuilder/gui
- Files:
-
- 6 edited
-
IncidentEditorFrame.form (modified) (9 diffs)
-
IncidentEditorFrame.java (modified) (26 diffs)
-
ScriptBuilderFrame.java (modified) (1 diff)
-
panels/ScriptBuilderTimelinePanel.java (modified) (4 diffs)
-
panels/TimeStampPanel.java (modified) (1 diff)
-
panels/TimelineTickPanel.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentEditorFrame.form
r53 r54 3 3 <Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 4 <NonVisualComponents> 5 <Container class="javax.swing.JPopupMenu" name="incidentPopupMenu">6 7 <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">8 <Property name="useNullLayout" type="boolean" value="true"/>9 </Layout>10 <SubComponents>11 <MenuItem class="javax.swing.JMenuItem" name="popupDeleteIncident">12 <Properties>13 <Property name="text" type="java.lang.String" value="Delete Incident..."/>14 </Properties>15 </MenuItem>16 </SubComponents>17 </Container>18 5 <Container class="javax.swing.JPopupMenu" name="eventPopupMenu"> 19 6 … … 227 214 </Properties> 228 215 </MenuItem> 229 </SubComponents>230 </Container>231 <Container class="javax.swing.JFrame" name="incidentFrame">232 <Properties>233 <Property name="title" type="java.lang.String" value="Incident"/>234 <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">235 <Dimension value="[400, 400]"/>236 </Property>237 </Properties>238 239 <Layout>240 <DimensionLayout dim="0">241 <Group type="103" groupAlignment="0" attributes="0">242 <Group type="102" alignment="1" attributes="0">243 <EmptySpace max="-2" attributes="0"/>244 <Group type="103" groupAlignment="1" attributes="0">245 <Component id="jScrollPane1" alignment="0" pref="322" max="32767" attributes="0"/>246 <Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/>247 <Group type="102" alignment="0" attributes="0">248 <Group type="103" groupAlignment="0" attributes="0">249 <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/>250 <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/>251 <Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/>252 </Group>253 <EmptySpace type="separate" max="-2" attributes="0"/>254 <Group type="103" groupAlignment="0" attributes="0">255 <Component id="addIncidentName" pref="218" max="32767" attributes="0"/>256 <Component id="addIncidentNumber" alignment="0" pref="218" max="32767" attributes="0"/>257 <Group type="102" alignment="1" attributes="0">258 <Component id="incidentColorField" pref="119" max="32767" attributes="0"/>259 <EmptySpace max="-2" attributes="0"/>260 <Component id="jButton3" min="-2" pref="93" max="-2" attributes="0"/>261 </Group>262 </Group>263 </Group>264 <Group type="102" alignment="0" attributes="0">265 <Component id="incidentCancelButton" min="-2" max="-2" attributes="0"/>266 <EmptySpace pref="188" max="32767" attributes="0"/>267 <Component id="incidentOkButton" min="-2" pref="69" max="-2" attributes="0"/>268 </Group>269 <Group type="102" alignment="0" attributes="0">270 <Group type="103" groupAlignment="0" attributes="0">271 <Component id="jLabel12" min="-2" max="-2" attributes="0"/>272 <Component id="jLabel11" alignment="0" min="-2" max="-2" attributes="0"/>273 </Group>274 <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>275 <Group type="103" groupAlignment="0" attributes="0">276 <Component id="addIncidentStart" alignment="0" pref="158" max="32767" attributes="0"/>277 <Component id="addIncidentLength" alignment="0" pref="158" max="32767" attributes="0"/>278 </Group>279 </Group>280 </Group>281 <EmptySpace max="-2" attributes="0"/>282 </Group>283 </Group>284 </DimensionLayout>285 <DimensionLayout dim="1">286 <Group type="103" groupAlignment="0" attributes="0">287 <Group type="102" alignment="0" attributes="0">288 <EmptySpace max="-2" attributes="0"/>289 <Group type="103" groupAlignment="3" attributes="0">290 <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>291 <Component id="addIncidentNumber" alignment="3" min="-2" max="-2" attributes="0"/>292 </Group>293 <EmptySpace max="-2" attributes="0"/>294 <Group type="103" groupAlignment="3" attributes="0">295 <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>296 <Component id="addIncidentName" alignment="3" min="-2" max="-2" attributes="0"/>297 </Group>298 <EmptySpace max="-2" attributes="0"/>299 <Group type="103" groupAlignment="3" attributes="0">300 <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>301 <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/>302 <Component id="incidentColorField" alignment="3" min="-2" max="-2" attributes="0"/>303 </Group>304 <EmptySpace max="-2" attributes="0"/>305 <Component id="jLabel10" min="-2" max="-2" attributes="0"/>306 <EmptySpace max="-2" attributes="0"/>307 <Component id="jScrollPane1" pref="106" max="32767" attributes="0"/>308 <EmptySpace max="-2" attributes="0"/>309 <Group type="103" groupAlignment="3" attributes="0">310 <Component id="addIncidentStart" alignment="3" min="-2" max="-2" attributes="0"/>311 <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/>312 </Group>313 <EmptySpace max="-2" attributes="0"/>314 <Group type="103" groupAlignment="3" attributes="0">315 <Component id="addIncidentLength" alignment="3" min="-2" max="-2" attributes="0"/>316 <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>317 </Group>318 <EmptySpace max="-2" attributes="0"/>319 <Group type="103" groupAlignment="3" attributes="0">320 <Component id="incidentCancelButton" alignment="3" min="-2" max="-2" attributes="0"/>321 <Component id="incidentOkButton" alignment="3" min="-2" max="-2" attributes="0"/>322 </Group>323 <EmptySpace max="-2" attributes="0"/>324 </Group>325 </Group>326 </DimensionLayout>327 </Layout>328 <SubComponents>329 <Component class="javax.swing.JLabel" name="jLabel6">330 <Properties>331 <Property name="text" type="java.lang.String" value="Incident Number: "/>332 </Properties>333 </Component>334 <Component class="javax.swing.JLabel" name="jLabel8">335 <Properties>336 <Property name="text" type="java.lang.String" value="Incident Name:"/>337 </Properties>338 </Component>339 <Component class="javax.swing.JLabel" name="jLabel9">340 <Properties>341 <Property name="text" type="java.lang.String" value="Incident Color: "/>342 </Properties>343 </Component>344 <Component class="javax.swing.JLabel" name="jLabel10">345 <Properties>346 <Property name="text" type="java.lang.String" value="Incident Description:"/>347 </Properties>348 </Component>349 <Container class="javax.swing.JScrollPane" name="jScrollPane1">350 <Properties>351 <Property name="horizontalScrollBarPolicy" type="int" value="31"/>352 <Property name="verticalScrollBarPolicy" type="int" value="22"/>353 </Properties>354 <AuxValues>355 <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>356 </AuxValues>357 358 <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>359 <SubComponents>360 <Component class="javax.swing.JTextArea" name="addIncidentDescription">361 <Properties>362 <Property name="columns" type="int" value="20"/>363 <Property name="lineWrap" type="boolean" value="true"/>364 <Property name="rows" type="int" value="5"/>365 <Property name="wrapStyleWord" type="boolean" value="true"/>366 </Properties>367 </Component>368 </SubComponents>369 </Container>370 <Component class="javax.swing.JButton" name="incidentOkButton">371 <Properties>372 <Property name="text" type="java.lang.String" value="OK"/>373 </Properties>374 <Events>375 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="incidentOkButtonActionPerformed"/>376 </Events>377 </Component>378 <Component class="javax.swing.JButton" name="incidentCancelButton">379 <Properties>380 <Property name="text" type="java.lang.String" value="Cancel"/>381 </Properties>382 <Events>383 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="incidentCancelButtonActionPerformed"/>384 </Events>385 </Component>386 <Component class="javax.swing.JSpinner" name="addIncidentNumber">387 <Properties>388 <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">389 <SpinnerModel initial="101" minimum="101" numberType="java.lang.Integer" stepSize="1" type="number"/>390 </Property>391 </Properties>392 </Component>393 <Component class="javax.swing.JTextField" name="addIncidentName">394 </Component>395 <Component class="javax.swing.JLabel" name="jLabel11">396 <Properties>397 <Property name="text" type="java.lang.String" value="Incident Length in Minutes: "/>398 </Properties>399 </Component>400 <Component class="javax.swing.JSpinner" name="addIncidentLength">401 <Properties>402 <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">403 <SpinnerModel initial="0" minimum="0" numberType="java.lang.Integer" stepSize="1" type="number"/>404 </Property>405 </Properties>406 </Component>407 <Component class="javax.swing.JLabel" name="jLabel12">408 <Properties>409 <Property name="text" type="java.lang.String" value="Incident Start Time in Minutes:"/>410 </Properties>411 </Component>412 <Component class="javax.swing.JSpinner" name="addIncidentStart">413 <Properties>414 <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">415 <SpinnerModel initial="0" minimum="0" numberType="java.lang.Integer" stepSize="1" type="number"/>416 </Property>417 </Properties>418 </Component>419 <Component class="javax.swing.JButton" name="jButton3">420 <Properties>421 <Property name="text" type="java.lang.String" value="Choose..."/>422 </Properties>423 <Events>424 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/>425 </Events>426 </Component>427 <Component class="javax.swing.JTextField" name="incidentColorField">428 <Properties>429 <Property name="editable" type="boolean" value="false"/>430 <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">431 <Color blue="0" green="0" red="0" type="rgb"/>432 </Property>433 </Properties>434 </Component>435 216 </SubComponents> 436 217 </Container> … … 633 414 </SubComponents> 634 415 </Container> 635 <Component class="javax.swing.JColorChooser" name="incidentColorChooser">636 </Component>637 <Menu class="javax.swing.JMenuBar" name="scriptBuilderMenuBar">638 <SubComponents>639 <Menu class="javax.swing.JMenu" name="fileMenu">640 <Properties>641 <Property name="text" type="java.lang.String" value="File"/>642 <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">643 <Insets value="[0, 10, 0, 10]"/>644 </Property>645 </Properties>646 <Events>647 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileMenuActionPerformed"/>648 </Events>649 <SubComponents>650 <MenuItem class="javax.swing.JMenuItem" name="fileNew">651 <Properties>652 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">653 <KeyStroke key="Shift+Ctrl+N"/>654 </Property>655 <Property name="text" type="java.lang.String" value="New"/>656 </Properties>657 <Events>658 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileNewActionPerformed"/>659 </Events>660 </MenuItem>661 <MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator1">662 </MenuItem>663 <MenuItem class="javax.swing.JMenuItem" name="fileOpen">664 <Properties>665 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">666 <KeyStroke key="Shift+Ctrl+O"/>667 </Property>668 <Property name="text" type="java.lang.String" value="Open..."/>669 </Properties>670 <Events>671 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileOpenActionPerformed"/>672 </Events>673 </MenuItem>674 <MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator2">675 </MenuItem>676 <MenuItem class="javax.swing.JMenuItem" name="fileSave">677 <Properties>678 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">679 <KeyStroke key="Ctrl+S"/>680 </Property>681 <Property name="text" type="java.lang.String" value="Save"/>682 </Properties>683 <Events>684 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileSaveActionPerformed"/>685 </Events>686 </MenuItem>687 <MenuItem class="javax.swing.JMenuItem" name="fileSaveAs">688 <Properties>689 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">690 <KeyStroke key="Shift+Ctrl+S"/>691 </Property>692 <Property name="text" type="java.lang.String" value="Save as..."/>693 </Properties>694 <Events>695 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileSaveAsActionPerformed"/>696 </Events>697 </MenuItem>698 </SubComponents>699 </Menu>700 <Menu class="javax.swing.JMenu" name="generateMenu">701 <Properties>702 <Property name="label" type="java.lang.String" value="Generate"/>703 <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">704 <Insets value="[0, 10, 0, 10]"/>705 </Property>706 </Properties>707 <SubComponents>708 <MenuItem class="javax.swing.JMenuItem" name="generateNotebooks">709 <Properties>710 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">711 <KeyStroke key="Ctrl+Alt+N"/>712 </Property>713 <Property name="text" type="java.lang.String" value="Generate Notebooks..."/>714 </Properties>715 <Events>716 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="generateNotebooksActionPerformed"/>717 </Events>718 </MenuItem>719 <MenuItem class="javax.swing.JMenuItem" name="jMenuItem3">720 <Properties>721 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">722 <KeyStroke key="Ctrl+Alt+W"/>723 </Property>724 <Property name="text" type="java.lang.String" value="Generate Web Notebook..."/>725 </Properties>726 </MenuItem>727 <MenuItem class="javax.swing.JMenuItem" name="generateScorecards">728 <Properties>729 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">730 <KeyStroke key="Ctrl+Alt+S"/>731 </Property>732 <Property name="text" type="java.lang.String" value="Generate Scorecards..."/>733 </Properties>734 <Events>735 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="generateScorecardsActionPerformed"/>736 </Events>737 </MenuItem>738 <MenuItem class="javax.swing.JMenuItem" name="generateOrganizationChart">739 <Properties>740 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">741 <KeyStroke key="Ctrl+Alt+O"/>742 </Property>743 <Property name="text" type="java.lang.String" value="Generate D14 TMC Org Chart..."/>744 </Properties>745 <Events>746 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="generateOrganizationChartActionPerformed"/>747 </Events>748 </MenuItem>749 <MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator3">750 </MenuItem>751 <MenuItem class="javax.swing.JMenuItem" name="generateProjectRequirements">752 <Properties>753 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">754 <KeyStroke key="Ctrl+Alt+R"/>755 </Property>756 <Property name="text" type="java.lang.String" value="Generate Project Worklist..."/>757 </Properties>758 <Events>759 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="generateProjectRequirementsActionPerformed"/>760 </Events>761 </MenuItem>762 </SubComponents>763 </Menu>764 <Menu class="javax.swing.JMenu" name="incidentMenu">765 <Properties>766 <Property name="text" type="java.lang.String" value="Incidents"/>767 <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">768 <Insets value="[0, 10, 0, 10]"/>769 </Property>770 </Properties>771 <SubComponents>772 <MenuItem class="javax.swing.JMenuItem" name="newIncident">773 <Properties>774 <Property name="text" type="java.lang.String" value="New Incident..."/>775 </Properties>776 <Events>777 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="newIncidentActionPerformed"/>778 </Events>779 </MenuItem>780 <MenuItem class="javax.swing.JMenuItem" name="editIncident">781 <Properties>782 <Property name="text" type="java.lang.String" value="Edit Incident..."/>783 </Properties>784 <Events>785 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="editIncidentActionPerformed"/>786 </Events>787 </MenuItem>788 <MenuItem class="javax.swing.JPopupMenu$Separator" name="jSeparator4">789 </MenuItem>790 <MenuItem class="javax.swing.JMenuItem" name="saveIncident">791 <Properties>792 <Property name="text" type="java.lang.String" value="Save Incident..."/>793 </Properties>794 <Events>795 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="saveIncidentActionPerformed"/>796 </Events>797 </MenuItem>798 <MenuItem class="javax.swing.JMenuItem" name="loadIncident">799 <Properties>800 <Property name="text" type="java.lang.String" value="Load Incident..."/>801 </Properties>802 <Events>803 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="loadIncidentActionPerformed"/>804 </Events>805 </MenuItem>806 </SubComponents>807 </Menu>808 <Menu class="javax.swing.JMenu" name="generateNoiseMenu">809 <Properties>810 <Property name="text" type="java.lang.String" value="Noise"/>811 </Properties>812 <SubComponents>813 <MenuItem class="javax.swing.JMenuItem" name="generateNoiseOption">814 <Properties>815 <Property name="text" type="java.lang.String" value="Generate Noise..."/>816 </Properties>817 <Events>818 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="generateNoiseOptionActionPerformed"/>819 </Events>820 </MenuItem>821 </SubComponents>822 </Menu>823 <Menu class="javax.swing.JMenu" name="helpMenu">824 <Properties>825 <Property name="text" type="java.lang.String" value="Help"/>826 <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">827 <Insets value="[0, 10, 0, 10]"/>828 </Property>829 </Properties>830 <SubComponents>831 <MenuItem class="javax.swing.JMenuItem" name="helpTutorial">832 <Properties>833 <Property name="accelerator" type="javax.swing.KeyStroke" editor="org.netbeans.modules.form.editors.KeyStrokeEditor">834 <KeyStroke key="F1"/>835 </Property>836 <Property name="text" type="java.lang.String" value="Tutorial..."/>837 </Properties>838 </MenuItem>839 <MenuItem class="javax.swing.JMenuItem" name="helpAbout">840 <Properties>841 <Property name="text" type="java.lang.String" value="About..."/>842 </Properties>843 <Events>844 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="helpAboutActionPerformed"/>845 </Events>846 </MenuItem>847 </SubComponents>848 </Menu>849 </SubComponents>850 </Menu>851 416 </NonVisualComponents> 852 417 <Properties> … … 861 426 </Properties> 862 427 <SyntheticProperties> 863 <SyntheticProperty name="menuBar" type="java.lang.String" value="scriptBuilderMenuBar"/>864 428 <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 865 429 <SyntheticProperty name="generateCenter" type="boolean" value="false"/> … … 941 505 <Component id="scriptEventsPanel1" alignment="0" max="32767" attributes="1"/> 942 506 </Group> 943 <EmptySpace m in="-2" max="-2" attributes="0"/>507 <EmptySpace max="32767" attributes="0"/> 944 508 </Group> 945 509 </Group> … … 978 542 <Group type="102" alignment="0" attributes="0"> 979 543 <EmptySpace max="-2" attributes="0"/> 980 <Group type="103" groupAlignment="1" attributes="0"> 981 <Group type="103" alignment="1" groupAlignment="0" attributes="0"> 982 <Component id="incidentNumberPanel8" alignment="0" min="-2" max="-2" attributes="0"/> 983 <Component id="incidentNumberPanel9" alignment="0" min="-2" max="-2" attributes="0"/> 984 </Group> 985 <Group type="103" alignment="1" groupAlignment="0" attributes="0"> 986 <Component id="incidentNumberPanel1" alignment="0" min="-2" max="-2" attributes="0"/> 987 <Component id="incidentNumberPanel4" alignment="0" min="-2" max="-2" attributes="0"/> 988 <Component id="incidentNumberPanel5" alignment="0" min="-2" max="-2" attributes="0"/> 989 <Component id="incidentNumberPanel6" alignment="0" min="-2" max="-2" attributes="0"/> 990 <Component id="incidentNumberPanel3" alignment="0" min="-2" max="-2" attributes="0"/> 991 <Component id="incidentNumberPanel2" alignment="0" min="-2" max="-2" attributes="0"/> 992 <Component id="incidentNumberPanel7" alignment="0" min="-2" max="-2" attributes="0"/> 993 </Group> 994 <Component id="incidentNumberPanel10" min="-2" max="-2" attributes="0"/> 995 </Group> 996 <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> 997 <Group type="103" groupAlignment="0" attributes="0"> 998 <Component id="incidentTimelinePanel7" max="32767" attributes="1"/> 999 <Component id="incidentTimelinePanel6" alignment="0" min="-2" max="-2" attributes="1"/> 1000 <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> 1001 <Component id="incidentTimelinePanel5" alignment="0" max="32767" attributes="1"/> 1002 <Component id="incidentTimelinePanel4" alignment="0" min="-2" max="-2" attributes="1"/> 1003 </Group> 1004 <Component id="incidentTimelinePanel3" alignment="0" min="-2" max="-2" attributes="1"/> 1005 <Component id="incidentTimelinePanel1" alignment="0" min="-2" pref="6778" max="-2" attributes="1"/> 1006 <Component id="incidentTimelinePanel2" alignment="0" min="-2" max="-2" attributes="1"/> 1007 <Component id="incidentTimelinePanel8" alignment="0" min="-2" max="-2" attributes="1"/> 1008 <Component id="incidentTimelinePanel9" alignment="0" min="-2" max="-2" attributes="1"/> 1009 <Component id="incidentTimelinePanel10" alignment="0" min="-2" max="-2" attributes="1"/> 1010 </Group> 1011 <EmptySpace min="-2" pref="190" max="-2" attributes="0"/> 544 <Component id="incidentNumberPanel1" min="-2" max="-2" attributes="0"/> 545 <EmptySpace type="unrelated" max="-2" attributes="0"/> 546 <Component id="incidentTimelinePanel1" min="-2" pref="6776" max="-2" attributes="1"/> 547 <EmptySpace pref="300" max="32767" attributes="0"/> 1012 548 </Group> 1013 549 </Group> … … 1017 553 <Group type="102" alignment="0" attributes="0"> 1018 554 <EmptySpace max="-2" attributes="0"/> 1019 <Group type="103" groupAlignment="0" attributes="0"> 1020 <Component id="incidentNumberPanel1" min="-2" max="-2" attributes="0"/> 1021 <Component id="incidentTimelinePanel1" min="-2" max="-2" attributes="0"/> 1022 </Group> 1023 <EmptySpace max="-2" attributes="0"/> 1024 <Group type="103" groupAlignment="0" attributes="0"> 1025 <Group type="102" alignment="0" attributes="0"> 1026 <Component id="incidentNumberPanel2" min="-2" max="-2" attributes="0"/> 1027 <EmptySpace max="-2" attributes="0"/> 1028 <Component id="incidentNumberPanel3" min="-2" max="-2" attributes="0"/> 1029 <EmptySpace max="-2" attributes="0"/> 1030 <Component id="incidentNumberPanel4" min="-2" max="-2" attributes="0"/> 1031 <EmptySpace max="-2" attributes="0"/> 1032 <Component id="incidentNumberPanel5" min="-2" max="-2" attributes="0"/> 1033 <EmptySpace max="-2" attributes="0"/> 1034 <Component id="incidentNumberPanel6" min="-2" max="-2" attributes="0"/> 1035 </Group> 1036 <Group type="102" alignment="0" attributes="0"> 1037 <Component id="incidentTimelinePanel2" min="-2" max="-2" attributes="0"/> 1038 <EmptySpace max="-2" attributes="0"/> 1039 <Component id="incidentTimelinePanel3" min="-2" max="-2" attributes="0"/> 1040 <EmptySpace max="-2" attributes="0"/> 1041 <Component id="incidentTimelinePanel4" min="-2" max="-2" attributes="0"/> 1042 <EmptySpace max="-2" attributes="0"/> 1043 <Component id="incidentTimelinePanel5" min="-2" max="-2" attributes="0"/> 1044 <EmptySpace max="-2" attributes="0"/> 1045 <Component id="incidentTimelinePanel6" min="-2" max="-2" attributes="0"/> 1046 </Group> 1047 </Group> 1048 <EmptySpace max="-2" attributes="0"/> 1049 <Group type="103" groupAlignment="0" attributes="0"> 1050 <Component id="incidentTimelinePanel7" alignment="0" min="-2" max="-2" attributes="0"/> 1051 <Component id="incidentNumberPanel7" alignment="0" min="-2" max="-2" attributes="0"/> 1052 </Group> 1053 <EmptySpace max="-2" attributes="0"/> 1054 <Group type="103" groupAlignment="0" attributes="0"> 1055 <Group type="102" alignment="0" attributes="0"> 1056 <Component id="incidentTimelinePanel8" min="-2" max="-2" attributes="0"/> 1057 <EmptySpace max="-2" attributes="0"/> 1058 <Component id="incidentTimelinePanel9" min="-2" max="-2" attributes="0"/> 1059 </Group> 1060 <Group type="102" alignment="0" attributes="0"> 1061 <Component id="incidentNumberPanel8" min="-2" max="-2" attributes="0"/> 1062 <EmptySpace max="-2" attributes="0"/> 1063 <Component id="incidentNumberPanel9" min="-2" max="-2" attributes="0"/> 1064 </Group> 1065 </Group> 1066 <EmptySpace max="-2" attributes="0"/> 1067 <Group type="103" groupAlignment="0" attributes="0"> 1068 <Component id="incidentNumberPanel10" alignment="0" min="-2" max="-2" attributes="0"/> 1069 <Component id="incidentTimelinePanel10" alignment="0" min="-2" max="-2" attributes="0"/> 1070 </Group> 1071 <EmptySpace pref="251" max="32767" attributes="0"/> 555 <Group type="103" groupAlignment="0" max="-2" attributes="0"> 556 <Component id="incidentTimelinePanel1" pref="334" max="32767" attributes="0"/> 557 <Component id="incidentNumberPanel1" max="32767" attributes="0"/> 558 </Group> 559 <EmptySpace pref="977" max="32767" attributes="0"/> 1072 560 </Group> 1073 561 </Group> … … 1089 577 <DimensionLayout dim="0"> 1090 578 <Group type="103" groupAlignment="0" attributes="0"> 1091 <EmptySpace min="0" pref="677 8" max="32767" attributes="0"/>579 <EmptySpace min="0" pref="6776" max="32767" attributes="0"/> 1092 580 </Group> 1093 581 </DimensionLayout> 1094 582 <DimensionLayout dim="1"> 1095 583 <Group type="103" groupAlignment="0" attributes="0"> 1096 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1097 </Group> 1098 </DimensionLayout> 1099 </Layout> 1100 </Container> 1101 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel2"> 1102 <Properties> 1103 <Property name="opaque" type="boolean" value="false"/> 1104 </Properties> 1105 1106 <Layout> 1107 <DimensionLayout dim="0"> 1108 <Group type="103" groupAlignment="0" attributes="0"> 1109 <EmptySpace min="0" pref="6726" max="32767" attributes="0"/> 1110 </Group> 1111 </DimensionLayout> 1112 <DimensionLayout dim="1"> 1113 <Group type="103" groupAlignment="0" attributes="0"> 1114 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1115 </Group> 1116 </DimensionLayout> 1117 </Layout> 1118 </Container> 1119 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel8"> 1120 <Properties> 1121 <Property name="opaque" type="boolean" value="false"/> 1122 </Properties> 1123 1124 <Layout> 1125 <DimensionLayout dim="0"> 1126 <Group type="103" groupAlignment="0" attributes="0"> 1127 <EmptySpace min="0" pref="5686" max="32767" attributes="0"/> 1128 </Group> 1129 </DimensionLayout> 1130 <DimensionLayout dim="1"> 1131 <Group type="103" groupAlignment="0" attributes="0"> 1132 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1133 </Group> 1134 </DimensionLayout> 1135 </Layout> 1136 </Container> 1137 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel3"> 1138 <Properties> 1139 <Property name="opaque" type="boolean" value="false"/> 1140 </Properties> 1141 1142 <Layout> 1143 <DimensionLayout dim="0"> 1144 <Group type="103" groupAlignment="0" attributes="0"> 1145 <EmptySpace min="0" pref="605" max="32767" attributes="0"/> 1146 </Group> 1147 </DimensionLayout> 1148 <DimensionLayout dim="1"> 1149 <Group type="103" groupAlignment="0" attributes="0"> 1150 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1151 </Group> 1152 </DimensionLayout> 1153 </Layout> 1154 </Container> 1155 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel6"> 1156 <Properties> 1157 <Property name="opaque" type="boolean" value="false"/> 1158 </Properties> 1159 1160 <Layout> 1161 <DimensionLayout dim="0"> 1162 <Group type="103" groupAlignment="0" attributes="0"> 1163 <EmptySpace min="0" pref="605" max="32767" attributes="0"/> 1164 </Group> 1165 </DimensionLayout> 1166 <DimensionLayout dim="1"> 1167 <Group type="103" groupAlignment="0" attributes="0"> 1168 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1169 </Group> 1170 </DimensionLayout> 1171 </Layout> 1172 </Container> 1173 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel5"> 1174 <Properties> 1175 <Property name="opaque" type="boolean" value="false"/> 1176 </Properties> 1177 1178 <Layout> 1179 <DimensionLayout dim="0"> 1180 <Group type="103" groupAlignment="0" attributes="0"> 1181 <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 1182 </Group> 1183 </DimensionLayout> 1184 <DimensionLayout dim="1"> 1185 <Group type="103" groupAlignment="0" attributes="0"> 1186 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1187 </Group> 1188 </DimensionLayout> 1189 </Layout> 1190 </Container> 1191 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel4"> 1192 <Properties> 1193 <Property name="opaque" type="boolean" value="false"/> 1194 </Properties> 1195 1196 <Layout> 1197 <DimensionLayout dim="0"> 1198 <Group type="103" groupAlignment="0" attributes="0"> 1199 <EmptySpace min="0" pref="617" max="32767" attributes="0"/> 1200 </Group> 1201 </DimensionLayout> 1202 <DimensionLayout dim="1"> 1203 <Group type="103" groupAlignment="0" attributes="0"> 1204 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1205 </Group> 1206 </DimensionLayout> 1207 </Layout> 1208 </Container> 1209 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel7"> 1210 <Properties> 1211 <Property name="opaque" type="boolean" value="false"/> 1212 </Properties> 1213 1214 <Layout> 1215 <DimensionLayout dim="0"> 1216 <Group type="103" groupAlignment="0" attributes="0"> 1217 <EmptySpace min="0" pref="6882" max="32767" attributes="0"/> 1218 </Group> 1219 </DimensionLayout> 1220 <DimensionLayout dim="1"> 1221 <Group type="103" groupAlignment="0" attributes="0"> 1222 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1223 </Group> 1224 </DimensionLayout> 1225 </Layout> 1226 </Container> 1227 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel10"> 1228 <Properties> 1229 <Property name="opaque" type="boolean" value="false"/> 1230 </Properties> 1231 1232 <Layout> 1233 <DimensionLayout dim="0"> 1234 <Group type="103" groupAlignment="0" attributes="0"> 1235 <EmptySpace min="0" pref="6573" max="32767" attributes="0"/> 1236 </Group> 1237 </DimensionLayout> 1238 <DimensionLayout dim="1"> 1239 <Group type="103" groupAlignment="0" attributes="0"> 1240 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1241 </Group> 1242 </DimensionLayout> 1243 </Layout> 1244 </Container> 1245 <Container class="scriptbuilder.gui.panels.ScriptBuilderTimelinePanel" name="incidentTimelinePanel9"> 1246 <Properties> 1247 <Property name="opaque" type="boolean" value="false"/> 1248 </Properties> 1249 1250 <Layout> 1251 <DimensionLayout dim="0"> 1252 <Group type="103" groupAlignment="0" attributes="0"> 1253 <EmptySpace min="0" pref="6470" max="32767" attributes="0"/> 1254 </Group> 1255 </DimensionLayout> 1256 <DimensionLayout dim="1"> 1257 <Group type="103" groupAlignment="0" attributes="0"> 1258 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 584 <EmptySpace min="0" pref="334" max="32767" attributes="0"/> 1259 585 </Group> 1260 586 </DimensionLayout> … … 1274 600 <DimensionLayout dim="1"> 1275 601 <Group type="103" groupAlignment="0" attributes="0"> 1276 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1277 </Group> 1278 </DimensionLayout> 1279 </Layout> 1280 </Container> 1281 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel2"> 1282 <Properties> 1283 <Property name="opaque" type="boolean" value="false"/> 1284 </Properties> 1285 1286 <Layout> 1287 <DimensionLayout dim="0"> 1288 <Group type="103" groupAlignment="0" attributes="0"> 1289 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1290 </Group> 1291 </DimensionLayout> 1292 <DimensionLayout dim="1"> 1293 <Group type="103" groupAlignment="0" attributes="0"> 1294 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1295 </Group> 1296 </DimensionLayout> 1297 </Layout> 1298 </Container> 1299 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel3"> 1300 <Properties> 1301 <Property name="opaque" type="boolean" value="false"/> 1302 </Properties> 1303 1304 <Layout> 1305 <DimensionLayout dim="0"> 1306 <Group type="103" groupAlignment="0" attributes="0"> 1307 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1308 </Group> 1309 </DimensionLayout> 1310 <DimensionLayout dim="1"> 1311 <Group type="103" groupAlignment="0" attributes="0"> 1312 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1313 </Group> 1314 </DimensionLayout> 1315 </Layout> 1316 </Container> 1317 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel4"> 1318 <Properties> 1319 <Property name="opaque" type="boolean" value="false"/> 1320 </Properties> 1321 1322 <Layout> 1323 <DimensionLayout dim="0"> 1324 <Group type="103" groupAlignment="0" attributes="0"> 1325 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1326 </Group> 1327 </DimensionLayout> 1328 <DimensionLayout dim="1"> 1329 <Group type="103" groupAlignment="0" attributes="0"> 1330 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1331 </Group> 1332 </DimensionLayout> 1333 </Layout> 1334 </Container> 1335 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel5"> 1336 <Properties> 1337 <Property name="opaque" type="boolean" value="false"/> 1338 </Properties> 1339 1340 <Layout> 1341 <DimensionLayout dim="0"> 1342 <Group type="103" groupAlignment="0" attributes="0"> 1343 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1344 </Group> 1345 </DimensionLayout> 1346 <DimensionLayout dim="1"> 1347 <Group type="103" groupAlignment="0" attributes="0"> 1348 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1349 </Group> 1350 </DimensionLayout> 1351 </Layout> 1352 </Container> 1353 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel6"> 1354 <Properties> 1355 <Property name="opaque" type="boolean" value="false"/> 1356 </Properties> 1357 1358 <Layout> 1359 <DimensionLayout dim="0"> 1360 <Group type="103" groupAlignment="0" attributes="0"> 1361 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1362 </Group> 1363 </DimensionLayout> 1364 <DimensionLayout dim="1"> 1365 <Group type="103" groupAlignment="0" attributes="0"> 1366 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1367 </Group> 1368 </DimensionLayout> 1369 </Layout> 1370 </Container> 1371 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel7"> 1372 <Properties> 1373 <Property name="opaque" type="boolean" value="false"/> 1374 </Properties> 1375 1376 <Layout> 1377 <DimensionLayout dim="0"> 1378 <Group type="103" groupAlignment="0" attributes="0"> 1379 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1380 </Group> 1381 </DimensionLayout> 1382 <DimensionLayout dim="1"> 1383 <Group type="103" groupAlignment="0" attributes="0"> 1384 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1385 </Group> 1386 </DimensionLayout> 1387 </Layout> 1388 </Container> 1389 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel8"> 1390 <Properties> 1391 <Property name="opaque" type="boolean" value="false"/> 1392 </Properties> 1393 1394 <Layout> 1395 <DimensionLayout dim="0"> 1396 <Group type="103" groupAlignment="0" attributes="0"> 1397 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1398 </Group> 1399 </DimensionLayout> 1400 <DimensionLayout dim="1"> 1401 <Group type="103" groupAlignment="0" attributes="0"> 1402 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1403 </Group> 1404 </DimensionLayout> 1405 </Layout> 1406 </Container> 1407 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel9"> 1408 <Properties> 1409 <Property name="opaque" type="boolean" value="false"/> 1410 </Properties> 1411 1412 <Layout> 1413 <DimensionLayout dim="0"> 1414 <Group type="103" groupAlignment="0" attributes="0"> 1415 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1416 </Group> 1417 </DimensionLayout> 1418 <DimensionLayout dim="1"> 1419 <Group type="103" groupAlignment="0" attributes="0"> 1420 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1421 </Group> 1422 </DimensionLayout> 1423 </Layout> 1424 </Container> 1425 <Container class="scriptbuilder.gui.panels.ScriptBuilderNumberPanel" name="incidentNumberPanel10"> 1426 <Properties> 1427 <Property name="opaque" type="boolean" value="false"/> 1428 </Properties> 1429 1430 <Layout> 1431 <DimensionLayout dim="0"> 1432 <Group type="103" groupAlignment="0" attributes="0"> 1433 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 1434 </Group> 1435 </DimensionLayout> 1436 <DimensionLayout dim="1"> 1437 <Group type="103" groupAlignment="0" attributes="0"> 1438 <EmptySpace min="0" pref="100" max="32767" attributes="0"/> 602 <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 1439 603 </Group> 1440 604 </DimensionLayout> -
trunk/src/scriptbuilder/gui/IncidentEditorFrame.java
r53 r54 47 47 public class IncidentEditorFrame extends javax.swing.JFrame implements Observer 48 48 { 49 50 /** 51 * The script model. 52 */ 53 private SimulationScript script; 49 50 /** 51 * The script incident currently being edited. 52 */ 53 private ScriptIncident theIncident; 54 54 55 /** 55 56 * The current type of selected event. … … 74 75 * @return the script model object 75 76 */ 76 public S imulationScript getScript()77 public ScriptIncident getIncident() 77 78 { 78 return script;79 return theIncident; 79 80 } 80 81 … … 247 248 * for all buttons. 248 249 */ 249 public IncidentEditorFrame( )250 public IncidentEditorFrame(ScriptIncident theIncident) 250 251 { 251 script = new SimulationScript(); 252 script.addObserver(this); 252 this.theIncident = theIncident; 253 253 initComponents(); 254 this.update(null, script);254 this.update(null, theIncident); 255 255 selectButton.addKeyListener(new TimelineKeyListener()); 256 256 cadButton.addKeyListener(new TimelineKeyListener()); … … 315 315 public void update(Observable o, Object arg) 316 316 { 317 if (arg instanceof SimulationScript) 318 { 319 script = (SimulationScript) arg; 320 321 if (script.incidents.size() != 10) 322 { 323 return; 324 } 325 326 timelineTickPanel.update(script); 327 timeStampPanel.update(script); 328 329 incidentTimelinePanel1.timelinePanelUpdate(script.incidents.get(0)); 330 incidentTimelinePanel2.timelinePanelUpdate(script.incidents.get(1)); 331 incidentTimelinePanel3.timelinePanelUpdate(script.incidents.get(2)); 332 incidentTimelinePanel4.timelinePanelUpdate(script.incidents.get(3)); 333 incidentTimelinePanel5.timelinePanelUpdate(script.incidents.get(4)); 334 incidentTimelinePanel6.timelinePanelUpdate(script.incidents.get(5)); 335 incidentTimelinePanel7.timelinePanelUpdate(script.incidents.get(6)); 336 incidentTimelinePanel8.timelinePanelUpdate(script.incidents.get(7)); 337 incidentTimelinePanel9.timelinePanelUpdate(script.incidents.get(8)); 338 incidentTimelinePanel10.timelinePanelUpdate(script.incidents.get(9)); 339 340 incidentNumberPanel1.update(script.incidents.get(0)); 341 incidentNumberPanel2.update(script.incidents.get(1)); 342 incidentNumberPanel3.update(script.incidents.get(2)); 343 incidentNumberPanel4.update(script.incidents.get(3)); 344 incidentNumberPanel5.update(script.incidents.get(4)); 345 incidentNumberPanel6.update(script.incidents.get(5)); 346 incidentNumberPanel7.update(script.incidents.get(6)); 347 incidentNumberPanel8.update(script.incidents.get(7)); 348 incidentNumberPanel9.update(script.incidents.get(8)); 349 incidentNumberPanel10.update(script.incidents.get(9)); 317 if (arg instanceof ScriptIncident) 318 { 319 theIncident = (ScriptIncident) arg; 320 321 timelineTickPanel.update(theIncident); 322 timeStampPanel.update(theIncident); 323 324 incidentTimelinePanel1.timelinePanelUpdate(theIncident); 325 326 incidentNumberPanel1.update(theIncident); 350 327 351 328 /** … … 390 367 { 391 368 392 incidentPopupMenu = new javax.swing.JPopupMenu();393 popupDeleteIncident = new javax.swing.JMenuItem();394 369 eventPopupMenu = new javax.swing.JPopupMenu(); 395 370 cadEvent = new javax.swing.JMenuItem(); … … 412 387 editEventList = new javax.swing.JMenuItem(); 413 388 deleteEventList = new javax.swing.JMenuItem(); 414 incidentFrame = new javax.swing.JFrame();415 jLabel6 = new javax.swing.JLabel();416 jLabel8 = new javax.swing.JLabel();417 jLabel9 = new javax.swing.JLabel();418 jLabel10 = new javax.swing.JLabel();419 jScrollPane1 = new javax.swing.JScrollPane();420 addIncidentDescription = new javax.swing.JTextArea();421 incidentOkButton = new javax.swing.JButton();422 incidentCancelButton = new javax.swing.JButton();423 addIncidentNumber = new javax.swing.JSpinner();424 addIncidentName = new javax.swing.JTextField();425 jLabel11 = new javax.swing.JLabel();426 addIncidentLength = new javax.swing.JSpinner();427 jLabel12 = new javax.swing.JLabel();428 addIncidentStart = new javax.swing.JSpinner();429 jButton3 = new javax.swing.JButton();430 incidentColorField = new javax.swing.JTextField();431 389 addNoiseFrame = new javax.swing.JFrame(); 432 390 jLabel13 = new javax.swing.JLabel(); … … 445 403 jLabel20 = new javax.swing.JLabel(); 446 404 jLabel21 = new javax.swing.JLabel(); 447 incidentColorChooser = new javax.swing.JColorChooser();448 405 timelinesScrollPane = new javax.swing.JScrollPane(); 449 406 timelineTickPanel = new scriptbuilder.gui.panels.TimelineTickPanel(); 450 407 incidentTimelinePanel1 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel(); 451 incidentTimelinePanel2 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();452 incidentTimelinePanel8 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();453 incidentTimelinePanel3 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();454 incidentTimelinePanel6 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();455 incidentTimelinePanel5 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();456 incidentTimelinePanel4 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();457 incidentTimelinePanel7 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();458 incidentTimelinePanel10 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();459 incidentTimelinePanel9 = new scriptbuilder.gui.panels.ScriptBuilderTimelinePanel();460 408 incidentNumberPanel1 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel(); 461 incidentNumberPanel2 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();462 incidentNumberPanel3 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();463 incidentNumberPanel4 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();464 incidentNumberPanel5 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();465 incidentNumberPanel6 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();466 incidentNumberPanel7 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();467 incidentNumberPanel8 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();468 incidentNumberPanel9 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();469 incidentNumberPanel10 = new scriptbuilder.gui.panels.ScriptBuilderNumberPanel();470 409 scriptEventsPanel = new javax.swing.JPanel(); 471 410 scriptEventsPane = new javax.swing.JScrollPane(); … … 504 443 timeStampScrollPane = new javax.swing.JScrollPane(); 505 444 timeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel(); 506 scriptBuilderMenuBar = new javax.swing.JMenuBar();507 fileMenu = new javax.swing.JMenu();508 fileNew = new javax.swing.JMenuItem();509 jSeparator1 = new javax.swing.JPopupMenu.Separator();510 fileOpen = new javax.swing.JMenuItem();511 jSeparator2 = new javax.swing.JPopupMenu.Separator();512 fileSave = new javax.swing.JMenuItem();513 fileSaveAs = new javax.swing.JMenuItem();514 generateMenu = new javax.swing.JMenu();515 generateNotebooks = new javax.swing.JMenuItem();516 jMenuItem3 = new javax.swing.JMenuItem();517 generateScorecards = new javax.swing.JMenuItem();518 generateOrganizationChart = new javax.swing.JMenuItem();519 jSeparator3 = new javax.swing.JPopupMenu.Separator();520 generateProjectRequirements = new javax.swing.JMenuItem();521 incidentMenu = new javax.swing.JMenu();522 newIncident = new javax.swing.JMenuItem();523 editIncident = new javax.swing.JMenuItem();524 jSeparator4 = new javax.swing.JPopupMenu.Separator();525 saveIncident = new javax.swing.JMenuItem();526 loadIncident = new javax.swing.JMenuItem();527 generateNoiseMenu = new javax.swing.JMenu();528 generateNoiseOption = new javax.swing.JMenuItem();529 helpMenu = new javax.swing.JMenu();530 helpTutorial = new javax.swing.JMenuItem();531 helpAbout = new javax.swing.JMenuItem();532 533 popupDeleteIncident.setText("Delete Incident...");534 incidentPopupMenu.add(popupDeleteIncident);535 445 536 446 cadEvent.setText("CAD Event"); … … 675 585 deleteEventList.setText("Delete..."); 676 586 eventListPopupMenu.add(deleteEventList); 677 678 incidentFrame.setTitle("Incident");679 incidentFrame.setMinimumSize(new java.awt.Dimension(400, 400));680 681 jLabel6.setText("Incident Number: ");682 683 jLabel8.setText("Incident Name:");684 685 jLabel9.setText("Incident Color: ");686 687 jLabel10.setText("Incident Description:");688 689 jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);690 jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);691 692 addIncidentDescription.setColumns(20);693 addIncidentDescription.setLineWrap(true);694 addIncidentDescription.setRows(5);695 addIncidentDescription.setWrapStyleWord(true);696 jScrollPane1.setViewportView(addIncidentDescription);697 698 incidentOkButton.setText("OK");699 incidentOkButton.addActionListener(new java.awt.event.ActionListener()700 {701 public void actionPerformed(java.awt.event.ActionEvent evt)702 {703 incidentOkButtonActionPerformed(evt);704 }705 });706 707 incidentCancelButton.setText("Cancel");708 incidentCancelButton.addActionListener(new java.awt.event.ActionListener()709 {710 public void actionPerformed(java.awt.event.ActionEvent evt)711 {712 incidentCancelButtonActionPerformed(evt);713 }714 });715 716 addIncidentNumber.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(101), Integer.valueOf(101), null, Integer.valueOf(1)));717 718 jLabel11.setText("Incident Length in Minutes: ");719 720 addIncidentLength.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));721 722 jLabel12.setText("Incident Start Time in Minutes:");723 724 addIncidentStart.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));725 726 jButton3.setText("Choose...");727 jButton3.addActionListener(new java.awt.event.ActionListener()728 {729 public void actionPerformed(java.awt.event.ActionEvent evt)730 {731 jButton3ActionPerformed(evt);732 }733 });734 735 incidentColorField.setEditable(false);736 incidentColorField.setBackground(new java.awt.Color(0, 0, 0));737 738 javax.swing.GroupLayout incidentFrameLayout = new javax.swing.GroupLayout(incidentFrame.getContentPane());739 incidentFrame.getContentPane().setLayout(incidentFrameLayout);740 incidentFrameLayout.setHorizontalGroup(741 incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)742 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentFrameLayout.createSequentialGroup()743 .addContainerGap()744 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)745 .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 322, Short.MAX_VALUE)746 .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING)747 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()748 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)749 .addComponent(jLabel6)750 .addComponent(jLabel8)751 .addComponent(jLabel9))752 .addGap(18, 18, 18)753 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)754 .addComponent(addIncidentName, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)755 .addComponent(addIncidentNumber, javax.swing.GroupLayout.DEFAULT_SIZE, 218, Short.MAX_VALUE)756 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, incidentFrameLayout.createSequentialGroup()757 .addComponent(incidentColorField, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)758 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)759 .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))))760 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()761 .addComponent(incidentCancelButton)762 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 188, Short.MAX_VALUE)763 .addComponent(incidentOkButton, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))764 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, incidentFrameLayout.createSequentialGroup()765 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)766 .addComponent(jLabel12)767 .addComponent(jLabel11))768 .addGap(18, 18, 18)769 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)770 .addComponent(addIncidentStart, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)771 .addComponent(addIncidentLength, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE))))772 .addContainerGap())773 );774 incidentFrameLayout.setVerticalGroup(775 incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)776 .addGroup(incidentFrameLayout.createSequentialGroup()777 .addContainerGap()778 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)779 .addComponent(jLabel6)780 .addComponent(addIncidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))781 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)782 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)783 .addComponent(jLabel8)784 .addComponent(addIncidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))785 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)786 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)787 .addComponent(jLabel9)788 .addComponent(jButton3)789 .addComponent(incidentColorField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))790 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)791 .addComponent(jLabel10)792 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)793 .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 106, Short.MAX_VALUE)794 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)795 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)796 .addComponent(addIncidentStart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)797 .addComponent(jLabel12))798 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)799 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)800 .addComponent(addIncidentLength, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)801 .addComponent(jLabel11))802 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)803 .addGroup(incidentFrameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)804 .addComponent(incidentCancelButton)805 .addComponent(incidentOkButton))806 .addContainerGap())807 );808 587 809 588 addNoiseFrame.setTitle("Generate Noise"); … … 954 733 incidentTimelinePanel1Layout.setHorizontalGroup( 955 734 incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 956 .addGap(0, 677 8, Short.MAX_VALUE)735 .addGap(0, 6776, Short.MAX_VALUE) 957 736 ); 958 737 incidentTimelinePanel1Layout.setVerticalGroup( 959 738 incidentTimelinePanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 960 .addGap(0, 100, Short.MAX_VALUE) 961 ); 962 963 incidentTimelinePanel2.setOpaque(false); 964 965 javax.swing.GroupLayout incidentTimelinePanel2Layout = new javax.swing.GroupLayout(incidentTimelinePanel2); 966 incidentTimelinePanel2.setLayout(incidentTimelinePanel2Layout); 967 incidentTimelinePanel2Layout.setHorizontalGroup( 968 incidentTimelinePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 969 .addGap(0, 6726, Short.MAX_VALUE) 970 ); 971 incidentTimelinePanel2Layout.setVerticalGroup( 972 incidentTimelinePanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 973 .addGap(0, 100, Short.MAX_VALUE) 974 ); 975 976 incidentTimelinePanel8.setOpaque(false); 977 978 javax.swing.GroupLayout incidentTimelinePanel8Layout = new javax.swing.GroupLayout(incidentTimelinePanel8); 979 incidentTimelinePanel8.setLayout(incidentTimelinePanel8Layout); 980 incidentTimelinePanel8Layout.setHorizontalGroup( 981 incidentTimelinePanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 982 .addGap(0, 5686, Short.MAX_VALUE) 983 ); 984 incidentTimelinePanel8Layout.setVerticalGroup( 985 incidentTimelinePanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 986 .addGap(0, 100, Short.MAX_VALUE) 987 ); 988 989 incidentTimelinePanel3.setOpaque(false); 990 991 javax.swing.GroupLayout incidentTimelinePanel3Layout = new javax.swing.GroupLayout(incidentTimelinePanel3); 992 incidentTimelinePanel3.setLayout(incidentTimelinePanel3Layout); 993 incidentTimelinePanel3Layout.setHorizontalGroup( 994 incidentTimelinePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 995 .addGap(0, 605, Short.MAX_VALUE) 996 ); 997 incidentTimelinePanel3Layout.setVerticalGroup( 998 incidentTimelinePanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 999 .addGap(0, 100, Short.MAX_VALUE) 1000 ); 1001 1002 incidentTimelinePanel6.setOpaque(false); 1003 1004 javax.swing.GroupLayout incidentTimelinePanel6Layout = new javax.swing.GroupLayout(incidentTimelinePanel6); 1005 incidentTimelinePanel6.setLayout(incidentTimelinePanel6Layout); 1006 incidentTimelinePanel6Layout.setHorizontalGroup( 1007 incidentTimelinePanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1008 .addGap(0, 605, Short.MAX_VALUE) 1009 ); 1010 incidentTimelinePanel6Layout.setVerticalGroup( 1011 incidentTimelinePanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1012 .addGap(0, 100, Short.MAX_VALUE) 1013 ); 1014 1015 incidentTimelinePanel5.setOpaque(false); 1016 1017 javax.swing.GroupLayout incidentTimelinePanel5Layout = new javax.swing.GroupLayout(incidentTimelinePanel5); 1018 incidentTimelinePanel5.setLayout(incidentTimelinePanel5Layout); 1019 incidentTimelinePanel5Layout.setHorizontalGroup( 1020 incidentTimelinePanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1021 .addGap(0, 0, Short.MAX_VALUE) 1022 ); 1023 incidentTimelinePanel5Layout.setVerticalGroup( 1024 incidentTimelinePanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1025 .addGap(0, 100, Short.MAX_VALUE) 1026 ); 1027 1028 incidentTimelinePanel4.setOpaque(false); 1029 1030 javax.swing.GroupLayout incidentTimelinePanel4Layout = new javax.swing.GroupLayout(incidentTimelinePanel4); 1031 incidentTimelinePanel4.setLayout(incidentTimelinePanel4Layout); 1032 incidentTimelinePanel4Layout.setHorizontalGroup( 1033 incidentTimelinePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1034 .addGap(0, 617, Short.MAX_VALUE) 1035 ); 1036 incidentTimelinePanel4Layout.setVerticalGroup( 1037 incidentTimelinePanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1038 .addGap(0, 100, Short.MAX_VALUE) 1039 ); 1040 1041 incidentTimelinePanel7.setOpaque(false); 1042 1043 javax.swing.GroupLayout incidentTimelinePanel7Layout = new javax.swing.GroupLayout(incidentTimelinePanel7); 1044 incidentTimelinePanel7.setLayout(incidentTimelinePanel7Layout); 1045 incidentTimelinePanel7Layout.setHorizontalGroup( 1046 incidentTimelinePanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1047 .addGap(0, 6882, Short.MAX_VALUE) 1048 ); 1049 incidentTimelinePanel7Layout.setVerticalGroup( 1050 incidentTimelinePanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1051 .addGap(0, 100, Short.MAX_VALUE) 1052 ); 1053 1054 incidentTimelinePanel10.setOpaque(false); 1055 1056 javax.swing.GroupLayout incidentTimelinePanel10Layout = new javax.swing.GroupLayout(incidentTimelinePanel10); 1057 incidentTimelinePanel10.setLayout(incidentTimelinePanel10Layout); 1058 incidentTimelinePanel10Layout.setHorizontalGroup( 1059 incidentTimelinePanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1060 .addGap(0, 6573, Short.MAX_VALUE) 1061 ); 1062 incidentTimelinePanel10Layout.setVerticalGroup( 1063 incidentTimelinePanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1064 .addGap(0, 100, Short.MAX_VALUE) 1065 ); 1066 1067 incidentTimelinePanel9.setOpaque(false); 1068 1069 javax.swing.GroupLayout incidentTimelinePanel9Layout = new javax.swing.GroupLayout(incidentTimelinePanel9); 1070 incidentTimelinePanel9.setLayout(incidentTimelinePanel9Layout); 1071 incidentTimelinePanel9Layout.setHorizontalGroup( 1072 incidentTimelinePanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1073 .addGap(0, 6470, Short.MAX_VALUE) 1074 ); 1075 incidentTimelinePanel9Layout.setVerticalGroup( 1076 incidentTimelinePanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1077 .addGap(0, 100, Short.MAX_VALUE) 739 .addGap(0, 334, Short.MAX_VALUE) 1078 740 ); 1079 741 … … 1088 750 incidentNumberPanel1Layout.setVerticalGroup( 1089 751 incidentNumberPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1090 .addGap(0, 100, Short.MAX_VALUE) 1091 ); 1092 1093 incidentNumberPanel2.setOpaque(false); 1094 1095 javax.swing.GroupLayout incidentNumberPanel2Layout = new javax.swing.GroupLayout(incidentNumberPanel2); 1096 incidentNumberPanel2.setLayout(incidentNumberPanel2Layout); 1097 incidentNumberPanel2Layout.setHorizontalGroup( 1098 incidentNumberPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1099 .addGap(0, 100, Short.MAX_VALUE) 1100 ); 1101 incidentNumberPanel2Layout.setVerticalGroup( 1102 incidentNumberPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1103 .addGap(0, 100, Short.MAX_VALUE) 1104 ); 1105 1106 incidentNumberPanel3.setOpaque(false); 1107 1108 javax.swing.GroupLayout incidentNumberPanel3Layout = new javax.swing.GroupLayout(incidentNumberPanel3); 1109 incidentNumberPanel3.setLayout(incidentNumberPanel3Layout); 1110 incidentNumberPanel3Layout.setHorizontalGroup( 1111 incidentNumberPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1112 .addGap(0, 100, Short.MAX_VALUE) 1113 ); 1114 incidentNumberPanel3Layout.setVerticalGroup( 1115 incidentNumberPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1116 .addGap(0, 100, Short.MAX_VALUE) 1117 ); 1118 1119 incidentNumberPanel4.setOpaque(false); 1120 1121 javax.swing.GroupLayout incidentNumberPanel4Layout = new javax.swing.GroupLayout(incidentNumberPanel4); 1122 incidentNumberPanel4.setLayout(incidentNumberPanel4Layout); 1123 incidentNumberPanel4Layout.setHorizontalGroup( 1124 incidentNumberPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1125 .addGap(0, 100, Short.MAX_VALUE) 1126 ); 1127 incidentNumberPanel4Layout.setVerticalGroup( 1128 incidentNumberPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1129 .addGap(0, 100, Short.MAX_VALUE) 1130 ); 1131 1132 incidentNumberPanel5.setOpaque(false); 1133 1134 javax.swing.GroupLayout incidentNumberPanel5Layout = new javax.swing.GroupLayout(incidentNumberPanel5); 1135 incidentNumberPanel5.setLayout(incidentNumberPanel5Layout); 1136 incidentNumberPanel5Layout.setHorizontalGroup( 1137 incidentNumberPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1138 .addGap(0, 100, Short.MAX_VALUE) 1139 ); 1140 incidentNumberPanel5Layout.setVerticalGroup( 1141 incidentNumberPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1142 .addGap(0, 100, Short.MAX_VALUE) 1143 ); 1144 1145 incidentNumberPanel6.setOpaque(false); 1146 1147 javax.swing.GroupLayout incidentNumberPanel6Layout = new javax.swing.GroupLayout(incidentNumberPanel6); 1148 incidentNumberPanel6.setLayout(incidentNumberPanel6Layout); 1149 incidentNumberPanel6Layout.setHorizontalGroup( 1150 incidentNumberPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1151 .addGap(0, 100, Short.MAX_VALUE) 1152 ); 1153 incidentNumberPanel6Layout.setVerticalGroup( 1154 incidentNumberPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1155 .addGap(0, 100, Short.MAX_VALUE) 1156 ); 1157 1158 incidentNumberPanel7.setOpaque(false); 1159 1160 javax.swing.GroupLayout incidentNumberPanel7Layout = new javax.swing.GroupLayout(incidentNumberPanel7); 1161 incidentNumberPanel7.setLayout(incidentNumberPanel7Layout); 1162 incidentNumberPanel7Layout.setHorizontalGroup( 1163 incidentNumberPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1164 .addGap(0, 100, Short.MAX_VALUE) 1165 ); 1166 incidentNumberPanel7Layout.setVerticalGroup( 1167 incidentNumberPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1168 .addGap(0, 100, Short.MAX_VALUE) 1169 ); 1170 1171 incidentNumberPanel8.setOpaque(false); 1172 1173 javax.swing.GroupLayout incidentNumberPanel8Layout = new javax.swing.GroupLayout(incidentNumberPanel8); 1174 incidentNumberPanel8.setLayout(incidentNumberPanel8Layout); 1175 incidentNumberPanel8Layout.setHorizontalGroup( 1176 incidentNumberPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1177 .addGap(0, 100, Short.MAX_VALUE) 1178 ); 1179 incidentNumberPanel8Layout.setVerticalGroup( 1180 incidentNumberPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1181 .addGap(0, 100, Short.MAX_VALUE) 1182 ); 1183 1184 incidentNumberPanel9.setOpaque(false); 1185 1186 javax.swing.GroupLayout incidentNumberPanel9Layout = new javax.swing.GroupLayout(incidentNumberPanel9); 1187 incidentNumberPanel9.setLayout(incidentNumberPanel9Layout); 1188 incidentNumberPanel9Layout.setHorizontalGroup( 1189 incidentNumberPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1190 .addGap(0, 100, Short.MAX_VALUE) 1191 ); 1192 incidentNumberPanel9Layout.setVerticalGroup( 1193 incidentNumberPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1194 .addGap(0, 100, Short.MAX_VALUE) 1195 ); 1196 1197 incidentNumberPanel10.setOpaque(false); 1198 1199 javax.swing.GroupLayout incidentNumberPanel10Layout = new javax.swing.GroupLayout(incidentNumberPanel10); 1200 incidentNumberPanel10.setLayout(incidentNumberPanel10Layout); 1201 incidentNumberPanel10Layout.setHorizontalGroup( 1202 incidentNumberPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1203 .addGap(0, 100, Short.MAX_VALUE) 1204 ); 1205 incidentNumberPanel10Layout.setVerticalGroup( 1206 incidentNumberPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1207 .addGap(0, 100, Short.MAX_VALUE) 752 .addGap(0, 0, Short.MAX_VALUE) 1208 753 ); 1209 754 … … 1214 759 .addGroup(timelineTickPanelLayout.createSequentialGroup() 1215 760 .addContainerGap() 1216 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 1217 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1218 .addComponent(incidentNumberPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1219 .addComponent(incidentNumberPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1220 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1221 .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1222 .addComponent(incidentNumberPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1223 .addComponent(incidentNumberPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1224 .addComponent(incidentNumberPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1225 .addComponent(incidentNumberPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1226 .addComponent(incidentNumberPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1227 .addComponent(incidentNumberPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1228 .addComponent(incidentNumberPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1229 .addGap(10, 10, 10) 1230 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1231 .addComponent(incidentTimelinePanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 1232 .addComponent(incidentTimelinePanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1233 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 1234 .addComponent(incidentTimelinePanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 1235 .addComponent(incidentTimelinePanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1236 .addComponent(incidentTimelinePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1237 .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 6778, javax.swing.GroupLayout.PREFERRED_SIZE) 1238 .addComponent(incidentTimelinePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1239 .addComponent(incidentTimelinePanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1240 .addComponent(incidentTimelinePanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1241 .addComponent(incidentTimelinePanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1242 .addGap(190, 190, 190)) 761 .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 762 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 763 .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 6776, javax.swing.GroupLayout.PREFERRED_SIZE) 764 .addContainerGap(300, Short.MAX_VALUE)) 1243 765 ); 1244 766 timelineTickPanelLayout.setVerticalGroup( … … 1246 768 .addGroup(timelineTickPanelLayout.createSequentialGroup() 1247 769 .addContainerGap() 1248 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1249 .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1250 .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1251 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1252 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1253 .addGroup(timelineTickPanelLayout.createSequentialGroup() 1254 .addComponent(incidentNumberPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1255 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1256 .addComponent(incidentNumberPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1257 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1258 .addComponent(incidentNumberPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1259 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1260 .addComponent(incidentNumberPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1261 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1262 .addComponent(incidentNumberPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1263 .addGroup(timelineTickPanelLayout.createSequentialGroup() 1264 .addComponent(incidentTimelinePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1265 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1266 .addComponent(incidentTimelinePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1267 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1268 .addComponent(incidentTimelinePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1269 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1270 .addComponent(incidentTimelinePanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1271 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1272 .addComponent(incidentTimelinePanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 1273 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1274 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1275 .addComponent(incidentTimelinePanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1276 .addComponent(incidentNumberPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1277 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1278 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1279 .addGroup(timelineTickPanelLayout.createSequentialGroup() 1280 .addComponent(incidentTimelinePanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1281 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1282 .addComponent(incidentTimelinePanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1283 .addGroup(timelineTickPanelLayout.createSequentialGroup() 1284 .addComponent(incidentNumberPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1285 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1286 .addComponent(incidentNumberPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 1287 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 1288 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 1289 .addComponent(incidentNumberPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 1290 .addComponent(incidentTimelinePanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 1291 .addContainerGap(251, Short.MAX_VALUE)) 770 .addGroup(timelineTickPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 771 .addComponent(incidentTimelinePanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 334, Short.MAX_VALUE) 772 .addComponent(incidentNumberPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 773 .addContainerGap(977, Short.MAX_VALUE)) 1292 774 ); 1293 775 … … 1777 1259 timeStampScrollPane.setViewportView(timeStampPanel); 1778 1260 1779 fileMenu.setText("File");1780 fileMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));1781 fileMenu.addActionListener(new java.awt.event.ActionListener()1782 {1783 public void actionPerformed(java.awt.event.ActionEvent evt)1784 {1785 fileMenuActionPerformed(evt);1786 }1787 });1788 1789 fileNew.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));1790 fileNew.setText("New");1791 fileNew.addActionListener(new java.awt.event.ActionListener()1792 {1793 public void actionPerformed(java.awt.event.ActionEvent evt)1794 {1795 fileNewActionPerformed(evt);1796 }1797 });1798 fileMenu.add(fileNew);1799 fileMenu.add(jSeparator1);1800 1801 fileOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));1802 fileOpen.setText("Open...");1803 fileOpen.addActionListener(new java.awt.event.ActionListener()1804 {1805 public void actionPerformed(java.awt.event.ActionEvent evt)1806 {1807 fileOpenActionPerformed(evt);1808 }1809 });1810 fileMenu.add(fileOpen);1811 fileMenu.add(jSeparator2);1812 1813 fileSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));1814 fileSave.setText("Save");1815 fileSave.addActionListener(new java.awt.event.ActionListener()1816 {1817 public void actionPerformed(java.awt.event.ActionEvent evt)1818 {1819 fileSaveActionPerformed(evt);1820 }1821 });1822 fileMenu.add(fileSave);1823 1824 fileSaveAs.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));1825 fileSaveAs.setText("Save as...");1826 fileSaveAs.addActionListener(new java.awt.event.ActionListener()1827 {1828 public void actionPerformed(java.awt.event.ActionEvent evt)1829 {1830 fileSaveAsActionPerformed(evt);1831 }1832 });1833 fileMenu.add(fileSaveAs);1834 1835 scriptBuilderMenuBar.add(fileMenu);1836 1837 generateMenu.setLabel("Generate");1838 generateMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));1839 1840 generateNotebooks.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));1841 generateNotebooks.setText("Generate Notebooks...");1842 generateNotebooks.addActionListener(new java.awt.event.ActionListener()1843 {1844 public void actionPerformed(java.awt.event.ActionEvent evt)1845 {1846 generateNotebooksActionPerformed(evt);1847 }1848 });1849 generateMenu.add(generateNotebooks);1850 1851 jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_W, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));1852 jMenuItem3.setText("Generate Web Notebook...");1853 generateMenu.add(jMenuItem3);1854 1855 generateScorecards.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));1856 generateScorecards.setText("Generate Scorecards...");1857 generateScorecards.addActionListener(new java.awt.event.ActionListener()1858 {1859 public void actionPerformed(java.awt.event.ActionEvent evt)1860 {1861 generateScorecardsActionPerformed(evt);1862 }1863 });1864 generateMenu.add(generateScorecards);1865 1866 generateOrganizationChart.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));1867 generateOrganizationChart.setText("Generate D14 TMC Org Chart...");1868 generateOrganizationChart.addActionListener(new java.awt.event.ActionListener()1869 {1870 public void actionPerformed(java.awt.event.ActionEvent evt)1871 {1872 generateOrganizationChartActionPerformed(evt);1873 }1874 });1875 generateMenu.add(generateOrganizationChart);1876 generateMenu.add(jSeparator3);1877 1878 generateProjectRequirements.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));1879 generateProjectRequirements.setText("Generate Project Worklist...");1880 generateProjectRequirements.addActionListener(new java.awt.event.ActionListener()1881 {1882 public void actionPerformed(java.awt.event.ActionEvent evt)1883 {1884 generateProjectRequirementsActionPerformed(evt);1885 }1886 });1887 generateMenu.add(generateProjectRequirements);1888 1889 scriptBuilderMenuBar.add(generateMenu);1890 1891 incidentMenu.setText("Incidents");1892 incidentMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));1893 1894 newIncident.setText("New Incident...");1895 newIncident.addActionListener(new java.awt.event.ActionListener()1896 {1897 public void actionPerformed(java.awt.event.ActionEvent evt)1898 {1899 newIncidentActionPerformed(evt);1900 }1901 });1902 incidentMenu.add(newIncident);1903 1904 editIncident.setText("Edit Incident...");1905 editIncident.addActionListener(new java.awt.event.ActionListener()1906 {1907 public void actionPerformed(java.awt.event.ActionEvent evt)1908 {1909 editIncidentActionPerformed(evt);1910 }1911 });1912 incidentMenu.add(editIncident);1913 incidentMenu.add(jSeparator4);1914 1915 saveIncident.setText("Save Incident...");1916 saveIncident.addActionListener(new java.awt.event.ActionListener()1917 {1918 public void actionPerformed(java.awt.event.ActionEvent evt)1919 {1920 saveIncidentActionPerformed(evt);1921 }1922 });1923 incidentMenu.add(saveIncident);1924 1925 loadIncident.setText("Load Incident...");1926 loadIncident.addActionListener(new java.awt.event.ActionListener()1927 {1928 public void actionPerformed(java.awt.event.ActionEvent evt)1929 {1930 loadIncidentActionPerformed(evt);1931 }1932 });1933 incidentMenu.add(loadIncident);1934 1935 scriptBuilderMenuBar.add(incidentMenu);1936 1937 generateNoiseMenu.setText("Noise");1938 1939 generateNoiseOption.setText("Generate Noise...");1940 generateNoiseOption.addActionListener(new java.awt.event.ActionListener()1941 {1942 public void actionPerformed(java.awt.event.ActionEvent evt)1943 {1944 generateNoiseOptionActionPerformed(evt);1945 }1946 });1947 generateNoiseMenu.add(generateNoiseOption);1948 1949 scriptBuilderMenuBar.add(generateNoiseMenu);1950 1951 helpMenu.setText("Help");1952 helpMenu.setMargin(new java.awt.Insets(0, 10, 0, 10));1953 1954 helpTutorial.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));1955 helpTutorial.setText("Tutorial...");1956 helpMenu.add(helpTutorial);1957 1958 helpAbout.setText("About...");1959 helpAbout.addActionListener(new java.awt.event.ActionListener()1960 {1961 public void actionPerformed(java.awt.event.ActionEvent evt)1962 {1963 helpAboutActionPerformed(evt);1964 }1965 });1966 helpMenu.add(helpAbout);1967 1968 scriptBuilderMenuBar.add(helpMenu);1969 1970 setJMenuBar(scriptBuilderMenuBar);1971 1972 1261 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 1973 1262 getContentPane().setLayout(layout); … … 2023 1312 .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 2024 1313 .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 2025 .addContainerGap( ))1314 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 2026 1315 ); 2027 1316 … … 2036 1325 private void zoomSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_zoomSliderStateChanged 2037 1326 ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK = zoomSlider.getValue() * 2; 2038 this.update( script, script);1327 this.update(null, theIncident); 2039 1328 pack(); 2040 1329 repaint(); … … 2068 1357 2069 1358 /** 2070 * Executed when the "OK" button is pressed on the Incident editor. If2071 * incident is new, and is valid, adds it to the model and updates. If2072 * editing existing incident, verifies changes are valid and applies them.2073 * Then closes editor window.2074 *2075 * @param evt the button press event2076 */2077 private void incidentOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentOkButtonActionPerformed2078 if (!editingIncident)2079 {2080 boolean found = false;2081 int indx = 0;2082 for (ScriptIncident i : script.incidents)2083 {2084 if (i == null)2085 {2086 found = true;2087 break;2088 }2089 ++indx;2090 if (i.number == (Integer) addIncidentNumber.getValue())2091 {2092 JOptionPane.showMessageDialog(this, "Incident number already in use.",2093 "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);2094 incidentFrame.setVisible(true);2095 return;2096 }2097 }2098 if (!found)2099 {2100 JOptionPane.showMessageDialog(this, "Script already has the max number of incidents.",2101 "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);2102 incidentFrame.setVisible(true);2103 return;2104 }2105 2106 script.incidents.remove(indx);2107 SimulationScript.incidentColors[indx] = selectedColor;2108 script.incidents.add(indx,2109 new ScriptIncident(SimulationScript.incidentColors[indx],2110 (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),2111 script));2112 script.incidents.get(indx).length = (Integer) addIncidentLength.getValue() * 60;2113 script.incidents.get(indx).setOffset((Integer) addIncidentStart.getValue() * 60);2114 }2115 else2116 {2117 ScriptIncident backup = script.incidents.get(oldIncidentIndex);2118 script.incidents.remove(oldIncidentIndex);2119 script.incidents.add(oldIncidentIndex, null);2120 2121 for (ScriptIncident i : script.incidents)2122 {2123 if (i != null && i.number == (Integer) addIncidentNumber.getValue())2124 {2125 script.incidents.remove(oldIncidentIndex);2126 script.incidents.add(oldIncidentIndex, backup);2127 JOptionPane.showMessageDialog(this, "Incident number already in use.",2128 "Unable to Create Incident", JOptionPane.ERROR_MESSAGE);2129 incidentFrame.setVisible(true);2130 return;2131 }2132 }2133 2134 script.incidents.remove(oldIncidentIndex);2135 SimulationScript.incidentColors[oldIncidentIndex] = selectedColor;2136 script.incidents.add(oldIncidentIndex,2137 new ScriptIncident(SimulationScript.incidentColors[oldIncidentIndex],2138 (Integer) addIncidentNumber.getValue(), addIncidentName.getText(), addIncidentDescription.getText(),2139 script));2140 script.incidents.get(oldIncidentIndex).length = (Integer) addIncidentLength.getValue() * 60;2141 script.incidents.get(oldIncidentIndex).slices = backup.slices;2142 script.incidents.get(oldIncidentIndex).offset = backup.offset;2143 script.incidents.get(oldIncidentIndex).setOffset((Integer) addIncidentStart.getValue() * 60);2144 }2145 2146 incidentFrame.setVisible(false);2147 update(script,script);2148 repaint();2149 }//GEN-LAST:event_incidentOkButtonActionPerformed2150 2151 /**2152 * Closes editor window upon click of cancel button.2153 *2154 * @param evt the button press event2155 */2156 private void incidentCancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentCancelButtonActionPerformed2157 incidentFrame.setVisible(false);2158 }//GEN-LAST:event_incidentCancelButtonActionPerformed2159 2160 /**2161 * Opens incident editor window and preps for addition of new incident, upon2162 * click of "New Incident" menu option.2163 *2164 * @param evt the button press event2165 */2166 private void newIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newIncidentActionPerformed2167 editingIncident = false;2168 2169 addIncidentName.setText("");2170 addIncidentNumber.setValue(101);2171 addIncidentStart.setValue(0);2172 addIncidentLength.setValue(0);2173 incidentColorField.setBackground(Color.BLACK);2174 selectedColor = Color.BLACK;2175 addIncidentDescription.setText("");2176 2177 incidentFrame.setVisible(true);2178 }//GEN-LAST:event_newIncidentActionPerformed2179 2180 /**2181 1359 * Deselects new event type upon click of blank "select" button. 2182 1360 * … … 2237 1415 }//GEN-LAST:event_chpRadioButtonActionPerformed 2238 1416 2239 private void fileMenuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileMenuActionPerformed2240 }//GEN-LAST:event_fileMenuActionPerformed2241 2242 /**2243 * Upon click of "Open file" menu option, opens a window to load a new .sim2244 * file.2245 *2246 * @param evt the button press event2247 */2248 private void fileOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileOpenActionPerformed2249 JFileChooser fc = new JFileChooser();2250 2251 fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",2252 new String[]2253 {2254 "xml"2255 }));2256 if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION)2257 {2258 System.out.println(fc.getSelectedFile().getName());2259 script.loadScriptFromFile(fc.getSelectedFile());2260 script.saveFile = fc.getSelectedFile();2261 }2262 }//GEN-LAST:event_fileOpenActionPerformed2263 2264 /**2265 * Upon click of "Save as" menu option, opens a window to choose a .sim file2266 * to save this as.2267 *2268 * @param evt the button press event2269 */2270 private void fileSaveAsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveAsActionPerformed2271 JFileChooser fc = new JFileChooser();2272 2273 fc.setFileFilter(new ExtensionFileFilter("Simulation Script XML (.xml)",2274 new String[]2275 {2276 "xml"2277 }));2278 2279 if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)2280 {2281 script.saveScriptToFile(fc.getSelectedFile());2282 script.saveFile = fc.getSelectedFile();2283 }2284 }//GEN-LAST:event_fileSaveAsActionPerformed2285 2286 /**2287 * Upon click of "Save" menu option, opens a window to choose a .sim file to2288 * save this as.2289 *2290 * @param evt the button press event2291 */2292 private void fileSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fileSaveActionPerformed2293 if (script.saveFile == null)2294 {2295 fileSaveAsActionPerformed(evt);2296 }2297 else2298 {2299 script.saveScriptToFile(script.saveFile);2300 }2301 }//GEN-LAST:event_fileSaveActionPerformed2302 2303 /**2304 * Upon click of "Edit incident" menu option, brings up a dropdown menu of2305 * all existing incidents. Once an incident is selected, opens incident2306 * editor window with that event's details loaded.2307 *2308 * @param evt the button press event2309 */2310 private void editIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editIncidentActionPerformed2311 Object[] incidentList = script.incidents.toArray();2312 ScriptIncident i = (ScriptIncident) JOptionPane.showInputDialog(2313 this,2314 "Select Incident:",2315 "Edit Incident",2316 JOptionPane.PLAIN_MESSAGE,2317 null,2318 incidentList,2319 script.incidents.get(0));2320 2321 // If a valid incident was selected2322 if (i != null)2323 {2324 editingIncident = true;2325 oldIncidentIndex = script.incidents.indexOf(i);2326 2327 addIncidentName.setText(i.name);2328 addIncidentNumber.setValue(i.number);2329 addIncidentStart.setValue(i.offset / 60);2330 addIncidentLength.setValue(i.length / 60);2331 incidentColorField.setBackground(i.color);2332 selectedColor = i.color;2333 addIncidentDescription.setText(i.description);2334 2335 incidentFrame.setVisible(true);2336 }2337 }//GEN-LAST:event_editIncidentActionPerformed2338 2339 /**2340 * Brings up the noise generation screen upon click of the "Generate Noise"2341 * menu option.2342 *2343 * @param evt the button press event2344 */2345 private void generateNoiseOptionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNoiseOptionActionPerformed2346 addNoiseFrame.setVisible(true);2347 }//GEN-LAST:event_generateNoiseOptionActionPerformed2348 2349 1417 /** 2350 1418 * Hides the noise generation screen upon click of the "Cancel" button. … … 2370 1438 total /= 5; 2371 1439 2372 for (int i = 0; i < script.incidents.get(9).slices.size(); i++)2373 { 2374 script.incidents.get(9).slices.get(i).events.clear();1440 for (int i = 0; i < theIncident.slices.size(); i++) 1441 { 1442 theIncident.slices.get(i).events.clear(); 2375 1443 } 2376 1444 … … 2393 1461 } 2394 1462 2395 script.incidents.get(9).slices.get(s % (script.incidents.get(9).slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length]));1463 theIncident.slices.get(s % (theIncident.slices.size())).addEvent(ScriptEvent.factoryByType(eventTypes[e % eventTypes.length])); 2396 1464 } 2397 1465 2398 1466 addNoiseFrame.setVisible(false); 2399 1467 2400 update( script, script);1468 update(null, theIncident); 2401 1469 }//GEN-LAST:event_jButton2ActionPerformed 2402 2403 /**2404 * Allow the user to pick an incident from a dropdown, then save it to an2405 * XML file.2406 *2407 * @param evt the button press event2408 */2409 private void saveIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveIncidentActionPerformed2410 Object[] incidentList = script.incidents.toArray();2411 String input = "";2412 ScriptIncident inc = null;2413 Object result = JOptionPane.showInputDialog(2414 this,2415 "Select Incident:",2416 "Save Incident",2417 JOptionPane.PLAIN_MESSAGE,2418 null,2419 incidentList,2420 script.incidents.get(0));2421 2422 System.out.println("RESULT = " + result.toString());2423 2424 input = result.toString();2425 2426 System.out.println("INPUT = " + input);2427 2428 int i = 0;2429 for (ScriptIncident incident : script.incidents)2430 {2431 if (incident == null)2432 {2433 continue;2434 }2435 System.out.println((++i) + ": " + incident.toString());2436 if (incident.toString().equals(input))2437 {2438 inc = incident;2439 }2440 }2441 2442 if (inc == null)2443 {2444 System.out.println("DIDN'T FIND ANYTHING");2445 return;2446 }2447 2448 JFileChooser fc = new JFileChooser();2449 fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]2450 {2451 "xml"2452 }));2453 if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION)2454 {2455 inc.saveIncidentToFile(fc.getSelectedFile());2456 }2457 }//GEN-LAST:event_saveIncidentActionPerformed2458 2459 private void loadIncidentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loadIncidentActionPerformed2460 JFileChooser fc = new JFileChooser();2461 fc.setFileFilter(new ExtensionFileFilter("Script Incident (.xml)", new String[]2462 {2463 "xml"2464 }));2465 fc.showOpenDialog(this);2466 }//GEN-LAST:event_loadIncidentActionPerformed2467 2468 private void generateProjectRequirementsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateProjectRequirementsActionPerformed2469 JFileChooser fc = new JFileChooser();2470 fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]2471 {2472 "pdf"2473 }));2474 fc.setSelectedFile(new File("Requirements.pdf"));2475 fc.showSaveDialog(this);2476 }//GEN-LAST:event_generateProjectRequirementsActionPerformed2477 2478 private void generateNotebooksActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateNotebooksActionPerformed2479 JFileChooser fc = new JFileChooser();2480 fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]2481 {2482 "pdf"2483 }));2484 fc.setSelectedFile(new File("Notebooks.pdf"));2485 fc.showSaveDialog(this);2486 }//GEN-LAST:event_generateNotebooksActionPerformed2487 2488 private void generateScorecardsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateScorecardsActionPerformed2489 JFileChooser fc = new JFileChooser();2490 fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]2491 {2492 "pdf"2493 }));2494 fc.setSelectedFile(new File("Scorecards.pdf"));2495 fc.showSaveDialog(this);2496 }//GEN-LAST:event_generateScorecardsActionPerformed2497 2498 private void generateOrganizationChartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_generateOrganizationChartActionPerformed2499 JFileChooser fc = new JFileChooser();2500 fc.setFileFilter(new ExtensionFileFilter("Portable Document Format (.pdf)", new String[]2501 {2502 "pdf"2503 }));2504 fc.setSelectedFile(new File("OrganizationChart.pdf"));2505 fc.showSaveDialog(this);2506 }//GEN-LAST:event_generateOrganizationChartActionPerformed2507 1470 2508 1471 /** … … 2734 1697 }//GEN-LAST:event_zoomOutIconMouseClicked 2735 1698 private Color selectedColor = Color.BLACK; 2736 2737 private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed2738 Color newColor = incidentColorChooser.showDialog(this, "Incident Color", incidentColorField.getBackground());2739 if (newColor != null)2740 {2741 selectedColor = newColor;2742 incidentColorField.setBackground(newColor);2743 }2744 }//GEN-LAST:event_jButton3ActionPerformed2745 2746 /* Help > About simply displays the current SVN revision number so2747 * the user can determine which version of the source code was used to2748 * build the executable she is running.2749 */2750 private void helpAboutActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_helpAboutActionPerformed2751 {//GEN-HEADEREND:event_helpAboutActionPerformed2752 JOptionPane.showMessageDialog(rootPane, "Revision: " + getAppVersion(), "About", JOptionPane.INFORMATION_MESSAGE);2753 }//GEN-LAST:event_helpAboutActionPerformed2754 2755 private void fileNewActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_fileNewActionPerformed2756 {//GEN-HEADEREND:event_fileNewActionPerformed2757 System.out.println("NEW SCRIPT");2758 script = new SimulationScript();2759 script.update();2760 update(null, script);2761 repaint();2762 }//GEN-LAST:event_fileNewActionPerformed2763 1699 2764 1700 /** … … 2848 1784 // Variables declaration - do not modify//GEN-BEGIN:variables 2849 1785 private javax.swing.JButton activityLogEvalButton; 2850 private javax.swing.JTextArea addIncidentDescription;2851 private javax.swing.JSpinner addIncidentLength;2852 private javax.swing.JTextField addIncidentName;2853 private javax.swing.JSpinner addIncidentNumber;2854 private javax.swing.JSpinner addIncidentStart;2855 1786 private javax.swing.JFrame addNoiseFrame; 2856 1787 private javax.swing.JButton atmsEvalButton; … … 2866 1797 private javax.swing.JMenuItem deleteEventList; 2867 1798 private javax.swing.JMenuItem editEventList; 2868 private javax.swing.JMenuItem editIncident;2869 1799 private javax.swing.JPanel evaluationEventsPanel; 2870 1800 private javax.swing.JPopupMenu eventListPopupMenu; 2871 1801 private javax.swing.JPopupMenu eventPopupMenu; 2872 1802 private javax.swing.JButton facilitatorEvalButton; 2873 private javax.swing.JMenu fileMenu;2874 private javax.swing.JMenuItem fileNew;2875 private javax.swing.JMenuItem fileOpen;2876 private javax.swing.JMenuItem fileSave;2877 private javax.swing.JMenuItem fileSaveAs;2878 private javax.swing.JMenu generateMenu;2879 private javax.swing.JMenu generateNoiseMenu;2880 private javax.swing.JMenuItem generateNoiseOption;2881 private javax.swing.JMenuItem generateNotebooks;2882 private javax.swing.JMenuItem generateOrganizationChart;2883 private javax.swing.JMenuItem generateProjectRequirements;2884 private javax.swing.JMenuItem generateScorecards;2885 private javax.swing.JMenuItem helpAbout;2886 private javax.swing.JMenu helpMenu;2887 private javax.swing.JMenuItem helpTutorial;2888 private javax.swing.JButton incidentCancelButton;2889 private javax.swing.JColorChooser incidentColorChooser;2890 private javax.swing.JTextField incidentColorField;2891 1803 private javax.swing.JTextArea incidentDescription; 2892 1804 private javax.swing.JScrollPane incidentDescriptionPane; 2893 1805 private javax.swing.JPanel incidentEventsPanel; 2894 private javax.swing.JFrame incidentFrame;2895 private javax.swing.JMenu incidentMenu;2896 1806 private javax.swing.JTextField incidentName; 2897 1807 private javax.swing.JTextField incidentNumber; 2898 1808 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel1; 2899 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel10;2900 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel2;2901 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel3;2902 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel4;2903 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel5;2904 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel6;2905 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel7;2906 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel8;2907 private scriptbuilder.gui.panels.ScriptBuilderNumberPanel incidentNumberPanel9;2908 private javax.swing.JButton incidentOkButton;2909 private javax.swing.JPopupMenu incidentPopupMenu;2910 1809 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel1; 2911 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel10;2912 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel2;2913 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel3;2914 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel4;2915 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel5;2916 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel6;2917 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel7;2918 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel8;2919 private scriptbuilder.gui.panels.ScriptBuilderTimelinePanel incidentTimelinePanel9;2920 1810 private javax.swing.JButton jButton1; 2921 1811 private javax.swing.JButton jButton2; 2922 private javax.swing.JButton jButton3;2923 private javax.swing.JLabel jLabel10;2924 private javax.swing.JLabel jLabel11;2925 private javax.swing.JLabel jLabel12;2926 1812 private javax.swing.JLabel jLabel13; 2927 1813 private javax.swing.JLabel jLabel14; … … 2935 1821 private javax.swing.JLabel jLabel4; 2936 1822 private javax.swing.JLabel jLabel5; 2937 private javax.swing.JLabel jLabel6;2938 1823 private javax.swing.JLabel jLabel7; 2939 private javax.swing.JLabel jLabel8;2940 private javax.swing.JLabel jLabel9;2941 1824 private javax.swing.JMenuItem jMenuItem2; 2942 private javax.swing.JMenuItem jMenuItem3;2943 1825 private javax.swing.JMenuItem jMenuItem4; 2944 1826 private javax.swing.JMenuItem jMenuItem5; 2945 1827 private javax.swing.JMenuItem jMenuItem6; 2946 private javax.swing.JScrollPane jScrollPane1;2947 private javax.swing.JPopupMenu.Separator jSeparator1;2948 private javax.swing.JPopupMenu.Separator jSeparator2;2949 private javax.swing.JPopupMenu.Separator jSeparator3;2950 private javax.swing.JPopupMenu.Separator jSeparator4;2951 1828 private javax.swing.JSlider jSlider1; 2952 1829 private javax.swing.JSlider jSlider2; … … 2955 1832 private javax.swing.JSlider jSlider5; 2956 1833 private javax.swing.JTextArea jTextArea1; 2957 private javax.swing.JMenuItem loadIncident;2958 1834 private javax.swing.JButton maintenanceRadioButton; 2959 private javax.swing.JMenuItem newIncident;2960 1835 private javax.swing.JButton okButton; 2961 1836 private javax.swing.JButton paramicsButton; 2962 private javax.swing.JMenuItem popupDeleteIncident;2963 1837 private javax.swing.JButton radioEvalButton; 2964 1838 private javax.swing.JMenuItem radioEvent; … … 2968 1842 private javax.swing.JComboBox radioTypeComboBox; 2969 1843 private javax.swing.JLabel radioTypeLabel; 2970 private javax.swing.JMenuItem saveIncident;2971 private javax.swing.JMenuBar scriptBuilderMenuBar;2972 1844 private javax.swing.JList scriptEventsList; 2973 1845 private javax.swing.JScrollPane scriptEventsPane; -
trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java
r53 r54 2677 2677 private void editIncidentActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_editIncidentActionPerformed 2678 2678 {//GEN-HEADEREND:event_editIncidentActionPerformed 2679 new IncidentEditorFrame().setVisible(true); 2679 Object[] incidentList = script.incidents.toArray(); 2680 String input = ""; 2681 ScriptIncident inc = null; 2682 Object result = JOptionPane.showInputDialog( 2683 this, 2684 "Select Incident:", 2685 "Save Incident", 2686 JOptionPane.PLAIN_MESSAGE, 2687 null, 2688 incidentList, 2689 script.incidents.get(0)); 2690 2691 System.out.println("RESULT = " + result.toString()); 2692 2693 input = result.toString(); 2694 2695 System.out.println("INPUT = " + input); 2696 2697 int i = 0; 2698 for (ScriptIncident incident : script.incidents) 2699 { 2700 if (incident == null) 2701 { 2702 continue; 2703 } 2704 System.out.println((++i) + ": " + incident.toString()); 2705 if (incident.toString().equals(input)) 2706 { 2707 inc = incident; 2708 } 2709 } 2710 2711 if (inc != null) 2712 { 2713 new IncidentEditorFrame(inc).setVisible(true); 2714 } 2715 update(script, script); 2680 2716 }//GEN-LAST:event_editIncidentActionPerformed 2681 2717 -
trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java
r53 r54 11 11 import javax.swing.JPanel; 12 12 import javax.swing.event.MouseInputAdapter; 13 import scriptbuilder.gui.IncidentEditorFrame; 13 14 import scriptbuilder.gui.ScriptBuilderFrame; 14 15 import scriptbuilder.gui.ScriptBuilderGuiConstants; … … 100 101 { 101 102 Editor ed = new Editor(); 102 ScriptBuilderFrame f = (ScriptBuilderFrame) getTopLevelAncestor(); 103 ScriptBuilderFrame f = null; 104 IncidentEditorFrame g = null; 105 if (getTopLevelAncestor() instanceof ScriptBuilderFrame) 106 { 107 f = (ScriptBuilderFrame) getTopLevelAncestor(); 108 } 109 else if (getTopLevelAncestor() instanceof IncidentEditorFrame) 110 { 111 g = (IncidentEditorFrame) getTopLevelAncestor(); 112 } 103 113 104 114 x = cursorTime = e.getX(); … … 142 152 if (e.getButton() == MouseEvent.BUTTON1) 143 153 { 144 if (f.currentEventType != null) 145 { 146 I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType); 147 ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s); 148 if (incident.slices.get(newSlice) == null) 154 if (getTopLevelAncestor() instanceof ScriptBuilderFrame) 155 { 156 if (f.currentEventType != null) 149 157 { 150 incident.addNewEvent(s, newSlice); 158 I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType); 159 ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s); 160 if (incident.slices.get(newSlice) == null) 161 { 162 incident.addNewEvent(s, newSlice); 163 } 164 else 165 { 166 incident.slices.get(newSlice).addEvent(s); 167 } 168 f.update(f.getScript(), f.getScript()); 151 169 } 152 else 170 } 171 if (getTopLevelAncestor() instanceof IncidentEditorFrame) 172 { 173 if (g.currentEventType != null) 153 174 { 154 incident.slices.get(newSlice).addEvent(s); 175 I_ScriptEvent s = ScriptEvent.factoryByType(g.currentEventType); 176 ed.addProperty(eventTypeToPropertyMap.get(g.currentEventType), s); 177 if (incident.slices.get(newSlice) == null) 178 { 179 incident.addNewEvent(s, newSlice); 180 } 181 else 182 { 183 incident.slices.get(newSlice).addEvent(s); 184 } 185 g.update(null, g.getIncident()); 155 186 } 156 f.update(f.getScript(), f.getScript());157 187 } 158 188 } … … 294 324 295 325 Graphics2D g2d = (Graphics2D) g; 296 IncidentTimelineDrawer.DrawScriptBuilderTimeline(g2d, incident); 326 if (getTopLevelAncestor() instanceof ScriptBuilderFrame) 327 { 328 IncidentTimelineDrawer.DrawScriptBuilderTimeline(g2d, incident); 329 } 330 if (getTopLevelAncestor() instanceof IncidentEditorFrame) 331 { 332 IncidentTimelineDrawer.DrawIncidentTimeline(g2d, incident, false); 333 } 297 334 298 335 if (focused) 299 336 { 300 337 CursorDrawer.DrawCursor(g2d, cursorTime, false); 301 if (((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null) 302 { 303 EventIconDrawer.DrawEventIcon(g2d, 304 ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType, 305 x + 5, y + 10); 338 if (this.getTopLevelAncestor() instanceof ScriptBuilderFrame) 339 { 340 if (((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null) 341 { 342 EventIconDrawer.DrawEventIcon(g2d, 343 ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType, 344 x + 5, y + 10); 345 } 346 } 347 if (this.getTopLevelAncestor() instanceof IncidentEditorFrame) 348 { 349 if (((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType != null) 350 { 351 EventIconDrawer.DrawEventIcon(g2d, 352 ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType, 353 x + 5, y + 10); 354 } 306 355 } 307 356 } -
trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java
r1 r54 89 89 90 90 /** 91 * Update the length interval and the dimensions of the panel. NOTE: This 92 * method implementation is an exact duplication of the update method in 93 * panels.TimelineTickPanel. I'm not sure if it actually accomplishes 94 * anything here. 95 * 96 * @param script The simulation script model 97 */ 98 public void update(ScriptIncident incident) 99 { 100 longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH; 101 102 // Get the stats on the incidents 103 int height = ScriptBuilderGuiConstants.TICK_TOP_MARGIN * 4; 104 if (incident != null) 105 { 106 height += incident.collapsed 107 ? ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT 108 : ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT; 109 if ((incident.length + incident.offset) > longestLength) 110 { 111 longestLength = incident.length + incident.offset; 112 } 113 } 114 115 if (incident != null && incident.number == 100) 116 { 117 incident.length = longestLength; 118 incident.offset = 0; 119 } 120 121 Dimension newSize = new Dimension(longestLength 122 / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION 123 * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK 124 + ScriptBuilderGuiConstants.TICK_TIMELINE_LEFT_MARGIN + 50, 125 height); 126 this.setPreferredSize(newSize); 127 this.setSize(newSize); 128 129 this.invalidate(); 130 } 131 132 /** 91 133 * Refresh the panel. Draw the timestamps for the appropriate intervals 92 134 * based on zoom level. -
trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java
r31 r54 7 7 import javax.swing.JPanel; 8 8 import javax.swing.event.MouseInputAdapter; 9 import scriptbuilder.gui.IncidentEditorFrame; 9 10 import scriptbuilder.gui.ScriptBuilderFrame; 10 11 import scriptbuilder.gui.ScriptBuilderGuiConstants; … … 130 131 131 132 /** 133 * Update the panel's dimensions based on number of events, zoom level, and 134 * which events are collapsed. 135 * 136 * @param script The main script model 137 */ 138 public void update(ScriptIncident incident) 139 { 140 longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH; 141 142 // Get the stats on the incidents 143 int height = ScriptBuilderGuiConstants.TICK_TOP_MARGIN * 4; 144 145 if (incident != null) 146 { 147 height += incident.collapsed 148 ? ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT 149 : ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT; 150 if ((incident.length + incident.offset) > longestLength) 151 { 152 longestLength = incident.length + incident.offset; 153 } 154 155 } 156 157 Dimension newSize = new Dimension(longestLength 158 / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION 159 * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK 160 + ScriptBuilderGuiConstants.TICK_TIMELINE_LEFT_MARGIN + 50, 161 height); 162 this.setPreferredSize(newSize); 163 this.setSize(newSize); 164 165 this.invalidate(); 166 } 167 168 /** 132 169 * Refresh the panel. Redraw the ticks based on zoom level, panel 133 170 * dimensions, and offset. If the user is trying to add an event, draw that … … 182 219 paintChildren(g); 183 220 184 if (focused 185 && ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null) 186 { 187 EventIconDrawer.DrawEventIcon(g2d, 188 ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType, 189 x, y); 221 if (this.getTopLevelAncestor() instanceof ScriptBuilderFrame) 222 { 223 if (focused 224 && ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null) 225 { 226 EventIconDrawer.DrawEventIcon(g2d, 227 ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType, 228 x, y); 229 } 230 } 231 if (this.getTopLevelAncestor() instanceof IncidentEditorFrame) 232 { 233 if (focused 234 && ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType != null) 235 { 236 EventIconDrawer.DrawEventIcon(g2d, 237 ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType, 238 x, y); 239 } 190 240 } 191 241 }
Note: See TracChangeset
for help on using the changeset viewer.
