Closedown

This commit is contained in:
boccioli_m
2015-06-01 11:21:03 +02:00
parent f0b8174d5d
commit d56dfda1a8
2 changed files with 106 additions and 15 deletions

View File

@@ -88,6 +88,8 @@ public class TestingPanel extends Panel {
panel = new javax.swing.JPanel();
panelPlot = new javax.swing.JPanel();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jCheckBox1 = new javax.swing.JCheckBox();
buttonExecute.setText("Execute");
buttonExecute.addActionListener(new java.awt.event.ActionListener() {
@@ -125,6 +127,22 @@ public class TestingPanel extends Panel {
}
});
jButton3.setText("New Test");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(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);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -147,7 +165,11 @@ public class TestingPanel extends Panel {
.addGroup(layout.createSequentialGroup()
.addGap(87, 87, 87)
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, 394, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 168, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton3)
.addComponent(jCheckBox1))
.addGap(0, 69, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jButton2)
@@ -156,15 +178,22 @@ public class TestingPanel extends Panel {
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(buttonExecute)
.addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(buttonExecute)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonAbort))
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(32, 32, 32)
.addComponent(check))
.addGroup(layout.createSequentialGroup()
.addGap(46, 46, 46)
.addComponent(jCheckBox1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonAbort))
.addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(32, 32, 32)
.addComponent(check)
.addComponent(jButton3)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
@@ -177,6 +206,8 @@ public class TestingPanel extends Panel {
.addGap(26, 26, 26)))
.addComponent(panelPlot, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE))
);
jCheckBox1.getAccessibleContext().setAccessibleName("check2");
}// </editor-fold>//GEN-END:initComponents
private void buttonExecuteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExecuteActionPerformed
@@ -261,6 +292,28 @@ public class TestingPanel extends Panel {
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
try {
boolean var1 = jCheckBox1.isSelected();
int var2 = 2;// (Integer)spinner.getValue();
HashMap args = new HashMap();
args.put("relative", var1);
args.put("steps", var2);
run("args", 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_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
@@ -269,6 +322,8 @@ public class TestingPanel extends Panel {
private javax.swing.JCheckBox check;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JCheckBox jCheckBox1;
private javax.swing.JPanel panel;
private javax.swing.JPanel panelPlot;
private javax.swing.JSpinner spinner;