Closedown
This commit is contained in:
@@ -65,155 +65,30 @@ public class TestingList extends Panel {
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
cmTestPS = new javax.swing.JButton();
|
||||
jCheckBox1 = new javax.swing.JCheckBox();
|
||||
jButton4 = new javax.swing.JButton();
|
||||
txtTestPSRes = new javax.swing.JTextField();
|
||||
jButton3 = new javax.swing.JButton();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
txtOutput = new javax.swing.JTextArea();
|
||||
jButton1 = new javax.swing.JButton();
|
||||
|
||||
cmTestPS.setText("Test PS");
|
||||
cmTestPS.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
cmTestPSActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jCheckBox1.setActionCommand("check2");
|
||||
jCheckBox1.setLabel("check2");
|
||||
jCheckBox1.setName("check2"); // NOI18N
|
||||
jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jCheckBox1ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jButton4.setText("Test LS");
|
||||
jButton4.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton4ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jButton3.setText("jButton3");
|
||||
jButton3.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
jButton3ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
txtOutput.setColumns(20);
|
||||
txtOutput.setRows(5);
|
||||
jScrollPane1.setViewportView(txtOutput);
|
||||
jButton1.setText("jButton1");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(33, 33, 33)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(cmTestPS, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGap(293, 293, 293))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jButton3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(58, 58, 58)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(84, 84, 84)
|
||||
.addComponent(txtTestPSRes, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(jCheckBox1)
|
||||
.addGap(0, 74, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
.addGap(33, 33, 33)
|
||||
.addComponent(jButton1)
|
||||
.addContainerGap(708, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(46, 46, 46)
|
||||
.addComponent(jCheckBox1))
|
||||
.addComponent(jButton3))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(txtTestPSRes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(cmTestPS))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jButton4))
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(542, Short.MAX_VALUE))
|
||||
.addGap(42, 42, 42)
|
||||
.addComponent(jButton1)
|
||||
.addContainerGap(606, Short.MAX_VALUE))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void cmTestPSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmTestPSActionPerformed
|
||||
try {
|
||||
boolean var1 = jCheckBox1.isSelected();
|
||||
int var2 = 2;// (Integer)spinner.getValue();
|
||||
int result;
|
||||
|
||||
HashMap args = new HashMap();
|
||||
args.put("relative", var1);
|
||||
args.put("steps", var2);
|
||||
run("power-supply", args);
|
||||
|
||||
//try to print the result
|
||||
txtTestPSRes.setText(args.get("steps").toString());
|
||||
|
||||
|
||||
//evalAsync("run('args', locals = {'relative':" + (var1 ? "True" :"False") + ", 'steps':" + var2 + "})");
|
||||
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(this, ex);
|
||||
} // TODO add your handling code here:
|
||||
}//GEN-LAST:event_cmTestPSActionPerformed
|
||||
|
||||
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
|
||||
// TODO add your handling code here:
|
||||
try {
|
||||
boolean var1 = jCheckBox1.isSelected();
|
||||
int var2 = 2;// (Integer)spinner.getValue();
|
||||
|
||||
HashMap args = new HashMap();
|
||||
args.put("relative", var1);
|
||||
args.put("steps", var2);
|
||||
run("motor-slide", args);
|
||||
|
||||
//evalAsync("run('args', locals = {'relative':" + (var1 ? "True" :"False") + ", 'steps':" + var2 + "})");
|
||||
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(this, ex);
|
||||
} // TODO add your handling code here:
|
||||
}//GEN-LAST:event_jButton4ActionPerformed
|
||||
|
||||
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
|
||||
|
||||
// TODO add your handling code here:
|
||||
txtOutput.setText("Working Directory = " +
|
||||
System.getProperty("user.dir"));
|
||||
}//GEN-LAST:event_jButton3ActionPerformed
|
||||
|
||||
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_jCheckBox1ActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton cmTestPS;
|
||||
private javax.swing.JButton jButton3;
|
||||
private javax.swing.JButton jButton4;
|
||||
private javax.swing.JCheckBox jCheckBox1;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JTextArea txtOutput;
|
||||
private javax.swing.JTextField txtTestPSRes;
|
||||
private javax.swing.JButton jButton1;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user