Changeset 171 in tmcsimulator-scriptbuilder


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.

Location:
trunk/src/event/editor
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/event/editor/AudioPanel.form

    r92 r171  
    2525              <EmptySpace max="-2" attributes="0"/> 
    2626              <Group type="103" groupAlignment="0" attributes="0"> 
    27                   <Group type="102" alignment="0" attributes="0"> 
    28                       <Component id="audioFileText" min="-2" pref="395" max="-2" attributes="0"/> 
    29                       <EmptySpace max="-2" attributes="0"/> 
    30                       <Component id="browseButton" pref="93" max="32767" attributes="0"/> 
    31                   </Group> 
    32                   <Component id="audioLengthText" alignment="0" pref="497" max="32767" attributes="0"/> 
     27                  <Component id="audioLengthText" pref="497" max="32767" attributes="0"/> 
     28                  <Component id="audioFileText" max="32767" attributes="0"/> 
    3329              </Group> 
    3430              <EmptySpace max="-2" attributes="0"/> 
     
    3935      <Group type="103" groupAlignment="0" attributes="0"> 
    4036          <Group type="102" alignment="0" attributes="0"> 
    41               <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> 
     37              <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> 
    4238              <Group type="103" groupAlignment="3" attributes="0"> 
    4339                  <Component id="audioFileText" alignment="3" min="-2" max="-2" attributes="0"/> 
    4440                  <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 
    45                   <Component id="browseButton" alignment="3" min="-2" max="-2" attributes="0"/> 
    4641              </Group> 
    4742              <EmptySpace max="-2" attributes="0"/> 
     
    6459      <Properties> 
    6560        <Property name="toolTipText" type="java.lang.String" value="The path to the audio file"/> 
     61        <Property name="enabled" type="boolean" value="false"/> 
    6662      </Properties> 
    6763    </Component> 
     
    7874      </Properties> 
    7975    </Component> 
    80     <Component class="javax.swing.JButton" name="browseButton"> 
    81       <Properties> 
    82         <Property name="text" type="java.lang.String" value="Browse"/> 
    83         <Property name="toolTipText" type="java.lang.String" value="Browse for the audio file"/> 
    84       </Properties> 
    85       <Events> 
    86         <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="browse"/> 
    87       </Events> 
    88     </Component> 
    8976  </SubComponents> 
    9077</Form> 
  • 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; 
  • trunk/src/event/editor/CHPRadioPanel.form

    r1 r171  
    2727                      <EmptySpace type="unrelated" max="-2" attributes="0"/> 
    2828                      <Component id="deleteSelectedButton" min="-2" pref="131" max="-2" attributes="0"/> 
     29                      <EmptySpace min="0" pref="331" max="32767" attributes="0"/> 
    2930                  </Group> 
    3031                  <Group type="102" alignment="0" attributes="1"> 
    3132                      <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 
    3233                      <EmptySpace max="-2" attributes="0"/> 
    33                       <Component id="audioText" pref="511" max="32767" attributes="0"/> 
    34                       <EmptySpace type="separate" max="-2" attributes="0"/> 
    35                       <Component id="jButton2" min="-2" pref="130" max="-2" attributes="0"/> 
     34                      <Component id="audioText" max="32767" attributes="0"/> 
    3635                  </Group> 
    3736              </Group> 
     
    4746                  <Component id="audioText" alignment="3" min="-2" max="-2" attributes="0"/> 
    4847                  <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> 
    49                   <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> 
    5048              </Group> 
    5149              <EmptySpace type="separate" max="-2" attributes="0"/> 
     
    5654              </Group> 
    5755              <EmptySpace type="unrelated" max="-2" attributes="0"/> 
    58               <Component id="jScrollPane1" pref="341" max="32767" attributes="0"/> 
     56              <Component id="jScrollPane1" pref="347" max="32767" attributes="0"/> 
    5957              <EmptySpace max="-2" attributes="0"/> 
    6058          </Group> 
     
    7169      <Properties> 
    7270        <Property name="toolTipText" type="java.lang.String" value="The radio audio file"/> 
     71        <Property name="enabled" type="boolean" value="false"/> 
    7372      </Properties> 
    74     </Component> 
    75     <Component class="javax.swing.JButton" name="jButton2"> 
    76       <Properties> 
    77         <Property name="text" type="java.lang.String" value="Browse"/> 
    78         <Property name="toolTipText" type="java.lang.String" value="Browse for the radio audio file"/> 
    79       </Properties> 
    80       <Events> 
    81         <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="browse"/> 
    82       </Events> 
    8373    </Component> 
    8474    <Component class="javax.swing.JButton" name="addDispatchButton"> 
  • 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.