Changeset 69 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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; 
Note: See TracChangeset for help on using the changeset viewer.