This commit is contained in:
gac-iss
2020-01-20 09:59:53 +01:00
commit 72f7c18615
7 changed files with 2310 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/target/

49
nbactions.xml Normal file
View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath;C:\Users\gac-ISS\Dev\pshell\bin\pshell-1.14.0-fat.jar --add-opens java.base/jdk.internal.loader=ALL-UNNAMED ch.psi.pshell.ui.App -home=C:\Users\gac-ISS\Dev\pshell\home -pini</exec.args>
<exec.executable>java</exec.executable>
<exec.workingdir>../../home</exec.workingdir>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath;C:\Users\gac-ISS\Dev\pshell\bin\pshell-1.14.0-fat.jar --add-opens java.base/jdk.internal.loader=ALL-UNNAMED ch.psi.pshell.ui.App -home=C:\Users\gac-ISS\Dev\pshell\home -pini</exec.args>
<exec.executable>java</exec.executable>
<jpda.listen>true</jpda.listen>
<exec.workingdir>../../home</exec.workingdir>
</properties>
</action>
<action>
<actionName>profile</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>org.codehaus.mojo:exec-maven-plugin:1.2.1:exec</goal>
</goals>
<properties>
<exec.args>-classpath %classpath;C:\Users\gac-ISS\Dev\pshell\bin\pshell-1.14.0-fat.jar --add-opens java.base/jdk.internal.loader=ALL-UNNAMED ch.psi.pshell.ui.App -home=C:\Users\gac-ISS\Dev\pshell\home -pini</exec.args>
<exec.executable>java</exec.executable>
<exec.workingdir>../../home</exec.workingdir>
</properties>
</action>
</actions>

79
pom.xml Normal file
View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ch.psi</groupId>
<artifactId>Scienta</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<repositories>
<repository>
<id>jcenter</id>
<name>jcenter</name>
<url>https://jcenter.bintray.com/</url>
</repository>
<repository>
<id>freehep</id>
<name>freehep</name>
<url>http://java.freehep.org/maven2/</url>
</repository>
<repository>
<id>imagej</id>
<name>imagej</name>
<url>http://maven.imagej.net/content/repositories/public</url>
</repository>
<repository>
<id>bintray-hltools</id>
<name>bintray</name>
<url>https://dl.bintray.com/paulscherrerinstitute/hltools</url>
</repository>
</repositories>
<name>Scienta</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pshell</artifactId>
<version>1.14.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Generate jar with dependencies -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
<!--
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
-->
<!-- Copy to PShell folder -->
<outputDirectory>../../home/extensions</outputDirectory>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

29
src/main/assembly/src.xml Normal file
View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
-->
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
<!-- TODO: a jarjar format would be better -->
<id>jar-with-dependencies</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<!-- This is not to include the dependencies of dependencies -->
<useTransitiveDependencies>false</useTransitiveDependencies>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>

554
src/main/java/Scienta.java Normal file
View File

@@ -0,0 +1,554 @@
import ch.psi.pshell.device.AccessType;
import ch.psi.pshell.device.ArrayCalibration;
import ch.psi.pshell.device.CameraImageDescriptor;
import ch.psi.pshell.device.MatrixCalibration;
import ch.psi.pshell.device.Device;
import ch.psi.pshell.device.DeviceAdapter;
import ch.psi.pshell.device.Readable.ReadableCalibratedArray;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import ch.psi.pshell.epics.*;
/**
* Implementation of Scienta spectrometer analyser.
*/
public class Scienta extends AreaDetector {
final ChannelInteger slices, frames;
final ChannelDouble lowEnergy, centerEnergy, highEnergy, stepSize, stepTime, energyWidth;
final ChannelDoubleArray spectrum, image, extio;
final ChannelDouble currentChannel, totalPoints;
final ChannelDouble channelBegin, channelEnd, sliceBegin, sliceEnd;
final ChannelString lensMode, acquisitionMode, passEnergy;
final ChannelInteger numChannels, numSlices;
final ChannelDouble acquisitionTime;
final Stats[] stats;
final String channelCtrl;
public Scienta(final String name, final String channelPrefix) {
this(name, channelPrefix + ":cam1", channelPrefix + ":image1");
}
public Scienta(String name, String channelCtrl, String channelData) {
super(name, channelCtrl, channelData);
this.channelCtrl = channelCtrl;
slices = new ChannelInteger(name + " slices", channelCtrl + ":SLICES", false);
frames = new ChannelInteger(name + " frames", channelCtrl + ":FRAMES", false);
lowEnergy = new ChannelDouble(name + " low energy", channelCtrl + ":LOW_ENERGY", 3, false);
centerEnergy = new ChannelDouble(name + " center energy", channelCtrl + ":CENTRE_ENERGY", 3, false);
highEnergy = new ChannelDouble(name + " high energy", channelCtrl + ":HIGH_ENERGY", 3, false);
stepSize = new ChannelDouble(name + " step size", channelCtrl + ":STEP_SIZE", 3, false);
stepTime = new ChannelDouble(name + " step time", channelCtrl + ":STEP_TIME", 3, false);
energyWidth = new ChannelDouble(name + " energy width", channelCtrl + ":ENERGY_WIDTH_RBV", 3, false);
energyWidth.setAccessType(AccessType.Read);
passEnergy = new ChannelString(name + " pass energy", channelCtrl + ":PASS_ENERGY", false);
lensMode = new ChannelString(name + " lens mode", channelCtrl + ":LENS_MODE", false);
acquisitionMode = new ChannelString(name + " lens mode", channelCtrl + ":ACQ_MODE", false);
channelBegin = new ChannelDouble(name + " channel begin", channelCtrl + ":CHANNEL_BEGIN_RBV", 3, false);
channelBegin.setAccessType(AccessType.Read);
channelEnd = new ChannelDouble(name + " channel end", channelCtrl + ":CHANNEL_END_RBV", 3, false);
channelEnd.setAccessType(AccessType.Read);
sliceBegin = new ChannelDouble(name + " slice begin", channelCtrl + ":SLICE_BEGIN_RBV", 3, false);
sliceBegin.setAccessType(AccessType.Read);
sliceEnd = new ChannelDouble(name + " slice end", channelCtrl + ":SLICE_END_RBV", 3, false);
sliceEnd.setAccessType(AccessType.Read);
numChannels = new ChannelInteger(name + " num channels", channelCtrl + ":NUM_CHANNELS_RBV", false);
numChannels.setAccessType(AccessType.Read);
numSlices = new ChannelInteger(name + " num slices", channelCtrl + ":SLICES_RBV", false);
numSlices.setAccessType(AccessType.Read);
numChannels.addListener(new DeviceAdapter() {
@Override
public void onValueChanged(Device device, Object value, Object former) {
try {
if (value != null) {
spectrum.setSize((Integer) value);
}
} catch (IOException ex) {
getLogger().log(Level.WARNING, null, ex);
}
}
});
acquisitionTime = new ChannelDouble(name + " acquire time", channelCtrl + ":TOTAL_ACQ_TIME_RBV", 3, false);
acquisitionTime.setAccessType(AccessType.Read);
/*
spectrum = new ChannelDoubleArray(name + " spectrum", channelCtrl + ":INT_SPECTRUM", 8, 200, false) {
@Override
protected double[] doRead() throws IOException, InterruptedException {
numChannels.getValue();
return super.doRead();
}
};
spectrum.setAccessType(AccessType.Read);
*/
spectrum = new ScientaSpectrum();
image = new ChannelDoubleArray(name + " image", channelCtrl + ":IMAGE", 8, -1, false);
image.setAccessType(AccessType.Read);
extio = new ChannelDoubleArray(name + " extio", channelCtrl + ":EXTIO", 8, -1, false);
extio.setAccessType(AccessType.Read);
currentChannel = new ChannelDouble(name + " current channel", channelCtrl + ":CURRENT_CHANNEL_RBV", 0, false);
currentChannel.setAccessType(AccessType.Read);
totalPoints = new ChannelDouble(name + " total points", channelCtrl + ":TOTAL_POINTS_RBV", 0, false);
totalPoints.setAccessType(AccessType.Read);
addChildren(new Device[]{slices, frames,
lowEnergy, centerEnergy, highEnergy, stepSize, stepTime, energyWidth,
spectrum, image, extio,
currentChannel, totalPoints,
channelBegin, channelEnd, sliceBegin, sliceEnd,
passEnergy, lensMode, acquisitionMode,
numChannels, numSlices, acquisitionTime
});
stats = new Stats[5];
stats[0] = new Stats("CountsR1", 1);
stats[1] = new Stats("CountsR2", 2);
stats[2] = new Stats("CountsR3", 3);
stats[3] = new Stats("CountsR4", 4);
stats[4] = new Stats("Counts", 5);
addChildren(stats);
}
public class ScientaSpectrum extends ChannelDoubleArray implements ReadableCalibratedArray<double[]> {
ScientaSpectrum() {
super(Scienta.this.getName() + " spectrum", channelCtrl + ":INT_SPECTRUM", 8, 200, false);
setAccessType(AccessType.Read);
}
@Override
protected double[] doRead() throws IOException, InterruptedException {
numChannels.getValue();
return super.doRead();
}
@Override
public ArrayCalibration getCalibration() {
double scale = 1.0;
double offset = 0.0;
try {
List<Double> channelRange = getChannelRange();
Double cb = channelRange.get(0);
Double ce = channelRange.get(1);
scale = (ce - cb) / Math.max(numChannels.getValue() - 1, 1);
offset = cb;
} catch (Exception ex) {
}
return new ArrayCalibration(scale, offset);
}
}
@Override
protected void doSetSimulated() {
super.doSetSimulated();
setCache(channelBegin, 50.0);
setCache(channelEnd, 150.0);
setCache(sliceBegin, -20.0);
setCache(sliceEnd, 20.0);
setCache(numChannels, 100);
setCache(numSlices, 10);
setCache(spectrum, new double[100]);
setCache(currentChannel, 0.0);
setCache(totalPoints, 100.0);
setCache(passEnergy, String.valueOf(PASS_ENERGY_VALUES[0]));
setCache(lensMode, LensMode.Transmission.toString());
setCache(acquisitionMode, AcquisitionMode.Fixed.toString());
setCache(acquisitionTime, 10.0);
setSimulatedValue("ENERGY_MODE", EnergyMode.Binding.toString());
setSimulatedValue("DETECTOR_MODE", DetectorMode.Pulse_Counting.toString());
setSimulatedValue("ELEMENT_SET", ElementSet.R4000HE.toString());
//setSimulatedValue("ACQ_MODE", AcquisitionMode.Fixed.toString());
//setSimulatedValue("LENS_MODE", LensMode.Angular45.toString());
//setSimulatedValue("PASS_ENERGY", String.valueOf(PASS_ENERGY_VALUES[0]));
}
@Override
protected void doUpdate() throws IOException, InterruptedException {
super.doUpdate();
numChannels.update();
currentChannel.update();
slices.update();
lowEnergy.update();
centerEnergy.update();
highEnergy.update();
energyWidth.update();
stepSize.update();
stepTime.update();
totalPoints.update();
passEnergy.update();
lensMode.update();
acquisitionMode.update();
acquisitionTime.update();
//channelBegin.update();
//channelEnd.update();
///sliceBegin.update();
//sliceEnd.update();
}
@Override
protected void doSetMonitored(boolean value) {
super.doSetMonitored(value);
numChannels.setMonitored(value);
currentChannel.setMonitored(value);
slices.setMonitored(value);
lowEnergy.setMonitored(value);
centerEnergy.setMonitored(value);
highEnergy.setMonitored(value);
energyWidth.setMonitored(value);
stepSize.setMonitored(value);
stepTime.setMonitored(value);
totalPoints.setMonitored(value);
passEnergy.setMonitored(value);
lensMode.setMonitored(value);
acquisitionMode.setMonitored(value);
acquisitionTime.setMonitored(value);
//channelBegin.setMonitored(value);
//channelEnd.setMonitored(value);
//sliceBegin.setMonitored(value);
//sliceEnd.setMonitored(value);
}
@Override
protected CameraImageDescriptor doReadImageDescriptor() throws IOException, InterruptedException {
CameraImageDescriptor ret = super.doReadImageDescriptor();
List<Double> channelRange = getChannelRange();
List<Double> sliceRange = getSliceRange();
Double cb = channelRange.get(0);
Double ce = channelRange.get(1);
Double sb = sliceRange.get(0);
Double se = sliceRange.get(1);
if ((cb == null) || (ce == null) || (sb == null) || (se == null) || (ret.width == 0) || (ret.height == 0)) {
ret.calibration = null;
} else {
double scaleX = (ce - cb) / Math.max(ret.width - 1, 1);
double offsetX = cb;
double scaleY = (se - sb) / Math.max(ret.height - 1, 1);
double offsetY = sb;
ret.calibration = new MatrixCalibration(scaleX, scaleY, offsetX, offsetY);
}
return ret;
}
//Modes
public enum AcquisitionMode {
Swept,
Fixed
}
public void setAcquisitionMode(AcquisitionMode mode) throws IOException, InterruptedException {
//writeCtrlEnum("ACQ_MODE", String.valueOf(mode));
acquisitionMode.write(String.valueOf(mode));
}
public AcquisitionMode getAcquisitionMode() throws IOException, InterruptedException {
//return (AcquisitionMode) readCtrlEnum("ACQ_MODE", AcquisitionMode.class);
String val = acquisitionMode.getValue();
return (AcquisitionMode) convertCtrlEnum(val, AcquisitionMode.class);
}
public enum EnergyMode {
Binding,
Kinetic
}
public void setEnergyMode(EnergyMode mode) throws IOException, InterruptedException {
writeCtrlEnum("ENERGY_MODE", String.valueOf(mode));
}
public EnergyMode getEnergyMode() throws IOException, InterruptedException {
return (EnergyMode) readCtrlEnum("ENERGY_MODE", EnergyMode.class);
}
public enum LensMode {
Transmission,
T_HiPPHAXPES,
A_HiPPHAXPES,
Jet_X12,
Jet_X5,
A_HiPP_0p52,
Jet_X8,//(floating),
Ztest
}
public void setLensMode(LensMode mode) throws IOException, InterruptedException {
//writeCtrlEnum("LENS_MODE", String.valueOf(mode));
lensMode.write(mode.equals(LensMode.Jet_X8) ? "Jet_X8(floating)" : String.valueOf(mode));
}
public LensMode getLensMode() throws IOException, InterruptedException {
//return (LensMode) readCtrlEnum("LENS_MODE", LensMode.class);
String val = lensMode.getValue();
return "Jet_X8(floating)".equals(val) ? LensMode.Jet_X8 : convertCtrlEnum(val, LensMode.class);
}
public enum DetectorMode {
Pulse_Counting,
ADC
}
public void setDetectorMode(DetectorMode mode) throws IOException, InterruptedException {
writeCtrlEnum("DETECTOR_MODE", String.valueOf(mode));
}
public DetectorMode getDetectorMode() throws IOException, InterruptedException {
return (DetectorMode) readCtrlEnum("DETECTOR_MODE", DetectorMode.class);
}
public enum ElementSet {
R4000HE,
HiPPHAXPES,
HiPP_Acc
}
public void setElementSet(ElementSet mode) throws IOException, InterruptedException {
writeCtrlEnum("ELEMENT_SET", String.valueOf(mode));
}
public ElementSet getElementSet() throws IOException, InterruptedException {
return (ElementSet) readCtrlEnum("ELEMENT_SET", ElementSet.class);
}
public static final int[] PASS_ENERGY_VALUES = new int[]{2, 5, 10, 20, 50, 100, 200};
public void setPassEnergy(int energy) throws IOException, InterruptedException {
//writeCtrl("PASS_ENERGY", String.valueOf(energy));
passEnergy.write(String.valueOf(energy));
}
public int getPassEnergy() throws IOException, InterruptedException {
//String ret = (String) readCtrl("PASS_ENERGY", String.class);
String ret = passEnergy.getValue();
try {
return Integer.valueOf(ret);
} catch (Exception ex) {
throw new DeviceInvalidParameterException("Pass Energy", ret);
}
}
public void zeroSupplies() throws IOException, InterruptedException {
writeCtrl("ZERO_SUPPLIES", 1);
}
//Progress
//Disconnected operations
public double getProgress() {
Double cur = currentChannel.take();
Double total = totalPoints.take();
if ((cur == null) || (total == null) || (total == 0)) {
return 0.0;
}
return cur / total;
}
public double[] getSpectrumX() throws IOException, InterruptedException {
List<Double> range = getChannelRange();
Double begin = range.get(0);
Double end = range.get(1);
double[] spectrum = getSpectrum().take();
if ((begin == null) || (end == null) || (spectrum == null)) {
return null;
}
int spectrumSize = spectrum.length;
double step = (end - begin) / (spectrumSize - 1);
double[] x = new double[spectrumSize];
for (int i = 0; i < spectrumSize; i++) {
x[i] = begin + step * i;
}
return x;
}
//Direct register access
public ChannelInteger getSlices() {
return slices;
}
public ChannelInteger getFrames() {
return frames;
}
public ChannelDouble getLowEnergy() {
return lowEnergy;
}
public ChannelDouble getCenterEnergy() {
return centerEnergy;
}
public ChannelDouble getHighEnergy() {
return highEnergy;
}
public ChannelDouble getStepSize() {
return stepSize;
}
public ChannelDouble getStepTime() {
return stepTime;
}
public ChannelDouble getEnergyWidth() {
return energyWidth;
}
public ChannelDoubleArray getSpectrum() {
return spectrum;
}
public ChannelDoubleArray getImage() {
return image;
}
public ChannelDoubleArray getExtio() {
return extio;
}
public ChannelDouble getChannelBegin() {
return channelBegin;
}
public ChannelDouble getChannelEnd() {
return channelEnd;
}
public ChannelDouble getSliceBegin() {
return sliceBegin;
}
public ChannelDouble getSliceEnd() {
return sliceEnd;
}
public ChannelDouble getAcquisitionTime() {
return acquisitionTime;
}
public List<Double> getChannelRange() throws IOException, InterruptedException {
ArrayList<Double> ret = new ArrayList<>();
//ret.add(getChannelBegin().getValue());
//ret.add(getChannelEnd().getValue());
switch (getAcquisitionMode()) {
case Swept:
ret.add(lowEnergy.getValue());
ret.add(highEnergy.getValue());
break;
case Fixed:
default:
double eCenter = centerEnergy.getValue();
int ePass = getPassEnergy();
double xe = 0.04464;
double xn = 0.04464;
ret.add(eCenter - xe * ePass);
ret.add(eCenter + xn * ePass);
break;
}
return ret;
}
public List<Double> getSliceRange() throws IOException, InterruptedException {
ArrayList<Double> ret = new ArrayList<>();
//ret.add(sliceBegin.getValue());
//ret.add(sliceEnd.getValue());
try {
switch (getLensMode()) {
//TODO:
/*
case Angular45:
ret.add(-28.148);
ret.add(27.649);
break;
case Angular60:
ret.add(-34.736);
ret.add(34.119);
break;
*/
case Transmission:
default:
ret.add(-2.332);
ret.add(2.291);
break;
}
} catch (Exception ex) {
ret.add(Double.NaN);
ret.add(Double.NaN);
}
return ret;
}
public ChannelInteger getNumChannels() {
return numChannels;
}
public ChannelInteger getNumSlices() {
return numSlices;
}
public ChannelDouble getTotalChannels() {
return totalPoints;
}
public ChannelDouble getCurrentChannel() {
return currentChannel;
}
public Stats[] getStats() {
return stats;
}
public class Stats extends ChannelDouble {
final int index;
final ChannelInteger uid;
Stats(String name, int index) {
super(name, channelCtrl.split(":")[0] + ":Stats" + index + ":Total_RBV", 3, false);
this.index = index;
uid = new ChannelInteger(name + " uid", channelCtrl.split(":")[0] + ":Stats" + index + ":UniqueId_RBV", false);
//setParent(Scienta.this);
addChild(uid);
}
@Override
public boolean isReady() throws IOException, InterruptedException {
Integer imageCounter = getImageCounter().getValue();
if (imageCounter == null) {
return false;
}
Integer id = uid.take();
if ((id == null) || (!imageCounter.equals(id))) {
uid.update();
}
return imageCounter.equals(uid.take());
}
@Override
public Double read() throws IOException, InterruptedException {
assertInitialized();
waitReady(10000);
return super.read();
}
public int getUID() throws IOException, InterruptedException {
return uid.getValue();
}
}
}

View File

@@ -0,0 +1,700 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="cameraPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="scientaPanel" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="cameraPanel" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Component id="scientaPanel" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="ch.psi.pshell.swing.CameraPanel" name="cameraPanel">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="null"/>
</Property>
</Properties>
</Component>
<Container class="javax.swing.JPanel" name="scientaPanel">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel5" alignment="0" max="32767" attributes="0"/>
<Component id="plotSpectrum" alignment="0" max="32767" attributes="0"/>
<Component id="jPanel6" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="jPanel6" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jPanel5" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="plotSpectrum" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel5">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Progress"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="valueCurrent" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="valueTotal" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="progress" pref="0" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel6" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="valueCurrent" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="valueTotal" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="progress" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel16" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JProgressBar" name="progress">
<Properties>
<Property name="maximum" type="int" value="1000"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel6">
<Properties>
<Property name="text" type="java.lang.String" value="Current point:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueCurrent">
<Properties>
<Property name="decimals" type="int" value="0"/>
<Property name="enabled" type="boolean" value="false"/>
<Property name="maxValue" type="double" value="100000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel16">
<Properties>
<Property name="text" type="java.lang.String" value="Total:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueTotal">
<Properties>
<Property name="decimals" type="int" value="0"/>
<Property name="enabled" type="boolean" value="false"/>
<Property name="maxValue" type="double" value="100000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="plotSpectrum">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Spectrum"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="plot" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="plot" max="32767" attributes="0"/>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="ch.psi.pshell.plot.LinePlotJFree" name="plot">
<Properties>
<Property name="title" type="java.lang.String" value=""/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel6">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Component id="jPanel4" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jPanel1" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jPanel2" max="32767" attributes="0"/>
<Group type="102" attributes="0">
<Component id="buttonZeroSupplies" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="jPanel4" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jPanel1" linkSize="6" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonZeroSupplies" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javax.swing.JPanel" name="jPanel1">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Modes"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel5" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel4" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel3" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="comboLens" linkSize="10" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="comboAcquisition" linkSize="10" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="comboElement" linkSize="10" min="-2" max="-2" attributes="0"/>
<Component id="comboDetector" linkSize="10" min="-2" max="-2" attributes="0"/>
<Component id="comboEnergy" linkSize="10" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboLens" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboAcquisition" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboEnergy" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboDetector" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="comboElement" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="17" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Lens:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboLens">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboLensActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Acquisition:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboAcquisition">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboAcquisitionActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel3">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Energy:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboEnergy">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboEnergyActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel4">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Detector:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboDetector">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboDetectorActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel5">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Element:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboElement">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="4">
<StringItem index="0" value="Item 1"/>
<StringItem index="1" value="Item 2"/>
<StringItem index="2" value="Item 3"/>
<StringItem index="3" value="Item 4"/>
</StringArray>
</Property>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboElementActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel4">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Energy"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel15" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel14" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel13" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel12" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel11" linkSize="8" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="valueWidth" linkSize="4" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueHigh" linkSize="4" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueCenter" linkSize="4" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="comboPass" linkSize="4" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueLow" linkSize="4" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel11" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="comboPass" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel12" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="valueLow" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel13" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="valueCenter" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel14" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="valueHigh" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel15" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="valueWidth" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="17" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel11">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Pass:"/>
</Properties>
</Component>
<Component class="javax.swing.JComboBox" name="comboPass">
<Properties>
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
<StringArray count="7">
<StringItem index="0" value="2"/>
<StringItem index="1" value="5"/>
<StringItem index="2" value="10"/>
<StringItem index="3" value="20"/>
<StringItem index="4" value="50"/>
<StringItem index="5" value="100"/>
<StringItem index="6" value="200"/>
</StringArray>
</Property>
<Property name="toolTipText" type="java.lang.String" value=""/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboPassActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel12">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Low:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueLow">
<Properties>
<Property name="decimals" type="int" value="2"/>
<Property name="maxValue" type="double" value="2000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel13">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Center:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueCenter">
<Properties>
<Property name="decimals" type="int" value="2"/>
<Property name="maxValue" type="double" value="2000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel14">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="High:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueHigh">
<Properties>
<Property name="decimals" type="int" value="2"/>
<Property name="maxValue" type="double" value="2000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel15">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Width:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueWidth">
<Properties>
<Property name="decimals" type="int" value="2"/>
<Property name="enabled" type="boolean" value="false"/>
<Property name="maxValue" type="double" value="2000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="jPanel2">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo">
<TitledBorder title="Step"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel9" linkSize="3" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel8" linkSize="3" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="valueSize" linkSize="11" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueTime" linkSize="11" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="jLabel10" linkSize="3" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="valueSlices" linkSize="11" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<Component id="jLabel17" linkSize="3" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="valueIterations" linkSize="11" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueSlices" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueTime" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueSize" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel17" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="valueIterations" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel8">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Time:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueTime">
<Properties>
<Property name="decimals" type="int" value="2"/>
<Property name="maxValue" type="double" value="1000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel9">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Size:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueSize">
<Properties>
<Property name="decimals" type="int" value="2"/>
<Property name="maxValue" type="double" value="1000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel10">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Slices:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueSlices">
<Properties>
<Property name="decimals" type="int" value="0"/>
<Property name="maxValue" type="double" value="1000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel17">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Iter:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueIterations">
<Properties>
<Property name="decimals" type="int" value="0"/>
<Property name="maxValue" type="double" value="1000.0"/>
<Property name="minValue" type="double" value="0.0"/>
<Property name="showButtons" type="boolean" value="false"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JButton" name="buttonZeroSupplies">
<Properties>
<Property name="text" type="java.lang.String" value="Zero Supplies"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonZeroSuppliesActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
</SubComponents>
</Form>

View File

@@ -0,0 +1,898 @@
import ch.psi.pshell.device.Device;
import ch.psi.pshell.device.DeviceAdapter;
import ch.psi.pshell.device.DeviceListener;
import ch.psi.pshell.plot.LinePlotSeries;
import ch.psi.pshell.plot.Plot;
import ch.psi.utils.State;
import ch.psi.utils.swing.SwingUtils;
import java.awt.Component;
import java.io.IOException;
import java.util.logging.Level;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.SwingUtilities;
import ch.psi.pshell.swing.*;
/**
*
*/
public final class ScientaPanel extends DevicePanel {
LinePlotSeries spectrumSeries;
public ScientaPanel() {
initComponents();
spectrumSeries = new LinePlotSeries("intensity");
plot.getAxis(Plot.AxisId.X).setLabel("Channels");
plot.getAxis(Plot.AxisId.Y).setLabel("Intensity");
plot.addSeries(spectrumSeries);
plot.setUpdatesEnabled(false);
//plot.getAxis(Plot.AxisId.X).setRange(-0.1, 50000.1);
//plot.getAxis(Plot.AxisId.Y).setRange(-0.6, 0.6);
plot.setQuality(Plot.Quality.Low);
ValueSelection.ValueSelectionListener valueListener = (ValueSelection origin, double value, boolean editing) -> {
if (editing) {
try {
if (origin == valueLow) {
getDevice().getLowEnergy().writeAsync(value);
} else if (origin == valueCenter) {
getDevice().getCenterEnergy().writeAsync(value);
} else if (origin == valueHigh) {
getDevice().getHighEnergy().writeAsync(value);
} else if (origin == valueTime) {
getDevice().getStepTime().writeAsync(value);
} else if (origin == valueSize) {
getDevice().getStepSize().writeAsync(value);
} else if (origin == valueSlices) {
getDevice().getSlices().writeAsync((int) value);
} else if (origin == valueIterations) {
getDevice().setIterations((int) value);
}/*else if (origin == valueFrames) {
getDevice().getFrames().writeAsync((int) value);
}*/
} catch (Exception ex) {
showException(ex);
}
}
};
for (Component vs : SwingUtils.getComponentsByType(this, ValueSelection.class)) {
if (((ValueSelection) vs).isEnabled()) {
((ValueSelection) vs).addListener(valueListener);
}
}
SwingUtils.setEnumCombo(comboLens, Scienta.LensMode.class);
SwingUtils.setEnumCombo(comboElement, Scienta.ElementSet.class);
SwingUtils.setEnumCombo(comboAcquisition, Scienta.AcquisitionMode.class);
SwingUtils.setEnumCombo(comboEnergy, Scienta.EnergyMode.class);
SwingUtils.setEnumCombo(comboDetector, Scienta.DetectorMode.class);
DefaultComboBoxModel model = new DefaultComboBoxModel();
for (Integer energy : Scienta.PASS_ENERGY_VALUES) {
model.addElement(energy);
}
comboPass.setModel(model);
}
public boolean getShowCameraPanel() {
return cameraPanel.isVisible();
}
public void setShowCameraPanel(boolean value) {
cameraPanel.setVisible(value);
}
public boolean getShowSpectrum() {
return plotSpectrum.isVisible();
}
public void setShowSpectrum(boolean value) {
plotSpectrum.setVisible(value);
}
@Override
public Scienta getDevice() {
return (Scienta) super.getDevice();
}
@Override
public void setDevice(Device device) {
if (getDevice() != null) {
getDevice().getCurrentChannel().removeListener(progressListener);
}
super.setDevice(device);
cameraPanel.setDevice(device);
if (device == null) {
stopTimer();
} else {
getDevice().getCurrentChannel().addListener(progressListener);
getDevice().getSpectrum().addListener(spectrumListener);
//cameraPanel.startTimer(3000, 0);
startTimer(3000, 0);
}
}
DeviceListener progressListener = new DeviceAdapter() {
@Override
public void onValueChanged(final Device device, final Object value, final Object former) {
SwingUtilities.invokeLater(() -> {
valueCurrent.setValue((Double) value);
progress.setValue((int) (getDevice().getProgress() * 1000));
});
}
};
DeviceListener spectrumListener = new DeviceAdapter() {
@Override
public void onValueChanged(final Device device, final Object value, final Object former) {
SwingUtilities.invokeLater(() -> {
updateSpectrum();
});
}
};
@Override
protected void onHide() {
super.onHide();
}
@Override
protected void onTimer() {
startBackgroundUpdate();
}
//Callbacks
@Override
protected void onDeviceStateChanged(State state, State former) {
}
@Override
protected void onDeviceValueChanged(Object state, Object former) {
}
public class DeviceData {
double[] spectrum;
Scienta.LensMode lensMode;
Scienta.ElementSet elementSet;
Scienta.AcquisitionMode acquisitionMode;
Scienta.EnergyMode energyMode;
Scienta.DetectorMode detectorMode;
double low;
double center;
double high;
double width;
//int frames;
double time;
double size;
int slices;
int pass;
int iterations;
int current;
int total;
}
@Override
protected DeviceData doBackgroundUpdate() throws IOException, InterruptedException {
DeviceData dd = new DeviceData();
//read-once
dd.spectrum = getDevice().getSpectrum().getValue();
dd.lensMode = getDevice().getLensMode();
dd.elementSet = getDevice().getElementSet();
dd.acquisitionMode = getDevice().getAcquisitionMode();
dd.energyMode = getDevice().getEnergyMode();
dd.detectorMode = getDevice().getDetectorMode();
dd.pass = getDevice().getPassEnergy();
dd.low = getDevice().getLowEnergy().getValue();
dd.center = getDevice().getCenterEnergy().getValue();
dd.high = getDevice().getHighEnergy().getValue();
dd.width = getDevice().getEnergyWidth().getValue();
//dd.frames = getDevice().getFrames().getValue();
dd.time = getDevice().getStepTime().getValue();
dd.size = getDevice().getStepSize().getValue();
dd.slices = getDevice().getSlices().getValue();
dd.current = getDevice().getCurrentChannel().getValue().intValue();
dd.total = getDevice().getTotalChannels().getValue().intValue();
dd.iterations = getDevice().getIterations();
return dd;
}
void updateValueField(ValueSelection field, double value) {
try {
field.setValue(value);
} catch (Exception ex) {
getLogger().log(Level.FINE, null, ex);
}
}
void updateComboField(JComboBox field, Object value) {
try {
if (field.getSelectedItem() != value) {
field.setSelectedItem(value);
}
} catch (Exception ex) {
getLogger().log(Level.FINE, null, ex);
}
}
@Override
protected void onBackgroundUpdateFinished(Object data) {
DeviceData dd = (DeviceData) data;
updateSpectrum();
updateValueField(valueLow, dd.low);
updateValueField(valueCenter, dd.center);
updateValueField(valueHigh, dd.high);
updateValueField(valueWidth, dd.width);
//updateValue(valueFrames, dd.frames);
updateValueField(valueTime, dd.time);
updateValueField(valueSize, dd.size);
updateValueField(valueSlices, dd.slices);
updateValueField(valueIterations, dd.iterations);
updateValueField(valueTotal, dd.total);
updateValueField(valueCurrent, dd.current);
updateComboField(comboLens, dd.lensMode);
updateComboField(comboAcquisition, dd.acquisitionMode);
updateComboField(comboDetector, dd.detectorMode);
updateComboField(comboEnergy, dd.energyMode);
updateComboField(comboElement, dd.elementSet);
updateComboField(comboPass, dd.pass);
try {
progress.setValue((int) (getDevice().getProgress() * 1000));
} catch (Exception ex) {
getLogger().log(Level.FINE, null, ex);
}
}
void updateSpectrum() {
try {
double[] xSpectrum = getDevice().getSpectrumX();
if (xSpectrum != null) {
spectrumSeries.setData(xSpectrum, getDevice().getSpectrum().take());
plot.updateSeries(spectrumSeries);
return;
}
} catch (Exception ex) {
getLogger().log(Level.FINE, null, ex);
}
spectrumSeries.clear();
}
/**
* This method is called from within the constructor to initialize the form. WARNING: Do NOT
* modify this code. The content of this method is always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
cameraPanel = new ch.psi.pshell.swing.CameraPanel();
scientaPanel = new javax.swing.JPanel();
jPanel5 = new javax.swing.JPanel();
progress = new javax.swing.JProgressBar();
jLabel6 = new javax.swing.JLabel();
valueCurrent = new ch.psi.pshell.swing.ValueSelection();
jLabel16 = new javax.swing.JLabel();
valueTotal = new ch.psi.pshell.swing.ValueSelection();
plotSpectrum = new javax.swing.JPanel();
plot = new ch.psi.pshell.plot.LinePlotJFree();
jPanel6 = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
comboLens = new javax.swing.JComboBox();
jLabel2 = new javax.swing.JLabel();
comboAcquisition = new javax.swing.JComboBox();
jLabel3 = new javax.swing.JLabel();
comboEnergy = new javax.swing.JComboBox();
jLabel4 = new javax.swing.JLabel();
comboDetector = new javax.swing.JComboBox();
jLabel5 = new javax.swing.JLabel();
comboElement = new javax.swing.JComboBox();
jPanel4 = new javax.swing.JPanel();
jLabel11 = new javax.swing.JLabel();
comboPass = new javax.swing.JComboBox();
jLabel12 = new javax.swing.JLabel();
valueLow = new ch.psi.pshell.swing.ValueSelection();
jLabel13 = new javax.swing.JLabel();
valueCenter = new ch.psi.pshell.swing.ValueSelection();
jLabel14 = new javax.swing.JLabel();
valueHigh = new ch.psi.pshell.swing.ValueSelection();
jLabel15 = new javax.swing.JLabel();
valueWidth = new ch.psi.pshell.swing.ValueSelection();
jPanel2 = new javax.swing.JPanel();
jLabel8 = new javax.swing.JLabel();
valueTime = new ch.psi.pshell.swing.ValueSelection();
jLabel9 = new javax.swing.JLabel();
valueSize = new ch.psi.pshell.swing.ValueSelection();
jLabel10 = new javax.swing.JLabel();
valueSlices = new ch.psi.pshell.swing.ValueSelection();
jLabel17 = new javax.swing.JLabel();
valueIterations = new ch.psi.pshell.swing.ValueSelection();
buttonZeroSupplies = new javax.swing.JButton();
cameraPanel.setBorder(null);
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Progress"));
progress.setMaximum(1000);
jLabel6.setText("Current point:");
valueCurrent.setDecimals(0);
valueCurrent.setEnabled(false);
valueCurrent.setMaxValue(100000.0);
valueCurrent.setMinValue(0.0);
valueCurrent.setShowButtons(false);
jLabel16.setText("Total:");
valueTotal.setDecimals(0);
valueTotal.setEnabled(false);
valueTotal.setMaxValue(100000.0);
valueTotal.setMinValue(0.0);
valueTotal.setShowButtons(false);
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(valueCurrent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jLabel16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(valueTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(progress, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addContainerGap())
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
.addGap(4, 4, 4)
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel6)
.addComponent(valueCurrent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(valueTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(progress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel16))
.addGap(4, 4, 4))
);
plotSpectrum.setBorder(javax.swing.BorderFactory.createTitledBorder("Spectrum"));
plot.setTitle("");
javax.swing.GroupLayout plotSpectrumLayout = new javax.swing.GroupLayout(plotSpectrum);
plotSpectrum.setLayout(plotSpectrumLayout);
plotSpectrumLayout.setHorizontalGroup(
plotSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(plotSpectrumLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(plot, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
);
plotSpectrumLayout.setVerticalGroup(
plotSpectrumLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(plotSpectrumLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(plot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(0, 0, 0))
);
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Modes"));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel1.setText("Lens:");
comboLens.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
comboLens.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboLensActionPerformed(evt);
}
});
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel2.setText("Acquisition:");
comboAcquisition.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
comboAcquisition.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboAcquisitionActionPerformed(evt);
}
});
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel3.setText("Energy:");
comboEnergy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
comboEnergy.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboEnergyActionPerformed(evt);
}
});
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel4.setText("Detector:");
comboDetector.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
comboDetector.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboDetectorActionPerformed(evt);
}
});
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel5.setText("Element:");
comboElement.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
comboElement.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboElementActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5)
.addComponent(jLabel4)
.addComponent(jLabel3)
.addComponent(jLabel2)
.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(comboLens, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(comboAcquisition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(comboElement, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(comboDetector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(comboEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3, jLabel4, jLabel5});
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboAcquisition, comboDetector, comboElement, comboEnergy, comboLens});
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(comboLens, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(comboAcquisition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(comboEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(comboDetector, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(comboElement, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(17, Short.MAX_VALUE))
);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Energy"));
jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel11.setText("Pass:");
comboPass.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "5", "10", "20", "50", "100", "200" }));
comboPass.setToolTipText("");
comboPass.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
comboPassActionPerformed(evt);
}
});
jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel12.setText("Low:");
valueLow.setDecimals(2);
valueLow.setMaxValue(2000.0);
valueLow.setMinValue(0.0);
valueLow.setShowButtons(false);
jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel13.setText("Center:");
valueCenter.setDecimals(2);
valueCenter.setMaxValue(2000.0);
valueCenter.setMinValue(0.0);
valueCenter.setShowButtons(false);
jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel14.setText("High:");
valueHigh.setDecimals(2);
valueHigh.setMaxValue(2000.0);
valueHigh.setMinValue(0.0);
valueHigh.setShowButtons(false);
jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel15.setText("Width:");
valueWidth.setDecimals(2);
valueWidth.setEnabled(false);
valueWidth.setMaxValue(2000.0);
valueWidth.setMinValue(0.0);
valueWidth.setShowButtons(false);
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel15)
.addComponent(jLabel14)
.addComponent(jLabel13)
.addComponent(jLabel12)
.addComponent(jLabel11))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(valueWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(valueHigh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(valueCenter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(comboPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(valueLow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel4Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboPass, valueCenter, valueHigh, valueLow, valueWidth});
jPanel4Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel11, jLabel12, jLabel13, jLabel14, jLabel15});
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel11)
.addComponent(comboPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel12)
.addComponent(valueLow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel13)
.addComponent(valueCenter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel14)
.addComponent(valueHigh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel15)
.addComponent(valueWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(17, Short.MAX_VALUE))
);
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Step"));
jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel8.setText("Time:");
valueTime.setDecimals(2);
valueTime.setMaxValue(1000.0);
valueTime.setMinValue(0.0);
valueTime.setShowButtons(false);
jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel9.setText("Size:");
valueSize.setDecimals(2);
valueSize.setMaxValue(1000.0);
valueSize.setMinValue(0.0);
valueSize.setShowButtons(false);
jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel10.setText("Slices:");
valueSlices.setDecimals(0);
valueSlices.setMaxValue(1000.0);
valueSlices.setMinValue(0.0);
valueSlices.setShowButtons(false);
jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel17.setText("Iter:");
valueIterations.setDecimals(0);
valueIterations.setMaxValue(1000.0);
valueIterations.setMinValue(0.0);
valueIterations.setShowButtons(false);
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)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel9)
.addComponent(jLabel8))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(valueSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(valueTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(valueSlices, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addComponent(jLabel17)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(valueIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addContainerGap())
);
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel10, jLabel17, jLabel8, jLabel9});
jPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {valueIterations, valueSize, valueSlices, valueTime});
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(valueSlices, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel8)
.addComponent(valueTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel9)
.addComponent(valueSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel17)
.addComponent(valueIterations, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())
);
buttonZeroSupplies.setText("Zero Supplies");
buttonZeroSupplies.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonZeroSuppliesActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
jPanel6.setLayout(jPanel6Layout);
jPanel6Layout.setHorizontalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(buttonZeroSupplies, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())))
);
jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()
.addGap(0, 0, 0)
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel6Layout.createSequentialGroup()
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonZeroSupplies)))
.addGap(0, 0, 0))
);
jPanel6Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jPanel1, jPanel4});
javax.swing.GroupLayout scientaPanelLayout = new javax.swing.GroupLayout(scientaPanel);
scientaPanel.setLayout(scientaPanelLayout);
scientaPanelLayout.setHorizontalGroup(
scientaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(scientaPanelLayout.createSequentialGroup()
.addGroup(scientaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(plotSpectrum, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(0, 0, 0))
);
scientaPanelLayout.setVerticalGroup(
scientaPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(scientaPanelLayout.createSequentialGroup()
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(plotSpectrum, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(0, 0, 0))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(cameraPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scientaPanel, 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()
.addComponent(cameraPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(scientaPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
private void comboLensActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboLensActionPerformed
try {
if (!isBackgroundUpdate()) {
Scienta.LensMode mode = (Scienta.LensMode) comboLens.getSelectedItem();
if (mode != null) {
getDevice().setLensMode(mode);
}
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_comboLensActionPerformed
private void comboAcquisitionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboAcquisitionActionPerformed
try {
if (!isBackgroundUpdate()) {
Scienta.AcquisitionMode mode = (Scienta.AcquisitionMode) comboAcquisition.getSelectedItem();
if (mode != null) {
getDevice().setAcquisitionMode(mode);
}
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_comboAcquisitionActionPerformed
private void comboEnergyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboEnergyActionPerformed
try {
if (!isBackgroundUpdate()) {
Scienta.EnergyMode mode = (Scienta.EnergyMode) comboEnergy.getSelectedItem();
if (mode != null) {
getDevice().setEnergyMode(mode);
}
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_comboEnergyActionPerformed
private void comboDetectorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboDetectorActionPerformed
try {
if (!isBackgroundUpdate()) {
Scienta.DetectorMode mode = (Scienta.DetectorMode) comboDetector.getSelectedItem();
if (mode != null) {
getDevice().setDetectorMode(mode);
}
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_comboDetectorActionPerformed
private void comboElementActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboElementActionPerformed
try {
if (!isBackgroundUpdate()) {
Scienta.ElementSet mode = (Scienta.ElementSet) comboElement.getSelectedItem();
if (mode != null) {
getDevice().setElementSet(mode);
}
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_comboElementActionPerformed
private void comboPassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboPassActionPerformed
try {
if (!isBackgroundUpdate()) {
int val = (int) comboPass.getSelectedItem();
getDevice().setPassEnergy(val);
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_comboPassActionPerformed
private void buttonZeroSuppliesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonZeroSuppliesActionPerformed
try {
getDevice().zeroSupplies();
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonZeroSuppliesActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonZeroSupplies;
private ch.psi.pshell.swing.CameraPanel cameraPanel;
private javax.swing.JComboBox comboAcquisition;
private javax.swing.JComboBox comboDetector;
private javax.swing.JComboBox comboElement;
private javax.swing.JComboBox comboEnergy;
private javax.swing.JComboBox comboLens;
private javax.swing.JComboBox comboPass;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel15;
private javax.swing.JLabel jLabel16;
private javax.swing.JLabel jLabel17;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private ch.psi.pshell.plot.LinePlotJFree plot;
private javax.swing.JPanel plotSpectrum;
private javax.swing.JProgressBar progress;
private javax.swing.JPanel scientaPanel;
private ch.psi.pshell.swing.ValueSelection valueCenter;
private ch.psi.pshell.swing.ValueSelection valueCurrent;
private ch.psi.pshell.swing.ValueSelection valueHigh;
private ch.psi.pshell.swing.ValueSelection valueIterations;
private ch.psi.pshell.swing.ValueSelection valueLow;
private ch.psi.pshell.swing.ValueSelection valueSize;
private ch.psi.pshell.swing.ValueSelection valueSlices;
private ch.psi.pshell.swing.ValueSelection valueTime;
private ch.psi.pshell.swing.ValueSelection valueTotal;
private ch.psi.pshell.swing.ValueSelection valueWidth;
// End of variables declaration//GEN-END:variables
}