- Timestamp:
- 01/20/2020 06:28:53 PM (6 years ago)
- Location:
- trunk/src/scriptbuilder/gui
- Files:
-
- 2 edited
-
IncidentPaletteFrame.form (modified) (4 diffs)
-
IncidentPaletteFrame.java (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentPaletteFrame.form
r127 r190 2 2 3 3 <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 <Properties> 5 <Property name="title" type="java.lang.String" value="Incident Palette"/> 6 </Properties> 4 7 <SyntheticProperties> 5 8 <SyntheticProperty name="formSizePolicy" type="int" value="1"/> … … 51 54 <DimensionLayout dim="0"> 52 55 <Group type="103" groupAlignment="0" attributes="0"> 53 <Group type="102" alignment="1" attributes="0"> 54 <EmptySpace max="-2" attributes="0"/> 55 <Component id="txtSearchFilter" max="32767" attributes="0"/> 56 <EmptySpace max="-2" attributes="0"/> 57 <Component id="btnCreateIncident" min="-2" pref="123" max="-2" attributes="0"/> 58 <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> 56 <Group type="102" alignment="0" attributes="0"> 57 <EmptySpace max="-2" attributes="0"/> 58 <Component id="btnCreateIncident" min="-2" max="-2" attributes="0"/> 59 <EmptySpace max="32767" attributes="0"/> 59 60 </Group> 60 61 </Group> … … 64 65 <Group type="102" attributes="0"> 65 66 <EmptySpace max="-2" attributes="0"/> 66 <Group type="103" groupAlignment="3" attributes="0"> 67 <Component id="txtSearchFilter" alignment="3" min="-2" max="-2" attributes="0"/> 68 <Component id="btnCreateIncident" alignment="3" min="-2" max="-2" attributes="0"/> 69 </Group> 67 <Component id="btnCreateIncident" min="-2" max="-2" attributes="0"/> 70 68 <EmptySpace max="32767" attributes="0"/> 71 69 </Group> … … 76 74 <Component class="javax.swing.JButton" name="btnCreateIncident"> 77 75 <Properties> 78 <Property name="text" type="java.lang.String" value="Create New ..."/>76 <Property name="text" type="java.lang.String" value="Create New Incident..."/> 79 77 </Properties> 80 78 <Events> 81 79 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCreateIncidentActionPerformed"/> 82 </Events>83 </Component>84 <Component class="javax.swing.JTextField" name="txtSearchFilter">85 <Events>86 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtSearchFilterActionPerformed"/>87 80 </Events> 88 81 </Component> -
trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
r189 r190 71 71 72 72 initComponents(); 73 74 txtSearchFilter.addKeyListener(new KeyListener()75 {76 77 @Override78 public void keyTyped(KeyEvent e)79 {80 }81 82 @Override83 public void keyPressed(KeyEvent e)84 {85 if (e.getKeyCode() == KeyEvent.VK_ENTER)86 {87 /*This feature has not yet been implemented. Show a message and just return.*/88 if (true)89 {90 JOptionPane.showMessageDialog(txtSearchFilter.getTopLevelAncestor(), "This feature has not yet been implemented.\n",91 "Feature not implemented", JOptionPane.INFORMATION_MESSAGE);92 }93 }94 }95 96 @Override97 public void keyReleased(KeyEvent e)98 {99 }100 });73 //This is a deprecated feature that originally was used to search for text. 74 // txtSearchFilter.addKeyListener(new KeyListener() 75 // { 76 // 77 // @Override 78 // public void keyTyped(KeyEvent e) 79 // { 80 // } 81 // 82 // @Override 83 // public void keyPressed(KeyEvent e) 84 // { 85 // if (e.getKeyCode() == KeyEvent.VK_ENTER) 86 // { 87 // /*This feature has not yet been implemented. Show a message and just return.*/ 88 //// if (true) 89 //// { 90 //// JOptionPane.showMessageDialog(txtSearchFilter.getTopLevelAncestor(), "This feature has not yet been implemented.\n", 91 //// "Feature not implemented", JOptionPane.INFORMATION_MESSAGE); 92 //// } 93 // } 94 // } 95 // 96 // @Override 97 // public void keyReleased(KeyEvent e) 98 // { 99 // } 100 // }); 101 101 102 102 String fs = System.getProperty("file.separator"); … … 281 281 @SuppressWarnings("unchecked") 282 282 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 283 private void initComponents() 284 { 283 private void initComponents() { 285 284 286 285 jPanel1 = new javax.swing.JPanel(); 287 286 btnCreateIncident = new javax.swing.JButton(); 288 txtSearchFilter = new javax.swing.JTextField();289 287 jPanel2 = new javax.swing.JPanel(); 290 288 jScrollPane2 = new javax.swing.JScrollPane(); … … 296 294 labelFileCount = new javax.swing.JLabel(); 297 295 298 btnCreateIncident.setText("Create New...");299 btnCreateIncident.addActionListener(new java.awt.event.ActionListener() 300 {301 public void actionPerformed(java.awt.event.ActionEvent evt)302 {296 setTitle("Incident Palette"); 297 298 btnCreateIncident.setText("Create New Incident..."); 299 btnCreateIncident.addActionListener(new java.awt.event.ActionListener() { 300 public void actionPerformed(java.awt.event.ActionEvent evt) { 303 301 btnCreateIncidentActionPerformed(evt); 304 }305 });306 307 txtSearchFilter.addActionListener(new java.awt.event.ActionListener()308 {309 public void actionPerformed(java.awt.event.ActionEvent evt)310 {311 txtSearchFilterActionPerformed(evt);312 302 } 313 303 }); … … 317 307 jPanel1Layout.setHorizontalGroup( 318 308 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 319 .addGroup(j avax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()309 .addGroup(jPanel1Layout.createSequentialGroup() 320 310 .addContainerGap() 321 .addComponent(txtSearchFilter) 322 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 323 .addComponent(btnCreateIncident, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE) 324 .addGap(23, 23, 23)) 311 .addComponent(btnCreateIncident) 312 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 325 313 ); 326 314 jPanel1Layout.setVerticalGroup( … … 328 316 .addGroup(jPanel1Layout.createSequentialGroup() 329 317 .addContainerGap() 330 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 331 .addComponent(txtSearchFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 332 .addComponent(btnCreateIncident)) 318 .addComponent(btnCreateIncident) 333 319 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 334 320 ); 335 321 336 322 tableCurrentIncidents.setModel(new javax.swing.table.DefaultTableModel( 337 new Object [][] 338 { 323 new Object [][] { 339 324 {null, null, null}, 340 325 {null, null, null}, … … 349 334 {null, null, null} 350 335 }, 351 new String [] 352 { 336 new String [] { 353 337 "Incident #", "Start Time", "Title" 354 338 } 355 ) 356 { 357 Class[] types = new Class [] 358 { 339 ) { 340 Class[] types = new Class [] { 359 341 java.lang.Integer.class, java.lang.String.class, java.lang.String.class 360 342 }; 361 boolean[] canEdit = new boolean [] 362 { 343 boolean[] canEdit = new boolean [] { 363 344 false, false, false 364 345 }; 365 346 366 public Class getColumnClass(int columnIndex) 367 { 347 public Class getColumnClass(int columnIndex) { 368 348 return types [columnIndex]; 369 349 } 370 350 371 public boolean isCellEditable(int rowIndex, int columnIndex) 372 { 351 public boolean isCellEditable(int rowIndex, int columnIndex) { 373 352 return canEdit [columnIndex]; 374 353 } … … 400 379 401 380 btnClosePalette.setText("Done"); 402 btnClosePalette.addActionListener(new java.awt.event.ActionListener() 403 { 404 public void actionPerformed(java.awt.event.ActionEvent evt) 405 { 381 btnClosePalette.addActionListener(new java.awt.event.ActionListener() { 382 public void actionPerformed(java.awt.event.ActionEvent evt) { 406 383 btnClosePaletteActionPerformed(evt); 407 384 } … … 493 470 }//GEN-LAST:event_btnClosePaletteActionPerformed 494 471 495 private void txtSearchFilterActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtSearchFilterActionPerformed496 {//GEN-HEADEREND:event_txtSearchFilterActionPerformed497 // TODO add your handling code here:498 }//GEN-LAST:event_txtSearchFilterActionPerformed499 500 472 501 473 // Variables declaration - do not modify//GEN-BEGIN:variables … … 510 482 private javax.swing.JScrollPane scrollAddPanels; 511 483 private javax.swing.JTable tableCurrentIncidents; 512 private javax.swing.JTextField txtSearchFilter;513 484 // End of variables declaration//GEN-END:variables 514 485
Note: See TracChangeset
for help on using the changeset viewer.
