Changeset 187 in tmcsimulator-scriptbuilder for trunk/src/event/editor/TelephonePanel.java


Ignore:
Timestamp:
01/14/2020 06:49:40 AM (6 years ago)
Author:
jdalbey
Message:

TelephonePanel?.java deleted "Remove" button as it's function is not performed by the "Remove this event" button.

File:
1 edited

Legend:

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

    r145 r187  
    9999                    event.roles.remove(e.getLastRow()); 
    100100                    event.lines.remove(e.getLastRow()); 
     101                    System.out.println("deleted table row"); 
    101102                } 
    102103            } 
     
    110111    } 
    111112     
     113    /** Implementation of remove this event action */ 
    112114    @Override 
    113115    public boolean removeAssociatedEvent() 
     
    139141        txtInstructorRole = new javax.swing.JTextField(); 
    140142        jLabel1 = new javax.swing.JLabel(); 
    141         removeButton = new javax.swing.JButton(); 
    142143 
    143144        addStudentButton.setText("Add Student Line"); 
     
    148149        deleteSelectedButton.setText("Delete Selected Line"); 
    149150        deleteSelectedButton.setToolTipText("Deletes the selected row in the table"); 
    150         deleteSelectedButton.addActionListener(new java.awt.event.ActionListener() { 
    151             public void actionPerformed(java.awt.event.ActionEvent evt) { 
    152                 deleteSelectedButtonActionPerformed(evt); 
    153             } 
    154         }); 
    155151 
    156152        addInstructorButton.setText("Add Instructor Line"); 
     
    165161 
    166162        jLabel1.setText("Role of instructor:"); 
    167  
    168         removeButton.setText("Remove"); 
    169         removeButton.setToolTipText("Removes this property"); 
    170         removeButton.addMouseListener(new java.awt.event.MouseAdapter() { 
    171             public void mouseClicked(java.awt.event.MouseEvent evt) { 
    172                 removeThisProperty(evt); 
    173             } 
    174         }); 
    175         removeButton.addActionListener(new java.awt.event.ActionListener() { 
    176             public void actionPerformed(java.awt.event.ActionEvent evt) { 
    177                 removeButtonActionPerformed(evt); 
    178             } 
    179         }); 
    180163 
    181164        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 
     
    185168            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() 
    186169                .addContainerGap() 
    187                 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 
    188                     .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 602, Short.MAX_VALUE) 
    189                     .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 
    190                         .add(jLabel1) 
    191                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
    192                         .add(txtInstructorRole, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)) 
    193                     .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 
     170                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
     171                    .add(layout.createSequentialGroup() 
    194172                        .add(addInstructorButton) 
    195173                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 
     
    197175                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 
    198176                        .add(deleteSelectedButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 178, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    199                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 86, Short.MAX_VALUE)) 
    200                     .add(removeButton)) 
    201                 .add(26, 26, 26)) 
     177                        .addContainerGap(133, Short.MAX_VALUE)) 
     178                    .add(layout.createSequentialGroup() 
     179                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) 
     180                            .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 602, Short.MAX_VALUE) 
     181                            .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() 
     182                                .add(jLabel1) 
     183                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
     184                                .add(txtInstructorRole, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE))) 
     185                        .add(26, 26, 26)))) 
    202186        ); 
    203187        layout.setVerticalGroup( 
    204188            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    205189            .add(layout.createSequentialGroup() 
    206                 .addContainerGap() 
    207                 .add(removeButton) 
    208                 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
     190                .add(49, 49, 49) 
    209191                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
    210192                    .add(txtInstructorRole, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
     
    221203    }// </editor-fold>//GEN-END:initComponents 
    222204 
    223     private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty 
    224         //linked to remove button - removes the current buton 
    225         if (removeListener != null) 
    226         { 
    227             removeListener.actionPerformed(new ActionEvent(this, 0, "")); 
    228         } 
    229     }//GEN-LAST:event_removeThisProperty 
    230  
    231205    private void addInstructorButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addInstructorButtonActionPerformed 
    232206        // TODO add your handling code here: 
     
    237211    }//GEN-LAST:event_addInstructorButtonActionPerformed 
    238212 
    239     private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed 
    240         // TODO add your handling code here: 
    241     }//GEN-LAST:event_removeButtonActionPerformed 
    242  
    243     private void deleteSelectedButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteSelectedButtonActionPerformed 
    244         // TODO add your handling code here: 
    245     }//GEN-LAST:event_deleteSelectedButtonActionPerformed 
    246  
    247213 
    248214    // Variables declaration - do not modify//GEN-BEGIN:variables 
     
    252218    private javax.swing.JLabel jLabel1; 
    253219    private javax.swing.JScrollPane jScrollPane1; 
    254     private javax.swing.JButton removeButton; 
    255220    private javax.swing.JTextField txtInstructorRole; 
    256221    // End of variables declaration//GEN-END:variables 
Note: See TracChangeset for help on using the changeset viewer.