Changeset 92 in tmcsimulator-scriptbuilder for trunk/src/event/editor/WitnessPanel.java
- Timestamp:
- 08/28/2017 04:12:45 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/event/editor/WitnessPanel.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/WitnessPanel.java
r89 r92 11 11 * @author nathaniellehrer 12 12 */ 13 public class WitnessPanel extends javax.swing.JPanel implements RemoveablePanel,ScriptEventEditorPanel13 public class WitnessPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 14 14 { 15 15 … … 25 25 } 26 26 27 public void setRemoveListener(ActionListener listener) 28 { 29 removeListener = listener; 30 } 31 27 @Override 32 28 public void getEventObject(I_ScriptEvent sei) 33 29 { … … 119 115 } 120 116 117 @Override 121 118 public void update(Observable o, Object arg) 122 119 { … … 142 139 { 143 140 144 removeButton = new javax.swing.JButton();145 141 jLabel1 = new javax.swing.JLabel(); 146 142 txtFirstName = new javax.swing.JTextField(); … … 152 148 txtPhoneNumber = new javax.swing.JFormattedTextField(); 153 149 154 removeButton.setText("Remove");155 removeButton.addMouseListener(new java.awt.event.MouseAdapter()156 {157 public void mouseClicked(java.awt.event.MouseEvent evt)158 {159 removeThisProperty(evt);160 }161 });162 163 150 jLabel1.setText("First Name"); 164 151 … … 178 165 .addContainerGap() 179 166 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 180 .add(removeButton)181 167 .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 182 168 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) … … 198 184 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 199 185 .add(layout.createSequentialGroup() 200 .addContainerGap() 201 .add(removeButton) 202 .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 186 .add(47, 47, 47) 203 187 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 204 188 .add(txtFirstName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) … … 220 204 }// </editor-fold>//GEN-END:initComponents 221 205 222 private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty223 if (removeListener != null)224 {225 removeListener.actionPerformed(new ActionEvent(this, 0, ""));226 }227 }//GEN-LAST:event_removeThisProperty228 229 206 230 207 // Variables declaration - do not modify//GEN-BEGIN:variables … … 233 210 private javax.swing.JLabel jLabel3; 234 211 private javax.swing.JLabel jLabel4; 235 private javax.swing.JButton removeButton;236 212 private javax.swing.JTextField txtAddress; 237 213 private javax.swing.JTextField txtFirstName;
Note: See TracChangeset
for help on using the changeset viewer.
