Changeset 130 in tmcsimulator-scriptbuilder for trunk/src/event/editor/TMTRadioPanel.java


Ignore:
Timestamp:
10/23/2017 08:58:34 AM (9 years ago)
Author:
bmcguffin
Message:

Changed implementation of save function for event editor panels. Instead of updating their model objects whenever the enter key is pressed, panels are now notified when the window is closed and update their information then.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/event/editor/TMTRadioPanel.java

    r92 r130  
    2727        event = (TMTRadioEvent) sei; 
    2828        jTextArea1.setText(event.message); 
    29         jTextArea1.addKeyListener(new KeyListener() 
    30         { 
    31  
    32             public void keyTyped(KeyEvent e) 
    33             { 
    34             } 
    35  
    36             public void keyPressed(KeyEvent e) 
    37             { 
    38                 if (e.getKeyCode() == KeyEvent.VK_ENTER) 
    39                 { 
    40                     event.message = jTextArea1.getText(); 
    41                 } 
    42             } 
    43  
    44             public void keyReleased(KeyEvent e) 
    45             { 
    46             } 
    47         }); 
    4829    } 
    4930 
     
    5940        event = null; 
    6041        return true; 
     42    } 
     43 
     44    @Override 
     45    public void uponClose() 
     46    { 
     47        event.message = jTextArea1.getText(); 
    6148    } 
    6249 
Note: See TracChangeset for help on using the changeset viewer.