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

    r140 r171  
    7171    @SuppressWarnings("unchecked") 
    7272    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 
    73     private void initComponents() 
    74     { 
     73    private void initComponents() { 
    7574 
    7675        jLabel1 = new javax.swing.JLabel(); 
     
    7877        jLabel2 = new javax.swing.JLabel(); 
    7978        audioLengthText = new javax.swing.JFormattedTextField(); 
    80         browseButton = new javax.swing.JButton(); 
    8179 
    8280        jLabel1.setText("Audio File"); 
    8381 
    8482        audioFileText.setToolTipText("The path to the audio file"); 
     83        audioFileText.setEnabled(false); 
    8584 
    8685        jLabel2.setText("Length"); 
    8786 
    8887        audioLengthText.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getIntegerInstance()))); 
    89  
    90         browseButton.setText("Browse"); 
    91         browseButton.setToolTipText("Browse for the audio file"); 
    92         browseButton.addMouseListener(new java.awt.event.MouseAdapter() 
    93         { 
    94             public void mouseClicked(java.awt.event.MouseEvent evt) 
    95             { 
    96                 browse(evt); 
    97             } 
    98         }); 
    9988 
    10089        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); 
     
    10998                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
    11099                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    111                     .add(layout.createSequentialGroup() 
    112                         .add(audioFileText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 395, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    113                         .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
    114                         .add(browseButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)) 
    115                     .add(audioLengthText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE)) 
     100                    .add(audioLengthText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE) 
     101                    .add(audioFileText)) 
    116102                .addContainerGap()) 
    117103        ); 
     
    119105            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 
    120106            .add(layout.createSequentialGroup() 
    121                 .add(41, 41, 41) 
     107                .add(44, 44, 44) 
    122108                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
    123109                    .add(audioFileText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 
    124                     .add(jLabel1) 
    125                     .add(browseButton)) 
     110                    .add(jLabel1)) 
    126111                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 
    127112                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 
     
    132117    }// </editor-fold>//GEN-END:initComponents 
    133118 
    134     private void browse(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_browse 
    135         JFileChooser browser = new JFileChooser(); 
    136         int returnVal = browser.showOpenDialog(this); 
    137         if (returnVal == JFileChooser.APPROVE_OPTION) 
    138         { 
    139             audioFileText.setText(browser.getSelectedFile().getPath()); 
    140         } 
    141     }//GEN-LAST:event_browse 
    142  
    143119 
    144120    // Variables declaration - do not modify//GEN-BEGIN:variables 
    145121    private javax.swing.JTextField audioFileText; 
    146122    private javax.swing.JFormattedTextField audioLengthText; 
    147     private javax.swing.JButton browseButton; 
    148123    private javax.swing.JLabel jLabel1; 
    149124    private javax.swing.JLabel jLabel2; 
Note: See TracChangeset for help on using the changeset viewer.