Changeset 92 in tmcsimulator-scriptbuilder for trunk/src/event/editor/ParamicsPanel.java


Ignore:
Timestamp:
08/28/2017 04:12:45 PM (9 years ago)
Author:
bmcguffin
Message:

Removed superfluous "Remove" buttons on several panels.

Removed interface "RemovablePanel?" as it was no longer necessary or useful; removed related methods from classes implementing it.

File:
1 edited

Legend:

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

    r89 r92  
    1212 * @author nathaniellehrer 
    1313 */ 
    14 public class ParamicsPanel extends javax.swing.JPanel implements RemoveablePanel, ScriptEventEditorPanel 
     14public class ParamicsPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 
    1515{ 
    1616 
     
    2626    } 
    2727 
    28     public void setRemoveListener(ActionListener listener) 
    29     { 
    30         removeListener = listener; 
    31     } 
    32  
     28    @Override 
    3329    public void getEventObject(I_ScriptEvent sei) 
    3430    { 
     
    107103    } 
    108104 
     105    @Override 
    109106    public void update(Observable o, Object arg) 
    110107    { 
     
    130127    { 
    131128 
    132         removeButton = new javax.swing.JButton(); 
    133129        jLabel1 = new javax.swing.JLabel(); 
    134130        jLabel2 = new javax.swing.JLabel(); 
     
    148144        jCheckBox10 = new javax.swing.JCheckBox(); 
    149145        LocationDropdown = new javax.swing.JComboBox(); 
    150  
    151         removeButton.setText("Remove"); 
    152         removeButton.addMouseListener(new java.awt.event.MouseAdapter() 
    153         { 
    154             public void mouseClicked(java.awt.event.MouseEvent evt) 
    155             { 
    156                 removeThisProperty(evt); 
    157             } 
    158         }); 
    159146 
    160147        jLabel1.setText("Location"); 
     
    292279                            .add(jCheckBox10) 
    293280                            .add(jCheckBox9))) 
    294                     .add(removeButton) 
    295281                    .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 
    296282                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
     
    307293            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    308294            .add(layout.createSequentialGroup() 
    309                 .addContainerGap() 
    310                 .add(removeButton) 
    311                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
     295                .add(41, 41, 41) 
    312296                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
    313297                    .add(jLabel1) 
     
    351335    }// </editor-fold>//GEN-END:initComponents 
    352336 
    353     private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty 
    354         if (removeListener != null) 
    355         { 
    356             removeListener.actionPerformed(new ActionEvent(this, 0, "")); 
    357         } 
    358     }//GEN-LAST:event_removeThisProperty 
    359  
    360337    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed 
    361338        if (jCheckBox1.isSelected()) 
     
    547524    private javax.swing.JLabel jLabel3; 
    548525    private javax.swing.JLabel jLabel4; 
    549     private javax.swing.JButton removeButton; 
    550526    // End of variables declaration//GEN-END:variables 
    551527 
Note: See TracChangeset for help on using the changeset viewer.