Changeset 69 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui


Ignore:
Timestamp:
08/24/2017 11:50:30 AM (9 years ago)
Author:
bmcguffin
Message:

Updated palette to describe number of incidents currently in script as well as listed in palette.

Location:
trunk/src/scriptbuilder/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/gui/IncidentPaletteFrame.form

    r63 r69  
    121121              <Properties> 
    122122                <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> 
    123                   <Table columnCount="3" rowCount="4"> 
     123                  <Table columnCount="3" rowCount="11"> 
    124124                    <Column editable="false" title="Incident #" type="java.lang.Integer"/> 
    125125                    <Column editable="false" title="Start Time" type="java.lang.String"/> 
     
    179179          <Group type="103" groupAlignment="0" attributes="0"> 
    180180              <Group type="102" alignment="1" attributes="0"> 
    181                   <EmptySpace max="32767" attributes="0"/> 
     181                  <EmptySpace max="-2" attributes="0"/> 
     182                  <Component id="labelFileCount" max="32767" attributes="0"/> 
     183                  <EmptySpace max="-2" attributes="0"/> 
    182184                  <Component id="btnClosePalette" min="-2" max="-2" attributes="0"/> 
    183185                  <EmptySpace max="-2" attributes="0"/> 
     
    187189        <DimensionLayout dim="1"> 
    188190          <Group type="103" groupAlignment="0" attributes="0"> 
    189               <Component id="btnClosePalette" min="-2" max="-2" attributes="0"/> 
     191              <Group type="103" groupAlignment="3" attributes="0"> 
     192                  <Component id="btnClosePalette" alignment="3" min="-2" max="-2" attributes="0"/> 
     193                  <Component id="labelFileCount" alignment="3" min="-2" max="-2" attributes="0"/> 
     194              </Group> 
    190195          </Group> 
    191196        </DimensionLayout> 
     
    200205          </Events> 
    201206        </Component> 
     207        <Component class="javax.swing.JLabel" name="labelFileCount"> 
     208        </Component> 
    202209      </SubComponents> 
    203210    </Container> 
  • trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java

    r63 r69  
    124124        scrollAddPanels.setViewport(new JViewport()); 
    125125        panelAdd.removeAll(); 
     126        labelFileCount.setText("Found "+incList.size()+" available incidents."); 
    126127        for (ScriptIncident inc : incList) 
    127128        { 
     
    129130 
    130131            panelAdd.add(new IncidentPaletteAddPanel(inc, this)); 
    131  
    132             System.out.println(panelAdd.getComponents().length); 
    133  
    134132        } 
    135133        scrollAddPanels.getViewport().add(panelAdd); 
     
    169167            } 
    170168        } 
     169        labelIncidentCount.setText(currentRow + " incidents currently in script."); 
    171170    } 
    172171 
     
    191190        jPanel3 = new javax.swing.JPanel(); 
    192191        btnClosePalette = new javax.swing.JButton(); 
     192        labelFileCount = new javax.swing.JLabel(); 
    193193 
    194194        btnCreateIncident.setText("Create New..."); 
     
    230230                {null, null, null}, 
    231231                {null, null, null}, 
     232                {null, null, null}, 
     233                {null, null, null}, 
     234                {null, null, null}, 
     235                {null, null, null}, 
     236                {null, null, null}, 
     237                {null, null, null}, 
     238                {null, null, null}, 
    232239                {null, null, null} 
    233240            }, 
     
    296303            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    297304            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() 
    298                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     305                .addContainerGap() 
     306                .addComponent(labelFileCount, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 
     307                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 
    299308                .addComponent(btnClosePalette) 
    300309                .addContainerGap()) 
     
    302311        jPanel3Layout.setVerticalGroup( 
    303312            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 
    304             .addComponent(btnClosePalette) 
     313            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 
     314                .addComponent(btnClosePalette) 
     315                .addComponent(labelFileCount)) 
    305316        ); 
    306317 
     
    332343    }// </editor-fold>//GEN-END:initComponents 
    333344 
    334     private void btnClosePaletteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnClosePaletteActionPerformed 
    335     {//GEN-HEADEREND:event_btnClosePaletteActionPerformed 
    336         script.update(); 
    337         this.dispose(); 
    338     }//GEN-LAST:event_btnClosePaletteActionPerformed 
    339  
    340345    private void btnCreateIncidentActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCreateIncidentActionPerformed 
    341346    {//GEN-HEADEREND:event_btnCreateIncidentActionPerformed 
     
    367372    }//GEN-LAST:event_btnCreateIncidentActionPerformed 
    368373 
     374    private void btnClosePaletteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnClosePaletteActionPerformed 
     375    {//GEN-HEADEREND:event_btnClosePaletteActionPerformed 
     376        script.update(); 
     377        this.dispose(); 
     378    }//GEN-LAST:event_btnClosePaletteActionPerformed 
     379 
    369380 
    370381    // Variables declaration - do not modify//GEN-BEGIN:variables 
     
    375386    private javax.swing.JPanel jPanel3; 
    376387    private javax.swing.JScrollPane jScrollPane2; 
     388    private javax.swing.JLabel labelFileCount; 
    377389    private javax.swing.JLabel labelIncidentCount; 
    378390    private javax.swing.JScrollPane scrollAddPanels; 
  • trunk/src/scriptbuilder/gui/panels/IncidentPaletteAddPanel.form

    r64 r69  
    11<?xml version="1.0" encoding="UTF-8" ?> 
    22 
    3 <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> 
     3<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> 
    44  <Properties> 
    55    <Property name="cursor" type="java.awt.Cursor" editor="org.netbeans.modules.form.editors2.CursorEditor"> 
Note: See TracChangeset for help on using the changeset viewer.