Changeset 171 in tmcsimulator-scriptbuilder for trunk/src/event/editor/CHPRadioPanel.java
- Timestamp:
- 12/19/2019 06:48:37 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/event/editor/CHPRadioPanel.java (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/CHPRadioPanel.java
r140 r171 110 110 @SuppressWarnings("unchecked") 111 111 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 112 private void initComponents() 113 { 112 private void initComponents() { 114 113 115 114 jLabel4 = new javax.swing.JLabel(); 116 115 audioText = new javax.swing.JTextField(); 117 jButton2 = new javax.swing.JButton();118 116 addDispatchButton = new javax.swing.JButton(); 119 117 deleteSelectedButton = new javax.swing.JButton(); … … 124 122 125 123 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); 136 125 137 126 addDispatchButton.setText("Add Dispatch"); … … 143 132 addFieldButton.setText("Add Field"); 144 133 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) { 149 136 addFieldButtonActionPerformed(evt); 150 137 } … … 164 151 .add(addFieldButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 130, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 165 152 .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)) 167 155 .add(layout.createSequentialGroup() 168 156 .add(jLabel4) 169 157 .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))) 173 159 .addContainerGap()) 174 160 ); … … 179 165 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 180 166 .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)) 183 168 .add(18, 18, 18) 184 169 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) … … 187 172 .add(deleteSelectedButton)) 188 173 .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) 189 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 34 1, Short.MAX_VALUE)174 .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 347, Short.MAX_VALUE) 190 175 .addContainerGap()) 191 176 ); 192 177 }// </editor-fold>//GEN-END:initComponents 193 194 private void browse(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_browse195 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_browse202 178 203 179 private void addFieldButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addFieldButtonActionPerformed … … 210 186 private javax.swing.JTextField audioText; 211 187 private javax.swing.JButton deleteSelectedButton; 212 private javax.swing.JButton jButton2;213 188 private javax.swing.JLabel jLabel4; 214 189 private javax.swing.JScrollPane jScrollPane1;
Note: See TracChangeset
for help on using the changeset viewer.
