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

    r89 r92  
    1010 * @author nathaniellehrer 
    1111 */ 
    12 public class CADLogPanel extends javax.swing.JPanel implements RemoveablePanel, ScriptEventEditorPanel 
     12public class CADLogPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 
    1313{ 
    1414 
     
    2323        initComponents(); 
    2424    } 
    25  
    26     public void setRemoveListener(ActionListener listener) 
    27     { 
    28         removeListener = listener; 
    29     } 
    30  
    3125    /** 
    3226     * Load the script event associated with this editor panel. 
     
    6054    } 
    6155 
     56    @Override 
    6257    public void update(Observable o, Object arg) 
    6358    { 
     
    8378    { 
    8479 
    85         removeButton = new javax.swing.JButton(); 
    8680        jLabel1 = new javax.swing.JLabel(); 
    8781        jScrollPane1 = new javax.swing.JScrollPane(); 
    8882        CadTextField = new javax.swing.JTextArea(); 
    89  
    90         removeButton.setText("Remove"); 
    91         removeButton.addMouseListener(new java.awt.event.MouseAdapter() 
    92         { 
    93             public void mouseClicked(java.awt.event.MouseEvent evt) 
    94             { 
    95                 removeButtonremoveThisProperty(evt); 
    96             } 
    97         }); 
    9883 
    9984        jLabel1.setText("Cad Log Text"); 
     
    11398                    .add(layout.createSequentialGroup() 
    11499                        .add(jLabel1) 
    115                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 330, Short.MAX_VALUE) 
    116                         .add(removeButton))) 
     100                        .add(0, 0, Short.MAX_VALUE))) 
    117101                .addContainerGap()) 
    118102        ); 
     
    120104            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    121105            .add(layout.createSequentialGroup() 
    122                 .addContainerGap() 
    123                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 
    124                     .add(removeButton) 
    125                     .add(jLabel1)) 
     106                .add(19, 19, 19) 
     107                .add(jLabel1) 
    126108                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
    127109                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE) 
     
    130112    }// </editor-fold>//GEN-END:initComponents 
    131113 
    132     private void removeButtonremoveThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeButtonremoveThisProperty 
    133         if (removeListener != null) 
    134         { 
    135             removeListener.actionPerformed(new ActionEvent(this, 0, "")); 
    136         } 
    137 }//GEN-LAST:event_removeButtonremoveThisProperty 
    138  
    139114 
    140115    // Variables declaration - do not modify//GEN-BEGIN:variables 
     
    142117    private javax.swing.JLabel jLabel1; 
    143118    private javax.swing.JScrollPane jScrollPane1; 
    144     private javax.swing.JButton removeButton; 
    145119    // End of variables declaration//GEN-END:variables 
    146120 
Note: See TracChangeset for help on using the changeset viewer.