Changeset 92 in tmcsimulator-scriptbuilder for trunk/src/event/editor/TowPanel.java
- Timestamp:
- 08/28/2017 04:12:45 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/event/editor/TowPanel.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/TowPanel.java
r89 r92 10 10 * @author nathaniellehrer 11 11 */ 12 public class TowPanel extends javax.swing.JPanel implements RemoveablePanel,ScriptEventEditorPanel12 public class TowPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 13 13 { 14 14 … … 55 55 } 56 56 57 public void setRemoveListener(ActionListener listener) 58 { 59 removeListener = listener; 60 } 61 57 @Override 62 58 public void getEventObject(I_ScriptEvent sei) 63 59 { … … 133 129 } 134 130 131 @Override 135 132 public void update(Observable o, Object arg) 136 133 { … … 156 153 { 157 154 158 removeButton = new javax.swing.JButton();159 155 jLabel1 = new javax.swing.JLabel(); 160 156 txtCompany = new javax.swing.JTextField(); … … 167 163 help = new javax.swing.JLabel(); 168 164 169 removeButton.setText("Remove");170 removeButton.addMouseListener(new java.awt.event.MouseAdapter()171 {172 public void mouseClicked(java.awt.event.MouseEvent evt)173 {174 removeThisProperty(evt);175 }176 });177 removeButton.addActionListener(new java.awt.event.ActionListener()178 {179 public void actionPerformed(java.awt.event.ActionEvent evt)180 {181 removeButtonActionPerformed(evt);182 }183 });184 185 165 jLabel1.setText("Company"); 186 166 … … 215 195 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 216 196 .add(help, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE) 217 .add(org.jdesktop.layout.GroupLayout.TRAILING, removeButton)218 197 .add(layout.createSequentialGroup() 219 198 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) … … 233 212 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 234 213 .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 235 .addContainerGap() 236 .add(removeButton) 237 .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 214 .add(47, 47, 47) 238 215 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 239 216 .add(jLabel1) … … 257 234 }// </editor-fold>//GEN-END:initComponents 258 235 259 private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed260 // TODO add your handling code here:261 }//GEN-LAST:event_removeButtonActionPerformed262 263 private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty264 if (removeListener != null)265 {266 removeListener.actionPerformed(new ActionEvent(this, 0, ""));267 }268 }//GEN-LAST:event_removeThisProperty269 270 236 271 237 // Variables declaration - do not modify//GEN-BEGIN:variables … … 275 241 private javax.swing.JLabel jLabel3; 276 242 private javax.swing.JLabel jLabel4; 277 private javax.swing.JButton removeButton;278 243 private javax.swing.JTextField txtBeat; 279 244 private javax.swing.JTextField txtCompany;
Note: See TracChangeset
for help on using the changeset viewer.
