- Timestamp:
- 12/16/2019 02:57:51 PM (6 years ago)
- Location:
- trunk/src/event/editor/frame
- Files:
-
- 2 edited
-
Editor.form (modified) (3 diffs)
-
Editor.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/frame/Editor.form
r165 r166 276 276 <Component id="eventTabsPane" alignment="1" max="32767" attributes="0"/> 277 277 <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"/> 281 279 <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 282 280 <EmptySpace max="-2" attributes="0"/> … … 309 307 <Component id="bottomFramePanel" min="-2" max="-2" attributes="0"/> 310 308 <Group type="103" groupAlignment="3" attributes="0"> 311 <Component id="txtEventStart" alignment="3" min="-2" max="-2" attributes="0"/>312 309 <Component id="timeSecondComboSelector" alignment="3" min="-2" max="-2" attributes="0"/> 313 310 <Component id="timeMinuteComboSelector" alignment="3" min="-2" max="-2" attributes="0"/> … … 346 343 </Layout> 347 344 </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>356 345 <Component class="javax.swing.JButton" name="saveCloseBtn"> 357 346 <Properties> -
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.
