Closedown

This commit is contained in:
x07maop
2015-08-24 09:29:40 +02:00
parent a0a6c4103d
commit a39e103e94
4 changed files with 27 additions and 57 deletions

View File

@@ -353,8 +353,8 @@ public class EnergyScan extends Panel {
runAsync("EnergyScan", args).handle((ok, ex) -> {
buttonAbort.setEnabled(false);
if ((ex != null) && (ex instanceof Exception)){
showException((Exception) ex);
if (ex != null){
getLogger().log(Level.WARNING, null, ex);
}
return ok;
});

View File

@@ -45,29 +45,20 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace pref="30" max="32767" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<EmptySpace pref="30" max="32767" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerE2" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerE1" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="45" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jRadioButton1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="spinnerE2" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="spinnerE1" linkSize="2" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="45" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
@@ -131,7 +122,6 @@
<Group type="103" groupAlignment="3" attributes="0">
<Component id="spinnerSleep" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jRadioButton1" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
@@ -217,11 +207,6 @@
<Property name="text" type="java.lang.String" value="End Field:"/>
</Properties>
</Component>
<Component class="javax.swing.JRadioButton" name="jRadioButton1">
<Properties>
<Property name="text" type="java.lang.String" value="jRadioButton1"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel3">

View File

@@ -6,6 +6,7 @@ import ch.psi.pshell.ui.Panel;
import ch.psi.utils.State;
import java.awt.Component;
import java.util.HashMap;
import java.util.logging.Level;
import javax.swing.JLabel;
/**
@@ -69,7 +70,6 @@ public class HystScan extends Panel {
spinnerStartField = new javax.swing.JSpinner();
spinnerEndField = new javax.swing.JSpinner();
jLabel4 = new javax.swing.JLabel();
jRadioButton1 = new javax.swing.JRadioButton();
jPanel3 = new javax.swing.JPanel();
buttonExecute = new javax.swing.JButton();
buttonAbort = new javax.swing.JButton();
@@ -106,30 +106,22 @@ public class HystScan extends Panel {
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel4.setText("End Field:");
jRadioButton1.setText("jRadioButton1");
javax.swing.GroupLayout panelParametersLayout = new javax.swing.GroupLayout(panelParameters);
panelParameters.setLayout(panelParametersLayout);
panelParametersLayout.setHorizontalGroup(
panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelParametersLayout.createSequentialGroup()
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addContainerGap(30, Short.MAX_VALUE)
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelParametersLayout.createSequentialGroup()
.addContainerGap(30, Short.MAX_VALUE)
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelParametersLayout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerE2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelParametersLayout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerE1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE))
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerE2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(panelParametersLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jRadioButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(spinnerE1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
@@ -181,8 +173,7 @@ public class HystScan extends Panel {
.addGap(5, 5, 5)
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(spinnerSleep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel9)
.addComponent(jRadioButton1))
.addComponent(jLabel9))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
@@ -243,7 +234,6 @@ public class HystScan extends Panel {
private void buttonExecuteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExecuteActionPerformed
try {
/*
HashMap args = new HashMap();
Double e1 = (Double) spinnerE1.getValue();
Double e2 = (Double) spinnerE2.getValue();
@@ -254,14 +244,10 @@ public class HystScan extends Panel {
args.put("RAMP_RATE", (Double) spinnerRampRate.getValue());
args.put("ENERGY_CHANGE_SLEEP", (Double) spinnerSleep.getValue());
buttonAbort.setEnabled(true);
runAsync("HystScan", args).handle((ok, ex) -> {
*/
buttonAbort.setEnabled(true);
runAsync("tutorial/01_LineScan").handle((ok, ex) -> {
runAsync("HystScan", args).handle((ok, ex) -> {
buttonAbort.setEnabled(false);
if ((ex != null) && (ex instanceof Exception)){
showException((Exception) ex);
if (ex != null){
getLogger().log(Level.WARNING, null, ex);
}
return ok;
});
@@ -285,7 +271,6 @@ public class HystScan extends Panel {
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel3;
private javax.swing.JRadioButton jRadioButton1;
private javax.swing.JPanel panelParameters;
private javax.swing.JSpinner spinnerE1;
private javax.swing.JSpinner spinnerE2;

View File

@@ -4,7 +4,7 @@
#Uncomment this line to create the simulated devices needed to the tutorial scripts.
run("tutorial/devices")
#run("tutorial/devices")
energy = None