Changeset 92 in tmcsimulator-scriptbuilder for trunk/src/event/editor/CMSEvaluationPanel.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/CMSEvaluationPanel.java

    r89 r92  
    1313 * @author nathaniellehrer 
    1414 */ 
    15 public class CMSEvaluationPanel extends javax.swing.JPanel implements RemoveablePanel, ScriptEventEditorPanel 
     15public class CMSEvaluationPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 
    1616{ 
    1717 
    1818    private HashMap<String, Class> properties; 
    1919    private JTable dialogTable; 
    20     private ActionListener removeListener; 
    2120    private CMSEvaluationEvent event; 
    2221 
     
    3130    } 
    3231 
    33     public void setRemoveListener(ActionListener listener) 
    34     { 
    35         removeListener = listener; 
    36     } 
    37  
    3832    @Override 
    3933    public void getEventObject(I_ScriptEvent sei) 
     
    133127    } 
    134128 
     129    @Override 
    135130    public void update(Observable o, Object arg) 
    136131    { 
     
    156151    { 
    157152 
    158         removeButton = new javax.swing.JButton(); 
    159153        jLabel3 = new javax.swing.JLabel(); 
    160154        txtLocation = new javax.swing.JTextField(); 
     
    167161        txtMessage = new javax.swing.JTextArea(); 
    168162        addButton = new javax.swing.JButton(); 
    169  
    170         removeButton.setText("Remove"); 
    171         removeButton.setToolTipText("Removes this property"); 
    172         removeButton.addMouseListener(new java.awt.event.MouseAdapter() 
    173         { 
    174             public void mouseClicked(java.awt.event.MouseEvent evt) 
    175             { 
    176                 removeButtonremoveThisProperty(evt); 
    177             } 
    178         }); 
    179163 
    180164        jLabel3.setText("Location"); 
     
    218202                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    219203                            .add(jScrollPane1) 
    220                             .add(org.jdesktop.layout.GroupLayout.TRAILING, removeButton) 
    221204                            .add(layout.createSequentialGroup() 
    222205                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
     
    234217            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    235218            .add(layout.createSequentialGroup() 
    236                 .add(17, 17, 17) 
    237                 .add(removeButton) 
    238                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
     219                .add(52, 52, 52) 
    239220                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
    240221                    .add(jLabel1) 
     
    257238        ); 
    258239    }// </editor-fold>//GEN-END:initComponents 
    259  
    260     private void removeButtonremoveThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeButtonremoveThisProperty 
    261         if (removeListener != null) 
    262         { 
    263             removeListener.actionPerformed(new ActionEvent(this, 0, "")); 
    264         } 
    265 }//GEN-LAST:event_removeButtonremoveThisProperty 
    266240 
    267241 
     
    274248    private javax.swing.JLabel jLabel3; 
    275249    private javax.swing.JScrollPane jScrollPane1; 
    276     private javax.swing.JButton removeButton; 
    277250    private javax.swing.JFormattedTextField txtID; 
    278251    private javax.swing.JTextField txtLocation; 
Note: See TracChangeset for help on using the changeset viewer.