Changeset 92 in tmcsimulator-scriptbuilder for trunk/src/event/editor/AudioPanel.java
- Timestamp:
- 08/28/2017 04:12:45 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/event/editor/AudioPanel.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/event/editor/AudioPanel.java
r89 r92 11 11 * @author nathaniellehrer 12 12 */ 13 public class AudioPanel extends javax.swing.JPanel implements RemoveablePanel,ScriptEventEditorPanel13 public class AudioPanel extends javax.swing.JPanel implements I_ScriptEventEditorPanel 14 14 { 15 15 … … 26 26 } 27 27 28 /**29 * Load the script event associated with this editor panel.30 *31 * @param sei The script event in question32 */33 28 @Override 34 29 public void getEventObject(I_ScriptEvent sei) … … 85 80 } 86 81 87 public void setRemoveListener(ActionListener listener) 88 { 89 removeListener = listener; 90 } 91 82 @Override 92 83 public void update(Observable o, Object arg) 93 84 { … … 113 104 { 114 105 115 removeButton = new javax.swing.JButton();116 106 jLabel1 = new javax.swing.JLabel(); 117 107 audioFileText = new javax.swing.JTextField(); … … 119 109 audioLengthText = new javax.swing.JFormattedTextField(); 120 110 browseButton = new javax.swing.JButton(); 121 122 removeButton.setText("Remove");123 removeButton.setToolTipText("Removes this property");124 removeButton.addMouseListener(new java.awt.event.MouseAdapter()125 {126 public void mouseClicked(java.awt.event.MouseEvent evt)127 {128 removeThisProperty(evt);129 }130 });131 removeButton.addActionListener(new java.awt.event.ActionListener()132 {133 public void actionPerformed(java.awt.event.ActionEvent evt)134 {135 removeButtonActionPerformed(evt);136 }137 });138 111 139 112 jLabel1.setText("Audio File"); … … 162 135 .addContainerGap() 163 136 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 164 .add(org.jdesktop.layout.GroupLayout.TRAILING, removeButton) 137 .add(jLabel1) 138 .add(jLabel2)) 139 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 140 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 165 141 .add(layout.createSequentialGroup() 166 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 167 .add(jLabel1) 168 .add(jLabel2)) 142 .add(audioFileText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 395, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 169 143 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 170 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 171 .add(layout.createSequentialGroup() 172 .add(audioFileText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 395, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) 173 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 174 .add(browseButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)) 175 .add(audioLengthText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE)))) 144 .add(browseButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE)) 145 .add(audioLengthText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE)) 176 146 .addContainerGap()) 177 147 ); … … 179 149 layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) 180 150 .add(layout.createSequentialGroup() 181 .addContainerGap() 182 .add(removeButton) 183 .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) 151 .add(41, 41, 41) 184 152 .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) 185 153 .add(audioFileText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) … … 193 161 ); 194 162 }// </editor-fold>//GEN-END:initComponents 195 196 private void removeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeButtonActionPerformed197 // TODO add your handling code here:198 }//GEN-LAST:event_removeButtonActionPerformed199 200 private void removeThisProperty(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_removeThisProperty201 if (removeListener != null)202 {203 removeListener.actionPerformed(new ActionEvent(this, 0, ""));204 }205 }//GEN-LAST:event_removeThisProperty206 163 207 164 private void browse(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_browse … … 221 178 private javax.swing.JLabel jLabel1; 222 179 private javax.swing.JLabel jLabel2; 223 private javax.swing.JButton removeButton;224 180 // End of variables declaration//GEN-END:variables 225 181
Note: See TracChangeset
for help on using the changeset viewer.
