|
@@ -10,12 +10,13 @@ import project82usb.usbDeviceList.*;
|
|
|
*
|
|
|
* @author ilysk
|
|
|
*/
|
|
|
-public class devicesmatrix extends javax.swing.JFrame {
|
|
|
+public class devMatrix extends javax.swing.JFrame {
|
|
|
private final usbDeviceList list = new usbDeviceList();
|
|
|
+ private final usbDeviceTree tree = new usbDeviceTree();
|
|
|
/**
|
|
|
* Creates new form devicesmatrix
|
|
|
*/
|
|
|
- public devicesmatrix() {
|
|
|
+ public devMatrix() {
|
|
|
initComponents();
|
|
|
}
|
|
|
|
|
@@ -33,7 +34,8 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
jScrollPane2 = new javax.swing.JScrollPane();
|
|
|
tvOut = new javax.swing.JTextArea();
|
|
|
btnClear = new javax.swing.JButton();
|
|
|
- btnRefresh = new javax.swing.JButton();
|
|
|
+ btnRefreshLow = new javax.swing.JButton();
|
|
|
+ btnRefreshHigh = new javax.swing.JButton();
|
|
|
|
|
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
|
|
|
|
@@ -62,10 +64,17 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- btnRefresh.setText("Refresh");
|
|
|
- btnRefresh.addActionListener(new java.awt.event.ActionListener() {
|
|
|
+ btnRefreshLow.setText("Low API");
|
|
|
+ btnRefreshLow.addActionListener(new java.awt.event.ActionListener() {
|
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
|
- btnRefreshActionPerformed(evt);
|
|
|
+ btnRefreshLowActionPerformed(evt);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ btnRefreshHigh.setText("High API");
|
|
|
+ btnRefreshHigh.addActionListener(new java.awt.event.ActionListener() {
|
|
|
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
|
+ btnRefreshHighActionPerformed(evt);
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -79,7 +88,9 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
|
.addGap(0, 0, Short.MAX_VALUE)
|
|
|
- .addComponent(btnRefresh)
|
|
|
+ .addComponent(btnRefreshHigh)
|
|
|
+ .addGap(18, 18, 18)
|
|
|
+ .addComponent(btnRefreshLow)
|
|
|
.addGap(18, 18, 18)
|
|
|
.addComponent(btnClear))
|
|
|
.addComponent(jScrollPane2))
|
|
@@ -94,7 +105,8 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
|
.addComponent(btnClear)
|
|
|
- .addComponent(btnRefresh))
|
|
|
+ .addComponent(btnRefreshLow)
|
|
|
+ .addComponent(btnRefreshHigh))
|
|
|
.addContainerGap())
|
|
|
);
|
|
|
|
|
@@ -105,10 +117,14 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
this.tvOut.setText("");
|
|
|
}//GEN-LAST:event_btnClearActionPerformed
|
|
|
|
|
|
- private void btnRefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshActionPerformed
|
|
|
+ private void btnRefreshLowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshLowActionPerformed
|
|
|
list.getUsbDeviceList();
|
|
|
list.printDeviceList(this);
|
|
|
- }//GEN-LAST:event_btnRefreshActionPerformed
|
|
|
+ }//GEN-LAST:event_btnRefreshLowActionPerformed
|
|
|
+
|
|
|
+ private void btnRefreshHighActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshHighActionPerformed
|
|
|
+ tree.print(this);
|
|
|
+ }//GEN-LAST:event_btnRefreshHighActionPerformed
|
|
|
|
|
|
/**
|
|
|
* @param args the command line arguments
|
|
@@ -127,20 +143,21 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
}
|
|
|
}
|
|
|
} catch (ClassNotFoundException ex) {
|
|
|
- java.util.logging.Logger.getLogger(devicesmatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
+ java.util.logging.Logger.getLogger(devMatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
} catch (InstantiationException ex) {
|
|
|
- java.util.logging.Logger.getLogger(devicesmatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
+ java.util.logging.Logger.getLogger(devMatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
} catch (IllegalAccessException ex) {
|
|
|
- java.util.logging.Logger.getLogger(devicesmatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
+ java.util.logging.Logger.getLogger(devMatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
|
|
|
- java.util.logging.Logger.getLogger(devicesmatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
+ java.util.logging.Logger.getLogger(devMatrix.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
|
|
}
|
|
|
//</editor-fold>
|
|
|
+ //</editor-fold>
|
|
|
|
|
|
/* Create and display the form */
|
|
|
java.awt.EventQueue.invokeLater(new Runnable() {
|
|
|
public void run() {
|
|
|
- new devicesmatrix().setVisible(true);
|
|
|
+ new devMatrix().setVisible(true);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -151,7 +168,8 @@ public class devicesmatrix extends javax.swing.JFrame {
|
|
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
|
private javax.swing.JButton btnClear;
|
|
|
- private javax.swing.JButton btnRefresh;
|
|
|
+ private javax.swing.JButton btnRefreshHigh;
|
|
|
+ private javax.swing.JButton btnRefreshLow;
|
|
|
private javax.swing.JScrollPane jScrollPane1;
|
|
|
private javax.swing.JScrollPane jScrollPane2;
|
|
|
private javax.swing.JTable jTable1;
|