package event.editor; import java.awt.event.*; import java.util.Observable; import scriptbuilder.structures.events.*; /** * * @author nathaniellehrer */ public class TMTRadioPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel { private ActionListener removeListener; private TMTRadioEvent event; /** * Creates new form TMTRadio */ public TMTRadioPanel() { initComponents(); } public void getEventObject(I_ScriptEvent sei) { event = (TMTRadioEvent) sei; jTextArea1.setText(event.message); } public void update(Observable o, Object arg) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } @Override public boolean removeAssociatedEvent() { ((I_ScriptEvent) event).removeThis(); event = null; return true; } @Override public void uponClose() { if (event != null) { event.message = jTextArea1.getText(); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); jLabel1.setText("Transmission:"); jTextArea1.setColumns(20); jTextArea1.setRows(5); jTextArea1.setToolTipText("The radio transmission"); jScrollPane1.setViewportView(jTextArea1); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 487, Short.MAX_VALUE) .add(jLabel1)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(jLabel1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE) .addContainerGap()) ); }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTextArea jTextArea1; // End of variables declaration//GEN-END:variables }