Changeset 166 in tmcsimulator-scriptbuilder for trunk/src/event


Ignore:
Timestamp:
12/16/2019 02:57:51 PM (6 years ago)
Author:
sdanthin
Message:

Editor.java removed legacy time text box

Location:
trunk/src/event/editor/frame
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/event/editor/frame/Editor.form

    r165 r166  
    276276          <Component id="eventTabsPane" alignment="1" max="32767" attributes="0"/> 
    277277          <Group type="102" alignment="0" attributes="0"> 
    278               <EmptySpace max="-2" attributes="0"/> 
    279               <Component id="txtEventStart" min="-2" max="-2" attributes="0"/> 
    280               <EmptySpace max="-2" attributes="0"/> 
     278              <EmptySpace min="-2" pref="84" max="-2" attributes="0"/> 
    281279              <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 
    282280              <EmptySpace max="-2" attributes="0"/> 
     
    309307                  <Component id="bottomFramePanel" min="-2" max="-2" attributes="0"/> 
    310308                  <Group type="103" groupAlignment="3" attributes="0"> 
    311                       <Component id="txtEventStart" alignment="3" min="-2" max="-2" attributes="0"/> 
    312309                      <Component id="timeSecondComboSelector" alignment="3" min="-2" max="-2" attributes="0"/> 
    313310                      <Component id="timeMinuteComboSelector" alignment="3" min="-2" max="-2" attributes="0"/> 
     
    346343      </Layout> 
    347344    </Container> 
    348     <Component class="javax.swing.JTextField" name="txtEventStart"> 
    349       <Properties> 
    350         <Property name="text" type="java.lang.String" value="00:00:00"/> 
    351       </Properties> 
    352       <Events> 
    353         <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtEventStartActionPerformed"/> 
    354       </Events> 
    355     </Component> 
    356345    <Component class="javax.swing.JButton" name="saveCloseBtn"> 
    357346      <Properties> 
  • trunk/src/event/editor/frame/Editor.java

    r165 r166  
    5555            String eventTime = df.format(new Date(slice.getTime() * 1000)); 
    5656            System.out.println("[" + eventTime + "]"); 
    57             txtEventStart.setText(eventTime); 
     57             
    5858            List<Integer> timesS = timeGenerator(eventTime,"s"); 
    5959            List<Integer> timesM = timeGenerator(eventTime,"m"); 
     
    189189        String eventTime = ""; 
    190190 
    191         txtEventStart.setText(eventTime); 
    192  
    193         txtEventStart.addKeyListener(new KeyListener() 
    194         { 
    195  
    196             @Override 
    197             public void keyTyped(KeyEvent e) 
    198             { 
    199             } 
    200  
    201             @Override 
    202             public void keyPressed(KeyEvent e) 
    203             { 
    204                 if (e.getKeyCode() == KeyEvent.VK_ENTER) 
    205                 { 
    206                     updateEventTime(); 
    207                 } 
    208             } 
    209  
    210             @Override 
    211             public void keyReleased(KeyEvent e) 
    212             { 
    213             } 
    214         }); 
     191         
    215192        this.addWindowListener(new WindowAdapter() 
    216193        { 
     
    263240        eventTabsPane = new javax.swing.JTabbedPane(); 
    264241        bottomFramePanel = new javax.swing.JPanel(); 
    265         txtEventStart = new javax.swing.JTextField(); 
    266242        saveCloseBtn = new javax.swing.JButton(); 
    267243        btnRemoveCurrentEvent = new javax.swing.JButton(); 
     
    308284        ); 
    309285 
    310         txtEventStart.setText("00:00:00"); 
    311         txtEventStart.addActionListener(new java.awt.event.ActionListener() { 
    312             public void actionPerformed(java.awt.event.ActionEvent evt) { 
    313                 txtEventStartActionPerformed(evt); 
    314             } 
    315         }); 
    316  
    317286        saveCloseBtn.setText("Save and Close"); 
    318287        saveCloseBtn.addActionListener(new java.awt.event.ActionListener() { 
     
    521490            .add(org.jdesktop.layout.GroupLayout.TRAILING, eventTabsPane) 
    522491            .add(layout.createSequentialGroup() 
    523                 .addContainerGap() 
    524                 .add(txtEventStart, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    525                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
     492                .add(84, 84, 84) 
    526493                .add(jLabel1) 
    527494                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
     
    552519                    .add(bottomFramePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    553520                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
    554                         .add(txtEventStart, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    555521                        .add(timeSecondComboSelector, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    556522                        .add(timeMinuteComboSelector, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
     
    606572         
    607573        //updateEventTime(); 
    608         if(!txtEventStart.getText().equals("")) 
    609         { 
    610             updateEventTime(); 
    611         } 
     574         
     575        updateEventTime(); 
     576         
    612577        model.closePanels(); 
    613578        closeWindow(); 
     
    622587        // TODO add your handling code here: 
    623588    }//GEN-LAST:event_timeMinuteComboSelectorActionPerformed 
    624  
    625     private void txtEventStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEventStartActionPerformed 
    626         // TODO add your handling code here: 
    627     }//GEN-LAST:event_txtEventStartActionPerformed 
    628589 
    629590    private void timeHourComboSelectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timeHourComboSelectorActionPerformed 
     
    713674    private javax.swing.JComboBox<String> timeMinuteComboSelector; 
    714675    private javax.swing.JComboBox<String> timeSecondComboSelector; 
    715     private javax.swing.JTextField txtEventStart; 
    716676    // End of variables declaration//GEN-END:variables 
    717677 
Note: See TracChangeset for help on using the changeset viewer.