Changeset 92 in tmcsimulator-scriptbuilder for trunk/src/event/editor/UnitPanel.java
- Timestamp:
- 08/28/2017 04:12:45 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/event/editor/UnitPanel.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/UnitPanel.java
r89 r92 10 10 * @author nathaniellehrer 11 11 */ 12 public class UnitPanel extends javax.swing.JPanel implements RemoveablePanel,ScriptEventEditorPanel12 public class UnitPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 13 13 { 14 14 … … 39 39 } 40 40 41 public void setRemoveListener(ActionListener listener) 42 { 43 removeListener = listener; 44 } 45 41 @Override 46 42 public void getEventObject(I_ScriptEvent sei) 47 43 { … … 118 114 } 119 115 116 @Override 120 117 public void update(Observable o, Object arg) 121 118 { … … 143 140 jLabel1 = new javax.swing.JLabel(); 144 141 txtUnitNumber = new javax.swing.JFormattedTextField(); 145 removeButton = new javax.swing.JButton();146 142 jLabel2 = new javax.swing.JLabel(); 147 143 StatusDropdown = new javax.swing.JComboBox(); … … 157 153 txtUnitNumber.setToolTipText(""); 158 154 159 removeButton.setText("Remove");160 removeButton.addMouseListener(new java.awt.event.MouseAdapter()161 {162 public void mouseClicked(java.awt.event.MouseEvent evt)163 {164 removeThisProperty(evt);165 }166 });167 168 155 jLabel2.setText("Status"); 169 156 … … 185 172 .addContainerGap() 186 173 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 187 .add(org.jdesktop.layout.GroupLayout.TRAILING, removeButton)188 174 .add(org.jdesktop.layout.GroupLayout.TRAILING, help, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 565, Short.MAX_VALUE) 189 175 .add(layout.createSequentialGroup() … … 208 194 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 209 195 .add(layout.createSequentialGroup() 210 .addContainerGap() 211 .add(removeButton) 212 .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 196 .add(47, 47, 47) 213 197 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 214 198 .add(jLabel1) … … 231 215 ); 232 216 }// </editor-fold>//GEN-END:initComponents 233 234 private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty235 if (removeListener != null)236 {237 removeListener.actionPerformed(new ActionEvent(this, 0, ""));238 }239 }//GEN-LAST:event_removeThisProperty240 217 241 218 … … 249 226 private javax.swing.JLabel jLabel3; 250 227 private javax.swing.JLabel jLabel4; 251 private javax.swing.JButton removeButton;252 228 private javax.swing.JFormattedTextField txtUnitNumber; 253 229 // End of variables declaration//GEN-END:variables
Note: See TracChangeset
for help on using the changeset viewer.
