Changeset 118 in tmcsimulator-scriptbuilder


Ignore:
Timestamp:
09/07/2017 02:51:49 PM (9 years ago)
Author:
bmcguffin
Message:

Added a pair of radio buttons under the +15 button on IncidentEditorFrame? which can be toggled between. If "to start" is selected, then pressing the +15 button will add (up to) 15 minutes of screen space to the beginning of the incident. If "to end" is selected, then pressing the +15 button will add 15 minutes of screen space to the end of the incident. Selecting one button deselects the other.

Location:
trunk/src/scriptbuilder/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/IncidentEditorFrame.form

    r117 r118  
    453453                      <EmptySpace max="-2" attributes="0"/> 
    454454                      <Component id="evaluationEventsPanel" min="-2" max="-2" attributes="0"/> 
    455                       <EmptySpace type="separate" max="-2" attributes="0"/> 
     455                      <EmptySpace min="-2" max="-2" attributes="0"/> 
    456456                      <Group type="103" groupAlignment="0" attributes="0"> 
    457                           <Group type="102" alignment="0" attributes="0"> 
    458                               <Component id="zoomSlider" min="-2" pref="31" max="-2" attributes="0"/> 
    459                               <EmptySpace max="-2" attributes="0"/> 
    460                               <Component id="btnAddTime" max="32767" attributes="0"/> 
    461                           </Group> 
    462                           <Group type="102" attributes="0"> 
    463                               <Group type="103" groupAlignment="0" attributes="0"> 
    464                                   <Component id="zoomInIcon" min="-2" max="-2" attributes="0"/> 
    465                                   <Component id="zoomOutIcon" min="-2" max="-2" attributes="0"/> 
    466                               </Group> 
    467                               <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 
    468                           </Group> 
    469                       </Group> 
     457                          <Component id="zoomInIcon" alignment="0" min="-2" max="-2" attributes="0"/> 
     458                          <Component id="zoomOutIcon" alignment="0" min="-2" max="-2" attributes="0"/> 
     459                          <Component id="zoomSlider" alignment="0" min="-2" max="-2" attributes="0"/> 
     460                      </Group> 
     461                      <EmptySpace max="32767" attributes="0"/> 
     462                      <Component id="addTimePanel" min="-2" max="-2" attributes="0"/> 
    470463                  </Group> 
    471464                  <Component id="timelinesScrollPane" alignment="0" min="0" pref="0" max="32767" attributes="1"/> 
    472                   <Component id="timeStampScrollPane" alignment="0" max="32767" attributes="0"/> 
     465                  <Component id="timeStampScrollPane" alignment="0" pref="0" max="32767" attributes="0"/> 
    473466                  <Group type="102" alignment="1" attributes="0"> 
    474                       <Component id="scriptEventsPanel1" max="32767" attributes="0"/> 
     467                      <Component id="incidentInformationPanel" max="32767" attributes="0"/> 
    475468                      <EmptySpace max="-2" attributes="0"/> 
    476469                      <Component id="scriptEventsPanel" max="32767" attributes="0"/> 
    477470                  </Group> 
    478                   <Component id="timeStampScrollPane1" alignment="0" max="32767" attributes="0"/> 
     471                  <Component id="timeStampScrollPane1" alignment="0" pref="0" max="32767" attributes="0"/> 
    479472              </Group> 
    480473              <EmptySpace max="-2" attributes="0"/> 
     
    498491                  </Group> 
    499492                  <Group type="102" attributes="0"> 
     493                      <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> 
    500494                      <Group type="103" groupAlignment="0" max="-2" attributes="0"> 
    501495                          <Group type="102" attributes="0"> 
    502                               <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> 
    503496                              <Component id="zoomInIcon" min="-2" max="-2" attributes="0"/> 
    504                               <EmptySpace max="32767" attributes="0"/> 
     497                              <EmptySpace min="-2" max="-2" attributes="0"/> 
    505498                              <Component id="zoomSlider" min="-2" pref="69" max="-2" attributes="1"/> 
     499                              <EmptySpace max="-2" attributes="0"/> 
     500                              <Component id="zoomOutIcon" min="-2" max="-2" attributes="0"/> 
    506501                          </Group> 
    507                           <Group type="102" attributes="0"> 
    508                               <EmptySpace min="-2" pref="61" max="-2" attributes="0"/> 
    509                               <Component id="btnAddTime" min="-2" pref="44" max="-2" attributes="0"/> 
    510                           </Group> 
    511                       </Group> 
    512                       <EmptySpace max="32767" attributes="0"/> 
    513                       <Component id="zoomOutIcon" min="-2" max="-2" attributes="0"/> 
    514                   </Group> 
    515               </Group> 
    516               <EmptySpace max="-2" attributes="0"/> 
     502                          <Component id="addTimePanel" max="32767" attributes="0"/> 
     503                      </Group> 
     504                  </Group> 
     505              </Group> 
     506              <EmptySpace min="-2" max="-2" attributes="0"/> 
    517507              <Component id="timeStampScrollPane" min="-2" pref="20" max="-2" attributes="0"/> 
    518               <EmptySpace max="-2" attributes="0"/> 
     508              <EmptySpace min="-2" max="-2" attributes="0"/> 
    519509              <Component id="timeStampScrollPane1" min="-2" pref="20" max="-2" attributes="0"/> 
    520510              <EmptySpace min="-2" max="-2" attributes="0"/> 
     
    522512              <EmptySpace max="-2" attributes="0"/> 
    523513              <Group type="103" groupAlignment="0" attributes="0"> 
    524                   <Component id="scriptEventsPanel1" min="-2" max="-2" attributes="1"/> 
     514                  <Component id="incidentInformationPanel" min="-2" max="-2" attributes="1"/> 
    525515                  <Component id="scriptEventsPanel" min="-2" max="-2" attributes="1"/> 
    526516              </Group> 
     
    700690      </Events> 
    701691    </Component> 
    702     <Container class="javax.swing.JPanel" name="scriptEventsPanel1"> 
     692    <Container class="javax.swing.JPanel" name="incidentInformationPanel"> 
    703693      <Properties> 
    704694        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> 
     
    12941284            <DimensionLayout dim="0"> 
    12951285              <Group type="103" groupAlignment="0" attributes="0"> 
    1296                   <EmptySpace min="0" pref="1036" max="32767" attributes="0"/> 
     1286                  <EmptySpace min="0" pref="1088" max="32767" attributes="0"/> 
    12971287              </Group> 
    12981288            </DimensionLayout> 
     
    13061296      </SubComponents> 
    13071297    </Container> 
    1308     <Component class="javax.swing.JButton" name="btnAddTime"> 
    1309       <Properties> 
    1310         <Property name="text" type="java.lang.String" value="+15:00"/> 
    1311       </Properties> 
    1312       <Events> 
    1313         <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddTimeActionPerformed"/> 
    1314       </Events> 
    1315     </Component> 
    13161298    <Container class="javax.swing.JScrollPane" name="timeStampScrollPane1"> 
    13171299      <Properties> 
     
    13301312            <DimensionLayout dim="0"> 
    13311313              <Group type="103" groupAlignment="0" attributes="0"> 
    1332                   <EmptySpace min="0" pref="1036" max="32767" attributes="0"/> 
     1314                  <EmptySpace min="0" pref="1088" max="32767" attributes="0"/> 
    13331315              </Group> 
    13341316            </DimensionLayout> 
     
    13421324      </SubComponents> 
    13431325    </Container> 
     1326    <Container class="javax.swing.JPanel" name="addTimePanel"> 
     1327 
     1328      <Layout> 
     1329        <DimensionLayout dim="0"> 
     1330          <Group type="103" groupAlignment="0" attributes="0"> 
     1331              <Component id="btnAddTime" pref="0" max="32767" attributes="0"/> 
     1332              <Group type="102" attributes="0"> 
     1333                  <Group type="103" groupAlignment="0" attributes="0"> 
     1334                      <Component id="btnToggleTimeStart" min="-2" max="-2" attributes="0"/> 
     1335                      <Component id="btnToggleTimeEnd" alignment="0" min="-2" max="-2" attributes="0"/> 
     1336                  </Group> 
     1337                  <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 
     1338              </Group> 
     1339          </Group> 
     1340        </DimensionLayout> 
     1341        <DimensionLayout dim="1"> 
     1342          <Group type="103" groupAlignment="0" attributes="0"> 
     1343              <Group type="102" alignment="0" attributes="0"> 
     1344                  <Component id="btnAddTime" min="-2" pref="44" max="-2" attributes="0"/> 
     1345                  <EmptySpace max="-2" attributes="0"/> 
     1346                  <Component id="btnToggleTimeStart" min="-2" max="-2" attributes="0"/> 
     1347                  <EmptySpace max="-2" attributes="0"/> 
     1348                  <Component id="btnToggleTimeEnd" min="-2" max="-2" attributes="0"/> 
     1349                  <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 
     1350              </Group> 
     1351          </Group> 
     1352        </DimensionLayout> 
     1353      </Layout> 
     1354      <SubComponents> 
     1355        <Component class="javax.swing.JButton" name="btnAddTime"> 
     1356          <Properties> 
     1357            <Property name="text" type="java.lang.String" value="+15:00"/> 
     1358          </Properties> 
     1359          <Events> 
     1360            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddTimeActionPerformed"/> 
     1361          </Events> 
     1362        </Component> 
     1363        <Component class="javax.swing.JRadioButton" name="btnToggleTimeStart"> 
     1364          <Properties> 
     1365            <Property name="text" type="java.lang.String" value="to Start"/> 
     1366          </Properties> 
     1367          <Events> 
     1368            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnToggleTimeStartActionPerformed"/> 
     1369          </Events> 
     1370        </Component> 
     1371        <Component class="javax.swing.JRadioButton" name="btnToggleTimeEnd"> 
     1372          <Properties> 
     1373            <Property name="selected" type="boolean" value="true"/> 
     1374            <Property name="text" type="java.lang.String" value="to End"/> 
     1375          </Properties> 
     1376          <Events> 
     1377            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnToggleTimeEndActionPerformed"/> 
     1378          </Events> 
     1379        </Component> 
     1380      </SubComponents> 
     1381    </Container> 
    13441382  </SubComponents> 
    13451383</Form> 
  • trunk/src/scriptbuilder/gui/IncidentEditorFrame.java

    r117 r118  
    5151 
    5252    private int savedOffset; 
     53 
     54    private boolean addToEnd = true; 
    5355 
    5456    /** 
     
    453455        scriptEventsList = new javax.swing.JList(); 
    454456        zoomSlider = new javax.swing.JSlider(); 
    455         scriptEventsPanel1 = new javax.swing.JPanel(); 
     457        incidentInformationPanel = new javax.swing.JPanel(); 
    456458        jLabel2 = new javax.swing.JLabel(); 
    457459        jLabel3 = new javax.swing.JLabel(); 
     
    485487        timeStampScrollPane = new javax.swing.JScrollPane(); 
    486488        absoluteTimeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel(); 
    487         btnAddTime = new javax.swing.JButton(); 
    488489        timeStampScrollPane1 = new javax.swing.JScrollPane(); 
    489490        relativeTimeStampPanel = new scriptbuilder.gui.panels.TimeStampPanel(); 
     491        addTimePanel = new javax.swing.JPanel(); 
     492        btnAddTime = new javax.swing.JButton(); 
     493        btnToggleTimeStart = new javax.swing.JRadioButton(); 
     494        btnToggleTimeEnd = new javax.swing.JRadioButton(); 
    490495 
    491496        cadEvent.setText("CAD Event"); 
     
    859864        }); 
    860865 
    861         scriptEventsPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Information")); 
     866        incidentInformationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Incident Information")); 
    862867 
    863868        jLabel2.setText("Incident Number:"); 
     
    883888        incidentNumber.setText("100"); 
    884889 
    885         javax.swing.GroupLayout scriptEventsPanel1Layout = new javax.swing.GroupLayout(scriptEventsPanel1); 
    886         scriptEventsPanel1.setLayout(scriptEventsPanel1Layout); 
    887         scriptEventsPanel1Layout.setHorizontalGroup( 
    888             scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    889             .addGroup(scriptEventsPanel1Layout.createSequentialGroup() 
     890        javax.swing.GroupLayout incidentInformationPanelLayout = new javax.swing.GroupLayout(incidentInformationPanel); 
     891        incidentInformationPanel.setLayout(incidentInformationPanelLayout); 
     892        incidentInformationPanelLayout.setHorizontalGroup( 
     893            incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     894            .addGroup(incidentInformationPanelLayout.createSequentialGroup() 
    890895                .addContainerGap() 
    891                 .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     896                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    892897                    .addComponent(incidentDescriptionPane, javax.swing.GroupLayout.Alignment.TRAILING) 
    893898                    .addComponent(jLabel4) 
    894                     .addGroup(scriptEventsPanel1Layout.createSequentialGroup() 
    895                         .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     899                    .addGroup(incidentInformationPanelLayout.createSequentialGroup() 
     900                        .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    896901                            .addComponent(jLabel2) 
    897902                            .addComponent(jLabel3)) 
    898903                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    899                         .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
     904                        .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 
    900905                            .addComponent(incidentName) 
    901906                            .addComponent(incidentNumber)))) 
    902907                .addContainerGap()) 
    903908        ); 
    904         scriptEventsPanel1Layout.setVerticalGroup( 
    905             scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    906             .addGroup(scriptEventsPanel1Layout.createSequentialGroup() 
    907                 .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     909        incidentInformationPanelLayout.setVerticalGroup( 
     910            incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     911            .addGroup(incidentInformationPanelLayout.createSequentialGroup() 
     912                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    908913                    .addComponent(jLabel2) 
    909914                    .addComponent(incidentNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    910915                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    911                 .addGroup(scriptEventsPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     916                .addGroup(incidentInformationPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
    912917                    .addComponent(incidentName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    913918                    .addComponent(jLabel3)) 
     
    12951300        absoluteTimeStampPanelLayout.setHorizontalGroup( 
    12961301            absoluteTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1297             .addGap(0, 1036, Short.MAX_VALUE) 
     1302            .addGap(0, 1088, Short.MAX_VALUE) 
    12981303        ); 
    12991304        absoluteTimeStampPanelLayout.setVerticalGroup( 
     
    13031308 
    13041309        timeStampScrollPane.setViewportView(absoluteTimeStampPanel); 
    1305  
    1306         btnAddTime.setText("+15:00"); 
    1307         btnAddTime.addActionListener(new java.awt.event.ActionListener() 
    1308         { 
    1309             public void actionPerformed(java.awt.event.ActionEvent evt) 
    1310             { 
    1311                 btnAddTimeActionPerformed(evt); 
    1312             } 
    1313         }); 
    13141310 
    13151311        timeStampScrollPane1.setBorder(null); 
     
    13211317        relativeTimeStampPanelLayout.setHorizontalGroup( 
    13221318            relativeTimeStampPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1323             .addGap(0, 1036, Short.MAX_VALUE) 
     1319            .addGap(0, 1088, Short.MAX_VALUE) 
    13241320        ); 
    13251321        relativeTimeStampPanelLayout.setVerticalGroup( 
     
    13291325 
    13301326        timeStampScrollPane1.setViewportView(relativeTimeStampPanel); 
     1327 
     1328        btnAddTime.setText("+15:00"); 
     1329        btnAddTime.addActionListener(new java.awt.event.ActionListener() 
     1330        { 
     1331            public void actionPerformed(java.awt.event.ActionEvent evt) 
     1332            { 
     1333                btnAddTimeActionPerformed(evt); 
     1334            } 
     1335        }); 
     1336 
     1337        btnToggleTimeStart.setText("to Start"); 
     1338        btnToggleTimeStart.addActionListener(new java.awt.event.ActionListener() 
     1339        { 
     1340            public void actionPerformed(java.awt.event.ActionEvent evt) 
     1341            { 
     1342                btnToggleTimeStartActionPerformed(evt); 
     1343            } 
     1344        }); 
     1345 
     1346        btnToggleTimeEnd.setSelected(true); 
     1347        btnToggleTimeEnd.setText("to End"); 
     1348        btnToggleTimeEnd.addActionListener(new java.awt.event.ActionListener() 
     1349        { 
     1350            public void actionPerformed(java.awt.event.ActionEvent evt) 
     1351            { 
     1352                btnToggleTimeEndActionPerformed(evt); 
     1353            } 
     1354        }); 
     1355 
     1356        javax.swing.GroupLayout addTimePanelLayout = new javax.swing.GroupLayout(addTimePanel); 
     1357        addTimePanel.setLayout(addTimePanelLayout); 
     1358        addTimePanelLayout.setHorizontalGroup( 
     1359            addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1360            .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) 
     1361            .addGroup(addTimePanelLayout.createSequentialGroup() 
     1362                .addGroup(addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1363                    .addComponent(btnToggleTimeStart) 
     1364                    .addComponent(btnToggleTimeEnd)) 
     1365                .addGap(0, 0, Short.MAX_VALUE)) 
     1366        ); 
     1367        addTimePanelLayout.setVerticalGroup( 
     1368            addTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
     1369            .addGroup(addTimePanelLayout.createSequentialGroup() 
     1370                .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1371                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1372                .addComponent(btnToggleTimeStart) 
     1373                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1374                .addComponent(btnToggleTimeEnd) 
     1375                .addGap(0, 0, Short.MAX_VALUE)) 
     1376        ); 
    13311377 
    13321378        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 
     
    13431389                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    13441390                        .addComponent(evaluationEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1345                         .addGap(18, 18, 18) 
     1391                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    13461392                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1347                             .addGroup(layout.createSequentialGroup() 
    1348                                 .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) 
    1349                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    1350                                 .addComponent(btnAddTime, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    1351                             .addGroup(layout.createSequentialGroup() 
    1352                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1353                                     .addComponent(zoomInIcon) 
    1354                                     .addComponent(zoomOutIcon)) 
    1355                                 .addGap(0, 0, Short.MAX_VALUE)))) 
     1393                            .addComponent(zoomInIcon) 
     1394                            .addComponent(zoomOutIcon) 
     1395                            .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
     1396                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1397                        .addComponent(addTimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    13561398                    .addComponent(timelinesScrollPane, 0, 0, Short.MAX_VALUE) 
    1357                     .addComponent(timeStampScrollPane) 
     1399                    .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) 
    13581400                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 
    1359                         .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     1401                        .addComponent(incidentInformationPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    13601402                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    13611403                        .addComponent(scriptEventsPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
    1362                     .addComponent(timeStampScrollPane1)) 
     1404                    .addComponent(timeStampScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) 
    13631405                .addContainerGap()) 
    13641406        ); 
     
    13761418                                .addComponent(selectButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)))) 
    13771419                    .addGroup(layout.createSequentialGroup() 
     1420                        .addGap(9, 9, 9) 
    13781421                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 
    13791422                            .addGroup(layout.createSequentialGroup() 
    1380                                 .addGap(9, 9, 9) 
    13811423                                .addComponent(zoomInIcon) 
    1382                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1383                                 .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    1384                             .addGroup(layout.createSequentialGroup() 
    1385                                 .addGap(61, 61, 61) 
    1386                                 .addComponent(btnAddTime, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))) 
    1387                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
    1388                         .addComponent(zoomOutIcon))) 
     1424                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1425                                .addComponent(zoomSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1426                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
     1427                                .addComponent(zoomOutIcon)) 
     1428                            .addComponent(addTimePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 
    13891429                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    13901430                .addComponent(timeStampScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) 
     
    13951435                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    13961436                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    1397                     .addComponent(scriptEventsPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
     1437                    .addComponent(incidentInformationPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 
    13981438                    .addComponent(scriptEventsPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 
    13991439                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 
     
    17911831    private void btnAddTimeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnAddTimeActionPerformed 
    17921832    {//GEN-HEADEREND:event_btnAddTimeActionPerformed 
    1793         incidentTimelinePanel1.requestedEditorFillerTime += IncidentTimelinePanel.FILLER_INTERVAL_SECONDS; 
     1833        if (addToEnd) 
     1834        { 
     1835            incidentTimelinePanel1.requestedEditorFillerTime += IncidentTimelinePanel.FILLER_INTERVAL_SECONDS; 
     1836        } 
     1837        else 
     1838        { 
     1839            if (savedOffset - IncidentTimelinePanel.FILLER_INTERVAL_SECONDS >= 0) 
     1840            { 
     1841                savedOffset -= IncidentTimelinePanel.FILLER_INTERVAL_SECONDS; 
     1842                absoluteTimeStampPanel.setOffset(absoluteTimeStampPanel.offset 
     1843                        - IncidentTimelinePanel.FILLER_INTERVAL_SECONDS); 
     1844                theIncident.setOffset(theIncident.offset + IncidentTimelinePanel.FILLER_INTERVAL_SECONDS); 
     1845            } 
     1846            else 
     1847            { 
     1848                absoluteTimeStampPanel.setOffset(absoluteTimeStampPanel.offset 
     1849                        - savedOffset); 
     1850                theIncident.setOffset(theIncident.offset + savedOffset); 
     1851                savedOffset = 0; 
     1852            } 
     1853        } 
    17941854        this.update(null, theIncident); 
    17951855    }//GEN-LAST:event_btnAddTimeActionPerformed 
     1856 
     1857    private void btnToggleTimeEndActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnToggleTimeEndActionPerformed 
     1858    {//GEN-HEADEREND:event_btnToggleTimeEndActionPerformed 
     1859        btnToggleTimeEnd.setSelected(true); 
     1860        btnToggleTimeStart.setSelected(false); 
     1861        addToEnd = true; 
     1862    }//GEN-LAST:event_btnToggleTimeEndActionPerformed 
     1863 
     1864    private void btnToggleTimeStartActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnToggleTimeStartActionPerformed 
     1865    {//GEN-HEADEREND:event_btnToggleTimeStartActionPerformed 
     1866        btnToggleTimeStart.setSelected(true); 
     1867        btnToggleTimeEnd.setSelected(false); 
     1868        addToEnd = false; 
     1869    }//GEN-LAST:event_btnToggleTimeStartActionPerformed 
    17961870 
    17971871    /** 
     
    18331907    private javax.swing.JButton activityLogEvalButton; 
    18341908    private javax.swing.JFrame addNoiseFrame; 
     1909    private javax.swing.JPanel addTimePanel; 
    18351910    private javax.swing.JButton atmsEvalButton; 
    18361911    private javax.swing.JButton audioButton; 
     
    18381913    private javax.swing.JButton btnCancelNoise; 
    18391914    private javax.swing.JButton btnGenerateNoise; 
     1915    private javax.swing.JRadioButton btnToggleTimeEnd; 
     1916    private javax.swing.JRadioButton btnToggleTimeStart; 
    18401917    private javax.swing.JButton cadButton; 
    18411918    private javax.swing.JButton cadEvalButton; 
     
    18551932    private javax.swing.JScrollPane incidentDescriptionPane; 
    18561933    private javax.swing.JPanel incidentEventsPanel; 
     1934    private javax.swing.JPanel incidentInformationPanel; 
    18571935    private javax.swing.JTextField incidentName; 
    18581936    private javax.swing.JTextField incidentNumber; 
     
    18901968    private javax.swing.JScrollPane scriptEventsPane; 
    18911969    private javax.swing.JPanel scriptEventsPanel; 
    1892     private javax.swing.JPanel scriptEventsPanel1; 
    18931970    private javax.swing.JButton selectButton; 
    18941971    private javax.swing.JSlider sliderBackgroundNoise; 
  • trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java

    r117 r118  
    2121{ 
    2222 
    23     private int offset = 0; 
     23    public int offset = 0; 
    2424 
    2525    private boolean isAbsolute = false; 
Note: See TracChangeset for help on using the changeset viewer.