From 0e179546ec06460f7a5df697d3c32156ac0410de Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Mon, 8 Jun 2015 15:49:09 +0200 Subject: [PATCH] Closedown --- plugins/TestingList.form | 13 +++++++++++++ plugins/TestingList.java | 19 +++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/plugins/TestingList.form b/plugins/TestingList.form index 8fd818c..4ff6333 100644 --- a/plugins/TestingList.form +++ b/plugins/TestingList.form @@ -94,5 +94,18 @@ + + + + + + + + + + + + + diff --git a/plugins/TestingList.java b/plugins/TestingList.java index 8a4e856..5659277 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -146,6 +146,7 @@ public class TestingList extends Panel { jButton1 = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); + jCheckBox1 = new javax.swing.JCheckBox(); setLayout(new java.awt.BorderLayout()); @@ -189,6 +190,14 @@ public class TestingList extends Panel { } add(jScrollPane2, java.awt.BorderLayout.PAGE_END); + + jCheckBox1.setText("Select all"); + jCheckBox1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jCheckBox1ActionPerformed(evt); + } + }); + add(jCheckBox1, java.awt.BorderLayout.LINE_START); }// //GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed @@ -208,9 +217,19 @@ public class TestingList extends Panel { SwingUtils.showException(this, ex); } }//GEN-LAST:event_jButton1ActionPerformed + + private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed + int rowD=-1, colT=0; + //search for device name in table + for (int row = 0; row <= jTable1.getRowCount() - 1; row++) { + + jTable1.setValueAt(this.jCheckBox1.isSelected(), rowD, colT); + } + }//GEN-LAST:event_jCheckBox1ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; + private javax.swing.JCheckBox jCheckBox1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTable jTable1; // End of variables declaration//GEN-END:variables