Changeset 166 in tmcsimulator-scriptbuilder for trunk/src/event/editor/frame/Editor.java
- Timestamp:
- 12/16/2019 02:57:51 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/event/editor/frame/Editor.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/frame/Editor.java
r165 r166 55 55 String eventTime = df.format(new Date(slice.getTime() * 1000)); 56 56 System.out.println("[" + eventTime + "]"); 57 txtEventStart.setText(eventTime);57 58 58 List<Integer> timesS = timeGenerator(eventTime,"s"); 59 59 List<Integer> timesM = timeGenerator(eventTime,"m"); … … 189 189 String eventTime = ""; 190 190 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 215 192 this.addWindowListener(new WindowAdapter() 216 193 { … … 263 240 eventTabsPane = new javax.swing.JTabbedPane(); 264 241 bottomFramePanel = new javax.swing.JPanel(); 265 txtEventStart = new javax.swing.JTextField();266 242 saveCloseBtn = new javax.swing.JButton(); 267 243 btnRemoveCurrentEvent = new javax.swing.JButton(); … … 308 284 ); 309 285 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 317 286 saveCloseBtn.setText("Save and Close"); 318 287 saveCloseBtn.addActionListener(new java.awt.event.ActionListener() { … … 521 490 .add(org.jdesktop.layout.GroupLayout.TRAILING, eventTabsPane) 522 491 .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) 526 493 .add(jLabel1) 527 494 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) … … 552 519 .add(bottomFramePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 553 520 .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)555 521 .add(timeSecondComboSelector, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 556 522 .add(timeMinuteComboSelector, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) … … 606 572 607 573 //updateEventTime(); 608 if(!txtEventStart.getText().equals("")) 609 { 610 updateEventTime(); 611 } 574 575 updateEventTime(); 576 612 577 model.closePanels(); 613 578 closeWindow(); … … 622 587 // TODO add your handling code here: 623 588 }//GEN-LAST:event_timeMinuteComboSelectorActionPerformed 624 625 private void txtEventStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtEventStartActionPerformed626 // TODO add your handling code here:627 }//GEN-LAST:event_txtEventStartActionPerformed628 589 629 590 private void timeHourComboSelectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timeHourComboSelectorActionPerformed … … 713 674 private javax.swing.JComboBox<String> timeMinuteComboSelector; 714 675 private javax.swing.JComboBox<String> timeSecondComboSelector; 715 private javax.swing.JTextField txtEventStart;716 676 // End of variables declaration//GEN-END:variables 717 677
Note: See TracChangeset
for help on using the changeset viewer.
