Changeset 171 in tmcsimulator-scriptbuilder for trunk/src/event/editor/CHPRadioPanel.java


Ignore:
Timestamp:
12/19/2019 06:48:37 PM (6 years ago)
Author:
sdanthin
Message:

AudioPanel?.form removed ability to edit the audio filename.
CHPRadioPanel.form removed ability to edit the audio filename.

File:
1 edited

Legend:

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

    r140 r171  
    110110    @SuppressWarnings("unchecked") 
    111111    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 
    112     private void initComponents() 
    113     { 
     112    private void initComponents() { 
    114113 
    115114        jLabel4 = new javax.swing.JLabel(); 
    116115        audioText = new javax.swing.JTextField(); 
    117         jButton2 = new javax.swing.JButton(); 
    118116        addDispatchButton = new javax.swing.JButton(); 
    119117        deleteSelectedButton = new javax.swing.JButton(); 
     
    124122 
    125123        audioText.setToolTipText("The radio audio file"); 
    126  
    127         jButton2.setText("Browse"); 
    128         jButton2.setToolTipText("Browse for the radio audio file"); 
    129         jButton2.addMouseListener(new java.awt.event.MouseAdapter() 
    130         { 
    131             public void mouseClicked(java.awt.event.MouseEvent evt) 
    132             { 
    133                 browse(evt); 
    134             } 
    135         }); 
     124        audioText.setEnabled(false); 
    136125 
    137126        addDispatchButton.setText("Add Dispatch"); 
     
    143132        addFieldButton.setText("Add Field"); 
    144133        addFieldButton.setToolTipText("Adds a row for dialog by the field operator in the table"); 
    145         addFieldButton.addActionListener(new java.awt.event.ActionListener() 
    146         { 
    147             public void actionPerformed(java.awt.event.ActionEvent evt) 
    148             { 
     134        addFieldButton.addActionListener(new java.awt.event.ActionListener() { 
     135            public void actionPerformed(java.awt.event.ActionEvent evt) { 
    149136                addFieldButtonActionPerformed(evt); 
    150137            } 
     
    164151                        .add(addFieldButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 130, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    165152                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 
    166                         .add(deleteSelectedButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 131, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) 
     153                        .add(deleteSelectedButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 131, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
     154                        .add(0, 331, Short.MAX_VALUE)) 
    167155                    .add(layout.createSequentialGroup() 
    168156                        .add(jLabel4) 
    169157                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
    170                         .add(audioText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 511, Short.MAX_VALUE) 
    171                         .add(18, 18, 18) 
    172                         .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 130, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) 
     158                        .add(audioText))) 
    173159                .addContainerGap()) 
    174160        ); 
     
    179165                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
    180166                    .add(audioText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    181                     .add(jLabel4) 
    182                     .add(jButton2)) 
     167                    .add(jLabel4)) 
    183168                .add(18, 18, 18) 
    184169                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
     
    187172                    .add(deleteSelectedButton)) 
    188173                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 
    189                 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 341, Short.MAX_VALUE) 
     174                .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE) 
    190175                .addContainerGap()) 
    191176        ); 
    192177    }// </editor-fold>//GEN-END:initComponents 
    193  
    194     private void browse(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_browse 
    195         JFileChooser browser = new JFileChooser(); 
    196         int returnVal = browser.showOpenDialog(this); 
    197         if (returnVal == JFileChooser.APPROVE_OPTION) 
    198         { 
    199             audioText.setText(browser.getSelectedFile().getPath()); 
    200         } 
    201     }//GEN-LAST:event_browse 
    202178 
    203179    private void addFieldButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addFieldButtonActionPerformed 
     
    210186    private javax.swing.JTextField audioText; 
    211187    private javax.swing.JButton deleteSelectedButton; 
    212     private javax.swing.JButton jButton2; 
    213188    private javax.swing.JLabel jLabel4; 
    214189    private javax.swing.JScrollPane jScrollPane1; 
Note: See TracChangeset for help on using the changeset viewer.