This commit is contained in:
gac-x11ma
2023-07-18 11:00:54 +02:00
parent 8488d81c80
commit 1d75bc4535
77 changed files with 2464 additions and 253 deletions

View File

@@ -4,10 +4,10 @@ import ij.gui.*;
import java.awt.*;
import ij.plugin.PlugIn;
import ij.WindowManager;
//import edu.emory.mathcs.jtransforms.fft.*;
//import edu.emory.mathcs.utils.*;
import org.jtransforms.fft.*;
import org.jtransforms.utils.*;
import edu.emory.mathcs.jtransforms.fft.*;
import edu.emory.mathcs.utils.*;
//import org.jtransforms.fft.*;
//import org.jtransforms.utils.*;
import flanagan.complex.*;
import flanagan.math.*;
import ij.plugin.frame.RoiManager;

View File

@@ -3,6 +3,7 @@ import ch.psi.pshell.swing.DeviceValuePanel;
import ch.psi.pshell.ui.Panel;
import ch.psi.utils.Arr;
import ch.psi.utils.State;
import ch.psi.utils.Str;
import ch.psi.utils.swing.SwingUtils;
import java.awt.Component;
import java.awt.Font;
@@ -111,36 +112,45 @@ public class Beamline extends Panel {
protected void doUpdate() {
}
void updateSpinnerDouble(JSpinner spinner, String setting){
try{
Double value = Double.valueOf(getSetting(setting));
spinner.setValue(value);
} catch (Exception ex){
}
}
void updateSpinnerString(JSpinner spinner, String setting){
try{
spinner.setValue(getSetting(setting));
} catch (Exception ex){
}
}
void updateComboString(JComboBox combo, String setting){
try{
combo.setSelectedItem(getSetting(setting));
} catch (Exception ex){
}
}
void updateBeamlineSetup() throws IOException{
String id = getSetting("ID");
Double en = Double.valueOf(getSetting("ENERGY"));
String pol1 = getSetting("POL_ID_1");
Double alp1 = Double.valueOf(getSetting("ALPHA_ID_1"));
String har1 = getSetting("HARMONIC_ID_1");
Double off1 = Double.valueOf(getSetting("OFFSET_ID_1"));
String pol2 = getSetting("POL_ID_2");
Double alp2 = Double.valueOf(getSetting("ALPHA_ID_2"));
String har2 = getSetting("HARMONIC_ID_2");
Double off2 = Double.valueOf(getSetting("OFFSET_ID_2"));
String grat = getSetting("GRATING");
Double order= Double.valueOf(getSetting("DIFF_ORD"));
Double cff = Double.valueOf(getSetting("CFF"));
comboID.setSelectedItem(id);
spinnerImgEng.setValue(en);
comboPol1.setSelectedItem(pol1);
spinnerAlp1.setValue(alp1);
spinnerHar1.setValue(har1);
spinnerOff1.setValue(off1);
comboPol2.setSelectedItem(pol2);
spinnerAlp2.setValue(alp2);
spinnerHar2.setValue(har2);
spinnerOff2.setValue(off2);
comboGrating.setSelectedItem(grat);
comboDiffOrder.setSelectedItem(order);
spinnerCff.setValue(cff);
checkAutoValve.setSelected(String.valueOf(getSetting("AUTO_SWITCH_VALVE")).equalsIgnoreCase("true"));
checkAutoShutter.setSelected(String.valueOf(getSetting("AUTO_SWITCH_SHUTTER")).equalsIgnoreCase("true"));
updateComboString(comboID, getSetting("ID"));
updateSpinnerDouble(spinnerImgEng, "ENERGY");
updateComboString(comboPol1, getSetting("POL_ID_1"));
updateSpinnerDouble(spinnerAlp1, "ALPHA_ID_1");
updateSpinnerString(spinnerHar1, "HARMONIC_ID_1");
updateSpinnerDouble(spinnerOff1, "OFFSET_ID_1");
updateComboString(comboPol2, getSetting("POL_ID_2"));
updateSpinnerDouble(spinnerAlp2, "ALPHA_ID_2");
updateSpinnerString(spinnerHar2, "HARMONIC_ID_2");
updateSpinnerDouble(spinnerOff2, "OFFSET_ID_2");
updateComboString(comboGrating, getSetting("GRATING"));
updateComboString(comboDiffOrder, getSetting("DIFF_ORD"));
updateSpinnerDouble(spinnerCff, "CFF");
checkAutoValve.setSelected(Str.toString(getSetting("AUTO_SWITCH_VALVE")).equalsIgnoreCase("true"));
checkAutoShutter.setSelected(Str.toString(getSetting("AUTO_SWITCH_SHUTTER")).equalsIgnoreCase("true"));
}
void updateControls() {

91
plugins/BeamlineInit.form Normal file
View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" 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">
<EmptySpace min="-2" pref="83" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="buttonAUinit" max="32767" attributes="0"/>
<Component id="buttonFEinit" alignment="0" max="32767" attributes="0"/>
<Component id="buttonExitSlitsInit" alignment="0" max="32767" attributes="0"/>
<Component id="buttonCMUinit" alignment="0" max="32767" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="statusAU" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="184" 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="-2" pref="24" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="buttonAUinit" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="statusAU" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="buttonFEinit" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="buttonExitSlitsInit" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="buttonCMUinit" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="271" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JButton" name="buttonAUinit">
<Properties>
<Property name="text" type="java.lang.String" value="Init AU"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonAUinitActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonFEinit">
<Properties>
<Property name="text" type="java.lang.String" value="init FE"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonFEinitActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonExitSlitsInit">
<Properties>
<Property name="text" type="java.lang.String" value="init Exit Slits"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonExitSlitsInitActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JButton" name="buttonCMUinit">
<Properties>
<Property name="text" type="java.lang.String" value="init CMU"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonCMUinitActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="statusAU">
<Properties>
<Property name="text" type="java.lang.String" value="status AU"/>
</Properties>
</Component>
</SubComponents>
</Form>

199
plugins/BeamlineInit.java Normal file
View File

@@ -0,0 +1,199 @@
import ch.psi.pshell.ui.Panel;
import ch.psi.utils.State;
import javax.swing.JButton;
/**
*
*/
public class BeamlineInit extends Panel {
public BeamlineInit() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
buttonAUinit = new javax.swing.JButton();
buttonFEinit = new javax.swing.JButton();
buttonExitSlitsInit = new javax.swing.JButton();
buttonCMUinit = new javax.swing.JButton();
statusAU = new javax.swing.JLabel();
buttonAUinit.setText("Init AU");
buttonAUinit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonAUinitActionPerformed(evt);
}
});
buttonFEinit.setText("init FE");
buttonFEinit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonFEinitActionPerformed(evt);
}
});
buttonExitSlitsInit.setText("init Exit Slits");
buttonExitSlitsInit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonExitSlitsInitActionPerformed(evt);
}
});
buttonCMUinit.setText("init CMU");
buttonCMUinit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonCMUinitActionPerformed(evt);
}
});
statusAU.setText("status AU");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(83, 83, 83)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(buttonAUinit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonFEinit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonExitSlitsInit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(buttonCMUinit, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)
.addComponent(statusAU)
.addContainerGap(184, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(24, 24, 24)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(buttonAUinit)
.addComponent(statusAU))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(buttonFEinit)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(buttonExitSlitsInit)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(buttonCMUinit)
.addContainerGap(271, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
private void buttonAUinitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAUinitActionPerformed
statusAU.setText("Running");
try {
runAsync("beamline_init/init/InitAU").handle((ret, ex) -> {
if (ex != null) {
statusAU.setText(ex.getMessage());
showException((Exception) ex);
} else {
statusAU.setText((ret==null)? "" : ret.toString());
}
return ret;
});
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonAUinitActionPerformed
private void buttonFEinitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonFEinitActionPerformed
try {
boolean background = false;
runAsync("beamline_init/init/InitFE", background).handle((ret, ex) -> {
((JButton) evt.getSource()).setEnabled(true);
if (ex != null) {
showException((Exception) ex);
}
return ret;
});
((JButton) evt.getSource()).setEnabled(false);
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonFEinitActionPerformed
private void buttonExitSlitsInitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExitSlitsInitActionPerformed
try {
boolean background = false;
runAsync("beamline_init/init/InitExitSlit", background).handle((ret, ex) -> {
((JButton) evt.getSource()).setEnabled(true);
if (ex != null) {
showException((Exception) ex);
}
return ret;
});
((JButton) evt.getSource()).setEnabled(false);
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonExitSlitsInitActionPerformed
private void buttonCMUinitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCMUinitActionPerformed
try {
boolean background = false;
runAsync("beamline_init/init/InitCMU", background).handle((ret, ex) -> {
((JButton) evt.getSource()).setEnabled(true);
if (ex != null) {
showException((Exception) ex);
}
return ret;
});
((JButton) evt.getSource()).setEnabled(false);
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonCMUinitActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAUinit;
private javax.swing.JButton buttonCMUinit;
private javax.swing.JButton buttonExitSlitsInit;
private javax.swing.JButton buttonFEinit;
private javax.swing.JLabel statusAU;
// End of variables declaration//GEN-END:variables
}

556
plugins/Cooling.form Normal file
View File

@@ -0,0 +1,556 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.5" 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">
<EmptySpace min="-2" pref="37" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="label1" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="panelNeedleValveSet" min="-2" pref="85" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="panelNeedleValveGet" min="-2" pref="81" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="label2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Component id="panelHeFlowSet" min="-2" pref="81" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel7" min="-2" pref="18" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="panelHeFlowGet" min="-2" pref="81" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="panelFilamentSet" min="-2" pref="81" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel11" min="-2" pref="29" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="76" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Component id="jLabel8" min="-2" pref="18" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="33" max="-2" attributes="0"/>
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="jPanel2" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="25" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="panelPlot" 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="0" attributes="0">
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="label1" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="panelNeedleValveGet" min="-2" max="-2" attributes="0"/>
<Component id="panelNeedleValveSet" alignment="1" min="-2" pref="35" max="-2" attributes="0"/>
<Component id="jLabel5" alignment="1" min="-2" pref="35" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="1" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="30" max="-2" attributes="0"/>
</Group>
</Group>
<Component id="label2" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel7" min="-2" pref="33" max="-2" attributes="0"/>
<Component id="panelHeFlowSet" min="-2" pref="33" max="-2" attributes="0"/>
<Component id="panelHeFlowGet" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel8" alignment="0" min="-2" pref="35" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelFilamentSet" min="-2" pref="33" max="-2" attributes="0"/>
<Component id="jLabel11" min="-2" pref="33" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
</Group>
<Component id="jPanel2" alignment="1" min="-2" max="-2" attributes="0"/>
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
<Component id="panelPlot" pref="105" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelNeedleValveGet">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-ES1-AO4:V" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.RegisterPanel" name="panelNeedleValveSet">
<Properties>
<Property name="decimals" type="int" value="3"/>
<Property name="name" type="java.lang.String" value="X11MA-ES1-AO4:V" noResource="true"/>
</Properties>
</Component>
<Component class="java.awt.Label" name="label1">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="12" style="1"/>
</Property>
<Property name="text" type="java.lang.String" value="Needle Valve"/>
</Properties>
</Component>
<Component class="java.awt.Label" name="label2">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="Dialog" size="12" style="1"/>
</Property>
<Property name="text" type="java.lang.String" value="He Flow Meter"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.RegisterPanel" name="panelHeFlowSet">
<Properties>
<Property name="decimals" type="int" value="3"/>
<Property name="name" type="java.lang.String" value="X11MA-PC-BRONKHORST:PEEM-SET-SETPOINT" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelHeFlowGet">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-BRONKHORST:PEEM-GET-MEASURE" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
<Font name="DejaVu Sans" size="12" style="1"/>
</Property>
<Property name="text" type="java.lang.String" value="LEEM Filament"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.RegisterPanel" name="panelFilamentSet">
<Properties>
<Property name="decimals" type="int" value="3"/>
<Property name="deviceName" type="java.lang.String" value="fil"/>
<Property name="name" type="java.lang.String" value="" noResource="true"/>
</Properties>
</Component>
<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="Switchbox"/>
</Border>
</Property>
<Property name="name" type="java.lang.String" value="" noResource="true"/>
</Properties>
<AccessibilityProperties>
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/>
</AccessibilityProperties>
<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="jLabel2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="panelSBVolt" linkSize="1" pref="81" max="32767" attributes="0"/>
<Component id="panelSBResist" pref="0" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
<Component id="jLabel14" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="panelSBTemp" min="-2" pref="74" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="panelSBCurr" min="-2" pref="74" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel15" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
<EmptySpace pref="15" max="32767" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="panelSBResistance" linkSize="1" min="-2" pref="55" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="jLabel16" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelSBResist" min="-2" max="-2" attributes="0"/>
<Component id="jLabel12" min="-2" pref="33" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" alignment="1" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="jLabel13" min="-2" pref="33" max="-2" attributes="0"/>
<Component id="panelSBTemp" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="1" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="panelSBVolt" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="16" max="-2" attributes="0"/>
<Component id="jLabel14" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
<Component id="jLabel15" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<Component id="panelSBCurr" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="panelSBResistance" min="-2" max="-2" attributes="0"/>
<Component id="jLabel16" min="-2" pref="33" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="text" type="java.lang.String" value="Pt100"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelSBResist">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-SW:Pt100-R" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelSBTemp">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-SW:Pt100-K" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel3">
<Properties>
<Property name="text" type="java.lang.String" value="E-Field"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelSBVolt">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-SW:E-Field-V" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelSBCurr">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-SW:E-Field-I" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel4">
<Properties>
<Property name="text" type="java.lang.String" value="Resistance"/>
<Property name="toolTipText" type="java.lang.String" value="Resistance"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelSBResistance">
<Properties>
<Property name="name" type="java.lang.String" value="X11MA-PC-SW:Resistance" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel12">
<Properties>
<Property name="text" type="java.lang.String" value="Ohm"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel13">
<Properties>
<Property name="text" type="java.lang.String" value="K"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel14">
<Properties>
<Property name="text" type="java.lang.String" value="V"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel15">
<Properties>
<Property name="text" type="java.lang.String" value="K"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel16">
<Properties>
<Property name="text" type="java.lang.String" value="Ohm"/>
</Properties>
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelPlot">
<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="PEEM Pt100"/>
</Border>
</Property>
</Properties>
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
</Container>
<Component class="javax.swing.JLabel" name="jLabel5">
<Properties>
<Property name="text" type="java.lang.String" value="V"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel6">
<Properties>
<Property name="text" type="java.lang.String" value="V"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel7">
<Properties>
<Property name="text" type="java.lang.String" value="%"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel8">
<Properties>
<Property name="text" type="java.lang.String" value="%"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel11">
<Properties>
<Property name="text" type="java.lang.String" value="mA"/>
</Properties>
</Component>
<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="Power Sockets"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="jLabel19" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="checkGude3" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
<Component id="jLabel20" min="-2" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
<Component id="checkGude4" min="-2" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel17" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel18" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="checkGude2" min="-2" max="-2" attributes="0"/>
<Component id="checkGude1" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
<Component id="panelGude3" alignment="1" min="-2" pref="88" max="-2" attributes="0"/>
<Component id="panelGude1" min="-2" pref="88" max="-2" attributes="0"/>
<Component id="panelGude2" min="-2" pref="88" max="-2" attributes="0"/>
</Group>
<Component id="panelGude4" min="-2" pref="88" max="-2" attributes="0"/>
</Group>
<EmptySpace pref="15" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace pref="12" max="32767" attributes="0"/>
<Component id="panelGude1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="checkGude1" max="32767" attributes="0"/>
<Component id="jLabel17" pref="25" max="32767" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelGude2" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel18" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
<Component id="checkGude2" alignment="3" min="-2" pref="25" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelGude3" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="checkGude3" alignment="1" min="-2" pref="29" max="-2" attributes="0"/>
<Component id="jLabel19" min="-2" pref="29" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="panelGude4" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel20" max="32767" attributes="0"/>
<Component id="checkGude4" min="-2" pref="29" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelGude1">
<Properties>
<Property name="name" type="java.lang.String" value="PEEM-GUDE:CH1READ" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelGude2">
<Properties>
<Property name="name" type="java.lang.String" value="PEEM-GUDE:CH2READ" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelGude3">
<Properties>
<Property name="name" type="java.lang.String" value="PEEM-GUDE:CH3READ" noResource="true"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="panelGude4">
<Properties>
<Property name="name" type="java.lang.String" value="PEEM-GUDE:CH4READ" noResource="true"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel17">
<Properties>
<Property name="text" type="java.lang.String" value="Helium Pump"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel18">
<Properties>
<Property name="text" type="java.lang.String" value="Detector"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel19">
<Properties>
<Property name="text" type="java.lang.String" value="He level meter"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel20">
<Properties>
<Property name="text" type="java.lang.String" value="Heater"/>
</Properties>
</Component>
<Component class="javax.swing.JCheckBox" name="checkGude1">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkGude1ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="checkGude2">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkGude2ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="checkGude3">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkGude3ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="checkGude4">
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkGude4ActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Form>

555
plugins/Cooling.java Normal file
View File

@@ -0,0 +1,555 @@
import ch.psi.pshell.epics.GenericChannel;
import ch.psi.pshell.swing.DevicePanel;
import ch.psi.pshell.swing.RegisterPanel;
import ch.psi.pshell.ui.Panel;
import ch.psi.pshell.ui.StripChart;
import ch.psi.utils.State;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
*/
public class Cooling extends Panel {
public Cooling() {
initComponents();
}
//Overridable callbacks
@Override
public void onInitialize(int runCount) {
DevicePanel[] panels = new DevicePanel[]{panelNeedleValveSet,panelNeedleValveGet,panelHeFlowSet,panelHeFlowGet,
panelSBResist,panelSBTemp,panelSBVolt,panelSBCurr,panelSBResistance,panelGude1,panelGude2,panelGude3,panelGude4};
for (DevicePanel p : panels){
GenericChannel channel = new GenericChannel(p.getName(), p.getName());
if (p instanceof RegisterPanel){
channel.setPrecision(((RegisterPanel)p).getDecimals());
}
channel.setMonitored(true);
try {
channel.initialize();
p.setDevice(channel);
} catch (Exception ex) {
Logger.getLogger(Cooling.class.getName()).log(Level.SEVERE, null, ex);
}
}
panelPlot.removeAll();
panelPlot.add(StripChart.getPlotPanel(new File("/sls/X11MA/data/X11MA/strip/PEEM-Pt100.scd")));
}
@Override
public void onStateChange(State state, State former) {
}
@Override
public void onExecutedFile(String fileName, Object result) {
}
@Override
protected void onTimer() {
}
@Override
protected void onLoaded() {
}
@Override
protected void onUnloaded() {
}
//Invoked by 'update()' to update components in the event thread
@Override
protected void doUpdate() {
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
panelNeedleValveGet = new ch.psi.pshell.swing.DeviceValuePanel();
panelNeedleValveSet = new ch.psi.pshell.swing.RegisterPanel();
label1 = new java.awt.Label();
label2 = new java.awt.Label();
panelHeFlowSet = new ch.psi.pshell.swing.RegisterPanel();
panelHeFlowGet = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel1 = new javax.swing.JLabel();
panelFilamentSet = new ch.psi.pshell.swing.RegisterPanel();
jPanel1 = new javax.swing.JPanel();
jLabel2 = new javax.swing.JLabel();
panelSBResist = new ch.psi.pshell.swing.DeviceValuePanel();
panelSBTemp = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel3 = new javax.swing.JLabel();
panelSBVolt = new ch.psi.pshell.swing.DeviceValuePanel();
panelSBCurr = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel4 = new javax.swing.JLabel();
panelSBResistance = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel12 = new javax.swing.JLabel();
jLabel13 = new javax.swing.JLabel();
jLabel14 = new javax.swing.JLabel();
jLabel15 = new javax.swing.JLabel();
jLabel16 = new javax.swing.JLabel();
panelPlot = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jPanel2 = new javax.swing.JPanel();
panelGude1 = new ch.psi.pshell.swing.DeviceValuePanel();
panelGude2 = new ch.psi.pshell.swing.DeviceValuePanel();
panelGude3 = new ch.psi.pshell.swing.DeviceValuePanel();
panelGude4 = new ch.psi.pshell.swing.DeviceValuePanel();
jLabel17 = new javax.swing.JLabel();
jLabel18 = new javax.swing.JLabel();
jLabel19 = new javax.swing.JLabel();
jLabel20 = new javax.swing.JLabel();
checkGude1 = new javax.swing.JCheckBox();
checkGude2 = new javax.swing.JCheckBox();
checkGude3 = new javax.swing.JCheckBox();
checkGude4 = new javax.swing.JCheckBox();
panelNeedleValveGet.setName("X11MA-ES1-AO4:V"); // NOI18N
panelNeedleValveSet.setDecimals(3);
panelNeedleValveSet.setName("X11MA-ES1-AO4:V"); // NOI18N
label1.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label1.setText("Needle Valve");
label2.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N
label2.setText("He Flow Meter");
panelHeFlowSet.setDecimals(3);
panelHeFlowSet.setName("X11MA-PC-BRONKHORST:PEEM-SET-SETPOINT"); // NOI18N
panelHeFlowGet.setName("X11MA-PC-BRONKHORST:PEEM-GET-MEASURE"); // NOI18N
jLabel1.setFont(new java.awt.Font("DejaVu Sans", 1, 12)); // NOI18N
jLabel1.setText("LEEM Filament");
panelFilamentSet.setDecimals(3);
panelFilamentSet.setDeviceName("fil");
panelFilamentSet.setName(""); // NOI18N
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Switchbox"));
jPanel1.setName(""); // NOI18N
jLabel2.setText("Pt100");
panelSBResist.setName("X11MA-PC-SW:Pt100-R"); // NOI18N
panelSBTemp.setName("X11MA-PC-SW:Pt100-K"); // NOI18N
jLabel3.setText("E-Field");
panelSBVolt.setName("X11MA-PC-SW:E-Field-V"); // NOI18N
panelSBCurr.setName("X11MA-PC-SW:E-Field-I"); // NOI18N
jLabel4.setText("Resistance");
jLabel4.setToolTipText("Resistance");
panelSBResistance.setName("X11MA-PC-SW:Resistance"); // NOI18N
jLabel12.setText("Ohm");
jLabel13.setText("K");
jLabel14.setText("V");
jLabel15.setText("K");
jLabel16.setText("Ohm");
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)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(panelSBVolt, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
.addComponent(panelSBResist, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel12)
.addComponent(jLabel14))
.addGap(18, 18, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(panelSBTemp, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel13))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(panelSBCurr, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel15)))))
.addContainerGap(15, Short.MAX_VALUE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(panelSBResistance, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel16)
.addGap(0, 0, Short.MAX_VALUE))))
);
jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {panelSBResistance, panelSBVolt});
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(14, 14, 14)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelSBResist, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelSBTemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(2, 2, 2)))
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel3)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(panelSBVolt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(16, 16, 16)
.addComponent(jLabel14))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(15, 15, 15)
.addComponent(jLabel15))))
.addComponent(panelSBCurr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(panelSBResistance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
panelPlot.setBorder(javax.swing.BorderFactory.createTitledBorder("PEEM Pt100"));
panelPlot.setLayout(new java.awt.BorderLayout());
jLabel5.setText("V");
jLabel6.setText("V");
jLabel7.setText("%");
jLabel8.setText("%");
jLabel11.setText("mA");
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Power Sockets"));
panelGude1.setName("PEEM-GUDE:CH1READ"); // NOI18N
panelGude2.setName("PEEM-GUDE:CH2READ"); // NOI18N
panelGude3.setName("PEEM-GUDE:CH3READ"); // NOI18N
panelGude4.setName("PEEM-GUDE:CH4READ"); // NOI18N
jLabel17.setText("Helium Pump");
jLabel18.setText("Detector");
jLabel19.setText("He level meter");
jLabel20.setText("Heater");
checkGude1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkGude1ActionPerformed(evt);
}
});
checkGude2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkGude2ActionPerformed(evt);
}
});
checkGude3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkGude3ActionPerformed(evt);
}
});
checkGude4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkGude4ActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
.addGap(11, 11, 11)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel19)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(checkGude3))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel20)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(checkGude4))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel17)
.addComponent(jLabel18))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(checkGude2)
.addComponent(checkGude1))))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(panelGude3, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelGude1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelGude2, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(panelGude4, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(15, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(12, Short.MAX_VALUE)
.addComponent(panelGude1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(14, 14, 14)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(checkGude1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel17, javax.swing.GroupLayout.DEFAULT_SIZE, 25, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelGude2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(checkGude2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelGude3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(checkGude3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(12, 12, 12)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(panelGude4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(checkGude4, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap())))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(37, 37, 37)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(panelNeedleValveSet, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(panelNeedleValveGet, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6))
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(panelHeFlowSet, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(panelHeFlowGet, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(panelFilamentSet, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(76, 76, 76)))
.addGap(4, 4, 4)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(33, 33, 33)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(25, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(panelPlot, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(1, 1, 1)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(panelNeedleValveGet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelNeedleValveSet, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(19, 19, 19))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)
.addGap(30, 30, 30)))
.addComponent(label2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(1, 1, 1)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelHeFlowSet, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(panelHeFlowGet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelFilamentSet, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(47, 47, 47))
.addComponent(jPanel2, 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))
.addGap(32, 32, 32)
.addComponent(panelPlot, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
.addContainerGap())
);
jPanel1.getAccessibleContext().setAccessibleName("");
}// </editor-fold>//GEN-END:initComponents
private void checkGude1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkGude1ActionPerformed
try {
if (checkGude1.isSelected()){
evalAsync("gude1('On')");
} else {
evalAsync("gude1('Off')");
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_checkGude1ActionPerformed
private void checkGude2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkGude2ActionPerformed
try {
if (checkGude2.isSelected()){
evalAsync("gude2('On')");
} else {
evalAsync("gude2('Off')");
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_checkGude2ActionPerformed
private void checkGude3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkGude3ActionPerformed
try {
if (checkGude3.isSelected()){
evalAsync("gude3('On')");
} else {
evalAsync("gude3('Off')");
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_checkGude3ActionPerformed
private void checkGude4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkGude4ActionPerformed
try {
if (checkGude4.isSelected()){
evalAsync("gude4('On')");
} else {
evalAsync("gude4('Off')");
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_checkGude4ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JCheckBox checkGude1;
private javax.swing.JCheckBox checkGude2;
private javax.swing.JCheckBox checkGude3;
private javax.swing.JCheckBox checkGude4;
private javax.swing.JLabel jLabel1;
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 jLabel18;
private javax.swing.JLabel jLabel19;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel20;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
private java.awt.Label label1;
private java.awt.Label label2;
private ch.psi.pshell.swing.RegisterPanel panelFilamentSet;
private ch.psi.pshell.swing.DeviceValuePanel panelGude1;
private ch.psi.pshell.swing.DeviceValuePanel panelGude2;
private ch.psi.pshell.swing.DeviceValuePanel panelGude3;
private ch.psi.pshell.swing.DeviceValuePanel panelGude4;
private ch.psi.pshell.swing.DeviceValuePanel panelHeFlowGet;
private ch.psi.pshell.swing.RegisterPanel panelHeFlowSet;
private ch.psi.pshell.swing.DeviceValuePanel panelNeedleValveGet;
private ch.psi.pshell.swing.RegisterPanel panelNeedleValveSet;
private javax.swing.JPanel panelPlot;
private ch.psi.pshell.swing.DeviceValuePanel panelSBCurr;
private ch.psi.pshell.swing.DeviceValuePanel panelSBResist;
private ch.psi.pshell.swing.DeviceValuePanel panelSBResistance;
private ch.psi.pshell.swing.DeviceValuePanel panelSBTemp;
private ch.psi.pshell.swing.DeviceValuePanel panelSBVolt;
// End of variables declaration//GEN-END:variables
}

View File

@@ -712,6 +712,9 @@
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="Autosave"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkImgAutosaveActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel20">
<Properties>
@@ -1066,6 +1069,9 @@
<Property name="selected" type="boolean" value="true"/>
<Property name="text" type="java.lang.String" value="With I0"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkSpecWithI0ActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="checkSpecSaveSpectrum">
<Properties>

26
plugins/DataAcquisition.java Executable file → Normal file
View File

@@ -10,7 +10,7 @@ import ch.psi.pshell.ui.Panel;
import ch.psi.utils.Arr;
import ch.psi.utils.IO;
import ch.psi.utils.Serializer;
import ch.psi.utils.State;
import ch.psi.utils.State;
import ch.psi.utils.Str;
import ch.psi.utils.swing.SwingUtils;
@@ -204,7 +204,11 @@ public class DataAcquisition extends Panel {
}
Rect imagingRoiOverlay;
return (Rectangle) getGlobalVar("IMAGING_ROI");
Rectangle getImagingRoi(){
try{
return (Rectangle) getGlobalVar("IMAGING_ROI");
} catch (Exception ex){
return null;
}
}
@@ -959,6 +963,11 @@ public class DataAcquisition extends Panel {
panelImgControls.setBorder(javax.swing.BorderFactory.createTitledBorder("Parameters"));
checkImgAutosave.setSelected(true);
checkImgAutosave.setText("Autosave");
checkImgAutosave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkImgAutosaveActionPerformed(evt);
}
});
jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
@@ -1177,6 +1186,11 @@ public class DataAcquisition extends Panel {
spinnerSpecExp.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 3600.0d, 1.0d));
checkSpecWithI0.setSelected(true);
checkSpecWithI0.setText("With I0");
checkSpecWithI0.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
checkSpecWithI0ActionPerformed(evt);
}
});
checkSpecSaveSpectrum.setSelected(true);
@@ -1815,6 +1829,14 @@ public class DataAcquisition extends Panel {
getLogger().log(Level.SEVERE, null, ex);
}
}//GEN-LAST:event_buttonImgOTFAbortActionPerformed
private void checkImgAutosaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkImgAutosaveActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkImgAutosaveActionPerformed
private void checkSpecWithI0ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkSpecWithI0ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_checkSpecWithI0ActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAdd;

View File

@@ -45,18 +45,32 @@
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
<Component id="textFOV" linkSize="1" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="102" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="spinnerExposure" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="deviceValuePanel3" linkSize="1" min="-2" pref="106" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="deviceValuePanel4" min="-2" pref="127" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="textFOV" linkSize="1" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="deviceValuePanel4" min="-2" pref="127" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonShowDetectorPanel" min="-2" pref="127" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="spinnerThreshold" min="-2" pref="121" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="deviceValuePanel5" pref="0" max="32767" attributes="0"/>
</Group>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonShowDetectorPanel" min="-2" pref="127" max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="1" attributes="0">
@@ -85,7 +99,7 @@
</Group>
</Group>
</Group>
<EmptySpace min="39" pref="39" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="166" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
@@ -121,9 +135,14 @@
<Component id="buttonShowDetectorPanel" alignment="2" min="-2" pref="35" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textFOV" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="deviceValuePanel5" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="textFOV" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="spinnerThreshold" alignment="3" min="-2" pref="28" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
@@ -354,5 +373,27 @@
<Property name="enabled" type="boolean" value="false"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel8">
<Properties>
<Property name="text" type="java.lang.String" value="Threshold [eV]:"/>
</Properties>
</Component>
<Component class="javax.swing.JSpinner" name="spinnerThreshold">
<Properties>
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
<SpinnerModel initial="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
</Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spinnerThresholdStateChanged"/>
<EventHandler event="propertyChange" listener="java.beans.PropertyChangeListener" parameters="java.beans.PropertyChangeEvent" handler="spinnerThresholdPropertyChange"/>
</Events>
</Component>
<Component class="ch.psi.pshell.swing.DeviceValuePanel" name="deviceValuePanel5">
<Properties>
<Property name="deviceName" type="java.lang.String" value="eiger_threshold_rbv"/>
</Properties>
</Component>
</SubComponents>
</Form>

View File

@@ -16,6 +16,7 @@ public class Eiger extends Panel {
ChannelInteger bitDepth;
ChannelInteger mode;
ChannelDouble exposure;
ChannelDouble threshold;
public Eiger() {
initComponents();
@@ -33,6 +34,7 @@ public class Eiger extends Panel {
bitDepth = ((ChannelInteger)getDevice("eiger_bit_depth"));
mode = ((ChannelInteger) getDevice("eiger_mode"));
exposure = ((ChannelDouble) getDevice("eiger_exposure"));
threshold = ((ChannelDouble) getDevice("eiger_threshold"));
startTimer(1000,10);
} catch (Exception ex) {
showException(ex);
@@ -70,10 +72,15 @@ public class Eiger extends Panel {
try{
spinnerExposure.setValue(exposure.take());
} catch (Exception ex){
}
}
try{
spinnerThreshold.setValue(threshold.take());
} catch (Exception ex){
}
comboDepth.setEnabled(bitDepth.isInitialized());
comboMode.setEnabled(mode.isInitialized());
spinnerExposure.setEnabled(exposure.isInitialized());
spinnerExposure.setEnabled(exposure.isInitialized());
spinnerThreshold.setEnabled(threshold.isInitialized());
} finally{
updatingControls=false;
@@ -131,6 +138,9 @@ public class Eiger extends Panel {
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
textFOV = new javax.swing.JTextField();
jLabel8 = new javax.swing.JLabel();
spinnerThreshold = new javax.swing.JSpinner();
deviceValuePanel5 = new ch.psi.pshell.swing.DeviceValuePanel();
renderer.setDeviceName("image");
renderer.setMode(ch.psi.pshell.imaging.RendererMode.Stretch);
@@ -249,6 +259,23 @@ public class Eiger extends Panel {
textFOV.setDisabledTextColor(new java.awt.Color(0, 0, 0));
textFOV.setEnabled(false);
jLabel8.setText("Threshold [eV]:");
spinnerThreshold.setModel(new javax.swing.SpinnerNumberModel(0.0d, null, null, 1.0d));
spinnerThreshold.setEnabled(false);
spinnerThreshold.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
spinnerThresholdStateChanged(evt);
}
});
spinnerThreshold.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
spinnerThresholdPropertyChange(evt);
}
});
deviceValuePanel5.setDeviceName("eiger_threshold_rbv");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -278,16 +305,26 @@ public class Eiger extends Panel {
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(textFOV, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(spinnerExposure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(deviceValuePanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addGroup(layout.createSequentialGroup()
.addComponent(textFOV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel8)
.addGap(10, 10, 10)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addComponent(spinnerThreshold, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(deviceValuePanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
@@ -307,7 +344,7 @@ public class Eiger extends Panel {
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(buttonCloseVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonOpenVG10, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(39, 39, 39))))
.addGap(166, 166, 166))))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboDepth, comboMode, deviceValuePanel1, deviceValuePanel2, deviceValuePanel3, spinnerExposure, textFOV});
@@ -338,9 +375,13 @@ public class Eiger extends Panel {
.addComponent(deviceValuePanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonShowDetectorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(textFOV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(deviceValuePanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel7)
.addComponent(textFOV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel8)
.addComponent(spinnerThreshold, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(36, 36, 36)
@@ -527,6 +568,27 @@ public class Eiger extends Panel {
}//GEN-LAST:event_spinnerMinStateChanged
private void spinnerThresholdStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerThresholdStateChanged
try{
if (!updatingControls){
ch.psi.pshell.device.Camera eiger = (ch.psi.pshell.device.Camera) getDevice("eiger");
if (eiger.isStarted()){
buttonDoneActionPerformed(null);
eiger.waitState(State.Ready, 10000); //Timeout of 10s
}
//((ch.psi.pshell.device.Camera) getDevice("eiger")).stop();
//TimeUnit.SECONDS.sleep(1);
threshold.write((Double)spinnerThreshold.getValue());
}
} catch (Exception ex){
showException(ex);
}
}//GEN-LAST:event_spinnerThresholdStateChanged
private void spinnerThresholdPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_spinnerThresholdPropertyChange
// TODO add your handling code here:
}//GEN-LAST:event_spinnerThresholdPropertyChange
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAquire;
private javax.swing.JButton buttonCloseVG10;
@@ -541,6 +603,7 @@ public class Eiger extends Panel {
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel2;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel3;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel4;
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel5;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
@@ -548,10 +611,12 @@ public class Eiger extends Panel {
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private ch.psi.pshell.imaging.Renderer renderer;
private javax.swing.JSpinner spinnerExposure;
private javax.swing.JSpinner spinnerMax;
private javax.swing.JSpinner spinnerMin;
private javax.swing.JSpinner spinnerThreshold;
private javax.swing.JTextField textFOV;
// End of variables declaration//GEN-END:variables
}

View File

@@ -11,7 +11,6 @@
<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"/>
<AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,91"/>
</AuxValues>
<Layout>

View File

@@ -17,7 +17,14 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="79" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="checkSetting2" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting3" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting4" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting1" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="ButtonDefaultOptics10kV" linkSize="1" min="-2" max="-2" attributes="0"/>
@@ -52,7 +59,7 @@
<Component id="label7" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<EmptySpace pref="68" max="32767" attributes="0"/>
<EmptySpace pref="117" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -61,7 +68,8 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="46" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="ButtonDefaultOptics15kV" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting1" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="ButtonDefaultOptics15kV" min="-2" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="label4" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
@@ -71,13 +79,22 @@
<EmptySpace min="-2" pref="39" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<Component id="ButtonDefaultOptics10kV" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="ButtonDefaultOptics10kV" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting2" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0">
<Group type="102" attributes="0">
<Component id="ButtonDefaultXrays" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="ButtonDefaultXrays" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting3" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace min="-2" pref="42" max="-2" attributes="0"/>
<Component id="ButtonNeutralizePosition" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="ButtonNeutralizePosition" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="checkSetting4" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
<Group type="102" attributes="0">
<Component id="label1" min="-2" max="-2" attributes="0"/>
@@ -160,17 +177,17 @@
</Component>
<Component class="java.awt.Label" name="label5">
<Properties>
<Property name="text" type="java.lang.String" value=" FOV = 100 um, CA = open, Slit = open."/>
<Property name="text" type="java.lang.String" value=" FOV = 100 um"/>
</Properties>
</Component>
<Component class="java.awt.Label" name="label6">
<Properties>
<Property name="text" type="java.lang.String" value=" FOV = 100 um, CA = open, Slit = open."/>
<Property name="text" type="java.lang.String" value=" FOV = 100 um"/>
</Properties>
</Component>
<Component class="java.awt.Label" name="label7">
<Properties>
<Property name="text" type="java.lang.String" value="x,y = 0.0, tilt = 0.0"/>
<Property name="text" type="java.lang.String" value="x,y = 0.0, tilt = 0.0, CA = open, Slit = open, Close VG10."/>
</Properties>
</Component>
<Component class="javax.swing.JButton" name="buttonRunSelected">
@@ -181,5 +198,13 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonRunSelectedActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JCheckBox" name="checkSetting1">
</Component>
<Component class="javax.swing.JCheckBox" name="checkSetting2">
</Component>
<Component class="javax.swing.JCheckBox" name="checkSetting3">
</Component>
<Component class="javax.swing.JCheckBox" name="checkSetting4">
</Component>
</SubComponents>
</Form>

View File

@@ -70,6 +70,10 @@ public class XPEEM_Settings extends Panel {
label6 = new java.awt.Label();
label7 = new java.awt.Label();
buttonRunSelected = new javax.swing.JButton();
checkSetting1 = new javax.swing.JCheckBox();
checkSetting2 = new javax.swing.JCheckBox();
checkSetting3 = new javax.swing.JCheckBox();
checkSetting4 = new javax.swing.JCheckBox();
ButtonDefaultXrays.setText("X-rays (Standard)");
ButtonDefaultXrays.addActionListener(new java.awt.event.ActionListener() {
@@ -108,11 +112,11 @@ public class XPEEM_Settings extends Panel {
label4.setText("Obj. = 1475.0 mA, Stig. A,B = 0.0, Obj. Align. x,y = 0.0, Start voltage = 0.0,");
label5.setText(" FOV = 100 um, CA = open, Slit = open.");
label5.setText(" FOV = 100 um");
label6.setText(" FOV = 100 um, CA = open, Slit = open.");
label6.setText(" FOV = 100 um");
label7.setText("x,y = 0.0, tilt = 0.0");
label7.setText("x,y = 0.0, tilt = 0.0, CA = open, Slit = open, Close VG10.");
buttonRunSelected.setText("Run Selected");
buttonRunSelected.addActionListener(new java.awt.event.ActionListener() {
@@ -126,7 +130,13 @@ public class XPEEM_Settings extends Panel {
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(79, 79, 79)
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(checkSetting2)
.addComponent(checkSetting3)
.addComponent(checkSetting4)
.addComponent(checkSetting1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(ButtonDefaultOptics10kV)
@@ -152,7 +162,7 @@ public class XPEEM_Settings extends Panel {
.addComponent(ButtonNeutralizePosition, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(label7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(68, Short.MAX_VALUE))
.addContainerGap(117, Short.MAX_VALUE))
);
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {ButtonDefaultOptics10kV, ButtonDefaultOptics15kV, ButtonDefaultXrays, ButtonNeutralizePosition});
@@ -162,6 +172,7 @@ public class XPEEM_Settings extends Panel {
.addGroup(layout.createSequentialGroup()
.addGap(46, 46, 46)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(checkSetting1)
.addComponent(ButtonDefaultOptics15kV)
.addGroup(layout.createSequentialGroup()
.addComponent(label4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
@@ -170,13 +181,19 @@ public class XPEEM_Settings extends Panel {
.addGap(39, 39, 39)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(ButtonDefaultOptics10kV)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(ButtonDefaultOptics10kV)
.addComponent(checkSetting2))
.addGap(36, 36, 36)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addGroup(layout.createSequentialGroup()
.addComponent(ButtonDefaultXrays)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(ButtonDefaultXrays)
.addComponent(checkSetting3))
.addGap(42, 42, 42)
.addComponent(ButtonNeutralizePosition))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(ButtonNeutralizePosition)
.addComponent(checkSetting4)))
.addGroup(layout.createSequentialGroup()
.addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@ -252,32 +269,32 @@ public class XPEEM_Settings extends Panel {
getContext().startExecution(CommandSource.plugin, null, null,null, false);
new Thread(()->{
try{
if (true){
if (checkSetting1.isSelected()==true){
this.eval("peem_optics_default_15kV()", true);
}
if (true){
if (checkSetting2.isSelected()==true){
this.eval("peem_optics_default_10kV()", true);
}
if (true){
}
if (checkSetting3.isSelected()==true){
this.eval("xrays_default()", true);
}
if (true){
}
if (checkSetting4.isSelected()==true){
this.eval("neutralize_position()", true);
}
}
} catch (Exception ex){
getLogger().log(Level.WARNING, null, ex);
} finally{
getLogger().log(Level.WARNING, null, ex);
} finally{
try {
getContext().endExecution();
} catch (Context.ContextStateException ex) {
getLogger().log(Level.SEVERE, null, ex);
}
}
}).start();
}).start();
} catch (Exception ex) {
showException(ex);
}
}
}//GEN-LAST:event_buttonRunSelectedActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
@@ -286,6 +303,10 @@ public class XPEEM_Settings extends Panel {
private javax.swing.JButton ButtonDefaultXrays;
private javax.swing.JButton ButtonNeutralizePosition;
private javax.swing.JButton buttonRunSelected;
private javax.swing.JCheckBox checkSetting1;
private javax.swing.JCheckBox checkSetting2;
private javax.swing.JCheckBox checkSetting3;
private javax.swing.JCheckBox checkSetting4;
private java.awt.Label label1;
private java.awt.Label label2;
private java.awt.Label label3;