Closedown
This commit is contained in:
@@ -5,25 +5,15 @@
|
||||
import java.awt.Component;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.JLabel;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.swing.Editor.EditorDialog;
|
||||
import ch.psi.pshell.data.PlotDescriptor;
|
||||
import ch.psi.pshell.device.Device;
|
||||
import ch.psi.pshell.device.DeviceAdapter;
|
||||
import ch.psi.pshell.epics.ChannelDouble;
|
||||
import ch.psi.pshell.epics.ChannelInteger;
|
||||
import ch.psi.pshell.plot.LinePlot;
|
||||
import ch.psi.pshell.plot.LinePlotBase;
|
||||
import ch.psi.pshell.plot.LinePlotSeries;
|
||||
import ch.psi.pshell.plot.Plot;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.Chrono;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -34,12 +24,6 @@ public class EnergyScan extends Panel {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
long start;
|
||||
ChannelDouble k1;
|
||||
ChannelDouble k2;
|
||||
ChannelDouble k3;
|
||||
ChannelDouble energy;
|
||||
ChannelInteger otf_start;
|
||||
|
||||
double[] offsets = new double[4];
|
||||
double energyCache = 0;
|
||||
@@ -48,57 +32,6 @@ public class EnergyScan extends Panel {
|
||||
@Override
|
||||
public void onInitialize(int runCount) {
|
||||
super.onInitialize(runCount);
|
||||
|
||||
k1 = (ChannelDouble) getController().getDevicePool().getByName("keithley_1a");
|
||||
k2 = (ChannelDouble) getController().getDevicePool().getByName("keithley_2a");
|
||||
k3 = (ChannelDouble) getController().getDevicePool().getByName("keithley_3a");
|
||||
energy = (ChannelDouble) getController().getDevicePool().getByName("energy");
|
||||
otf_start = (ChannelInteger) getController().getDevicePool().getByName("otf_start");
|
||||
/*
|
||||
otf_start.addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
if (((Integer) value) == 1) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
try {
|
||||
startPlot();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(EnergyScan.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});*/
|
||||
for (Device dev : new Device[]{energy}) {
|
||||
dev.addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
try {
|
||||
if (Math.abs(energyCache - ((Double) value)) > 0.1) {
|
||||
if (radioK3.isSelected()) {
|
||||
k3.update();
|
||||
} else {
|
||||
k1.update();
|
||||
}
|
||||
k2.update();
|
||||
energyCache = (Double) value;
|
||||
if (otf_start.take() == 1) {
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
plot();
|
||||
});
|
||||
update();
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(EnergyScan.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
start = System.currentTimeMillis();
|
||||
|
||||
plot();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -145,30 +78,10 @@ public class EnergyScan extends Panel {
|
||||
}
|
||||
}
|
||||
//spinnerAlpha.setEnabled(enabled && comboMode.getSelectedItem().equals("LINEAR"));
|
||||
}
|
||||
}
|
||||
|
||||
double last = 0;
|
||||
|
||||
void plot() {
|
||||
try {
|
||||
if ((scanPlot != null) && (scanSeries != null)) {
|
||||
//if ((scanPlot != null) && (scanSeries != null) && scanPlot.isShowing() && (count != null)) {
|
||||
double x = energy.take();
|
||||
if (last < (x -10.0)){
|
||||
if (scanSeries!=null){
|
||||
scanSeries.clear();
|
||||
}
|
||||
}
|
||||
last = x;
|
||||
double y = k2.take() / ((radioK3.isSelected()) ? k3.take() : k1.take());
|
||||
scanSeries.appendData(x, y);
|
||||
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void run() throws Exception {
|
||||
HashMap args = new HashMap();
|
||||
@@ -182,7 +95,8 @@ public class EnergyScan extends Panel {
|
||||
args.put("OFFSET2", (Double) spinnerOffset2.getValue());
|
||||
args.put("RUNTYPE", comboRunType.getSelectedItem().toString());
|
||||
args.put("ROUNDS", (Integer) spinnerRounds.getValue());
|
||||
|
||||
args.put("PLOT_TYPE", radioK1.isSelected() ? 1 : 2);
|
||||
|
||||
buttonAbort.setEnabled(true);
|
||||
|
||||
runAsync("EnergyScan", args).handle((ok, ex) -> {
|
||||
@@ -204,14 +118,6 @@ public class EnergyScan extends Panel {
|
||||
}
|
||||
}
|
||||
|
||||
void startPlot() throws Exception {
|
||||
PlotDescriptor descriptors = new PlotDescriptor("Energy Scan");
|
||||
//ArrayList<LinePlot> plots = getController().plot(new PlotDescriptor[]{descriptors}, Chrono.getTimeStr(System.currentTimeMillis(), "hh:mm:ss"));
|
||||
ArrayList<LinePlot> plots = getController().plot(new PlotDescriptor[]{descriptors}, null);
|
||||
scanPlot = (LinePlotBase) plots.get(0);
|
||||
scanSeries = scanPlot.getSeries(0);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
@@ -234,10 +140,9 @@ public class EnergyScan extends Panel {
|
||||
comboRunType = new javax.swing.JComboBox();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
spinnerRounds = new javax.swing.JSpinner();
|
||||
jPanel2 = new javax.swing.JPanel();
|
||||
jLabel12 = new javax.swing.JLabel();
|
||||
radioK1 = new javax.swing.JRadioButton();
|
||||
radioK3 = new javax.swing.JRadioButton();
|
||||
buttonPlot = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
buttonExecute = new javax.swing.JButton();
|
||||
buttonAbort = new javax.swing.JButton();
|
||||
@@ -276,13 +181,23 @@ public class EnergyScan extends Panel {
|
||||
|
||||
jLabel11.setText("Run Type:");
|
||||
|
||||
comboRunType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "+/-", "+", "-" }));
|
||||
comboRunType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "+/-", "+", "-", "LH/LV", "LH", "LV" }));
|
||||
|
||||
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel5.setText("Rounds:");
|
||||
|
||||
spinnerRounds.setModel(new javax.swing.SpinnerNumberModel(1, 1, 10, 1));
|
||||
|
||||
jLabel12.setText("Plot Type:");
|
||||
|
||||
buttonGroupPlot.add(radioK1);
|
||||
radioK1.setSelected(true);
|
||||
radioK1.setText("K2 / K1");
|
||||
radioK1.setMinimumSize(new java.awt.Dimension(100, 22));
|
||||
|
||||
buttonGroupPlot.add(radioK3);
|
||||
radioK3.setText("K2 / K3");
|
||||
|
||||
javax.swing.GroupLayout panelParametersLayout = new javax.swing.GroupLayout(panelParameters);
|
||||
panelParameters.setLayout(panelParametersLayout);
|
||||
panelParametersLayout.setHorizontalGroup(
|
||||
@@ -291,38 +206,47 @@ public class EnergyScan extends Panel {
|
||||
.addContainerGap()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel8)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerOffset1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel8)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerOffset1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerE1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerTime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerE1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerTime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 82, Short.MAX_VALUE)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerE2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerDelay, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerOffset2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addComponent(spinnerE2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerDelay, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerOffset2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel11)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(comboRunType, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel5)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel11)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(comboRunType, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel5)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(41, Short.MAX_VALUE))
|
||||
.addComponent(jLabel12)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioK1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioK3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
);
|
||||
|
||||
panelParametersLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerE1, spinnerTime});
|
||||
@@ -331,6 +255,8 @@ public class EnergyScan extends Panel {
|
||||
|
||||
panelParametersLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerDelay, spinnerE2, spinnerOffset1, spinnerOffset2, spinnerRounds});
|
||||
|
||||
panelParametersLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {radioK1, radioK3});
|
||||
|
||||
panelParametersLayout.setVerticalGroup(
|
||||
panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
@@ -351,67 +277,17 @@ public class EnergyScan extends Panel {
|
||||
.addComponent(spinnerOffset1)
|
||||
.addComponent(jLabel13)
|
||||
.addComponent(spinnerOffset2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(55, 55, 55)
|
||||
.addGap(35, 35, 35)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(comboRunType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel11)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel5)
|
||||
.addComponent(spinnerRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Plot Options"));
|
||||
|
||||
buttonGroupPlot.add(radioK1);
|
||||
radioK1.setSelected(true);
|
||||
radioK1.setText("K1");
|
||||
radioK1.setMinimumSize(new java.awt.Dimension(100, 22));
|
||||
radioK1.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioPlotActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonGroupPlot.add(radioK3);
|
||||
radioK3.setText("K3");
|
||||
radioK3.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioPlotActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonPlot.setText("Clear");
|
||||
buttonPlot.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonPlotActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
||||
jPanel2.setLayout(jPanel2Layout);
|
||||
jPanel2Layout.setHorizontalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel2Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(buttonPlot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(radioK1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(radioK3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(30, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {radioK1, radioK3});
|
||||
|
||||
jPanel2Layout.setVerticalGroup(
|
||||
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(radioK1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(radioK3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 129, Short.MAX_VALUE)
|
||||
.addComponent(buttonPlot)
|
||||
.addComponent(jLabel5)
|
||||
.addComponent(spinnerRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(20, 20, 20)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel12)
|
||||
.addComponent(radioK1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(radioK3))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
@@ -437,11 +313,11 @@ public class EnergyScan extends Panel {
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap(231, Short.MAX_VALUE)
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonAbort, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonExecute, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(231, Short.MAX_VALUE))
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -457,31 +333,22 @@ public class EnergyScan extends Panel {
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(panelParameters, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelParameters, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(16, 16, 16)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(panelParameters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(panelParameters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jPanel2, panelParameters});
|
||||
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void buttonExecuteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExecuteActionPerformed
|
||||
try {
|
||||
startPlot();
|
||||
run();
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
@@ -493,38 +360,20 @@ public class EnergyScan extends Panel {
|
||||
}//GEN-LAST:event_buttonAbortActionPerformed
|
||||
|
||||
EditorDialog dlgConfig;
|
||||
private void buttonPlotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPlotActionPerformed
|
||||
try {
|
||||
//startPlot();
|
||||
//plot();
|
||||
if (scanSeries!=null){
|
||||
scanSeries.clear();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_buttonPlotActionPerformed
|
||||
|
||||
private void radioPlotActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioPlotActionPerformed
|
||||
plot();
|
||||
}//GEN-LAST:event_radioPlotActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.JButton buttonExecute;
|
||||
private javax.swing.ButtonGroup buttonGroupPlot;
|
||||
private javax.swing.JButton buttonPlot;
|
||||
private javax.swing.JComboBox comboRunType;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel12;
|
||||
private javax.swing.JLabel jLabel13;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel8;
|
||||
private javax.swing.JPanel jPanel2;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JPanel panelParameters;
|
||||
private javax.swing.JRadioButton radioK1;
|
||||
|
||||
Reference in New Issue
Block a user