Closedown
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<Component id="panelData" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jPanel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="10" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jPanel3" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
@@ -50,84 +50,58 @@
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jScrollPane1" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerEnergies" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="separate" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerE2" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerE1" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="checkE3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="spinnerE3" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jLabel9" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel9" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="spinnerRampRate" linkSize="1" alignment="1" max="-2" attributes="0"/>
|
||||
<Component id="spinnerSleep" linkSize="1" alignment="1" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerEndField" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerStartField" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="spinnerRampRate" linkSize="1" alignment="1" max="-2" attributes="0"/>
|
||||
<Component id="spinnerSleep" linkSize="1" alignment="1" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace pref="298" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerEndField" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerStartField" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel10" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerOffset" linkSize="1" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="jLabel5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="comboMode" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace pref="24" max="32767" attributes="0"/>
|
||||
<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">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerE1" 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="spinnerE2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
@@ -138,62 +112,40 @@
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerEndField" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerRampRate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerSleep" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="comboMode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerOffset" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerEnergies" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="141" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerRampRate" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerE3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkE3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerSleep" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="comboMode" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerOffset" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="17" max="32767" attributes="0"/>
|
||||
<EmptySpace 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="E1:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerE1">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="707.9" maximum="9999.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="E2:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerE2">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="703.9" maximum="9999.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
@@ -246,22 +198,6 @@
|
||||
<Property name="text" type="java.lang.String" value="End Field:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerE3">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="703.9" maximum="9999.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkE3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="E3:"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkE3ActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
@@ -291,6 +227,64 @@
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="tableEnergies">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
|
||||
<Table columnCount="2" rowCount="2">
|
||||
<Column editable="false" title="Index" type="java.lang.Integer">
|
||||
<Data value="1"/>
|
||||
<Data value="2"/>
|
||||
</Column>
|
||||
<Column editable="true" title="Energy" type="java.lang.Double">
|
||||
<Data value="707.9"/>
|
||||
<Data value="703.9"/>
|
||||
</Column>
|
||||
</Table>
|
||||
</Property>
|
||||
<Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor">
|
||||
<TableColumnModel selectionModel="0">
|
||||
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
|
||||
<Title/>
|
||||
<Editor/>
|
||||
<Renderer/>
|
||||
</Column>
|
||||
<Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true">
|
||||
<Title/>
|
||||
<Editor/>
|
||||
<Renderer/>
|
||||
</Column>
|
||||
</TableColumnModel>
|
||||
</Property>
|
||||
<Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
|
||||
<TableHeader reorderingAllowed="true" resizingAllowed="true"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JLabel" name="jLabel13">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Energies:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerEnergies">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="2" maximum="9" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="stateChanged" listener="javax.swing.event.ChangeListener" parameters="javax.swing.event.ChangeEvent" handler="spinnerEnergiesStateChanged"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
|
||||
@@ -17,6 +17,7 @@ import java.util.logging.Logger;
|
||||
import javax.script.ScriptException;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -54,12 +55,13 @@ public class HystScan extends Panel {
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
buttonExecute.setEnabled(value);
|
||||
tableEnergies.setEnabled(value);
|
||||
for (Component c : panelParameters.getComponents()) {
|
||||
if (!(c instanceof JLabel)) {
|
||||
c.setEnabled(value);
|
||||
}
|
||||
}
|
||||
spinnerE3.setEnabled(value && checkE3.isSelected());
|
||||
//spinnerE3.setEnabled(value && checkE3.isSelected());
|
||||
}
|
||||
|
||||
Path getConfigFile() {
|
||||
@@ -164,10 +166,6 @@ public class HystScan extends Panel {
|
||||
private void initComponents() {
|
||||
|
||||
panelParameters = new javax.swing.JPanel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
spinnerE1 = new javax.swing.JSpinner();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
spinnerE2 = new javax.swing.JSpinner();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
spinnerRampRate = new javax.swing.JSpinner();
|
||||
jLabel9 = new javax.swing.JLabel();
|
||||
@@ -176,12 +174,14 @@ public class HystScan extends Panel {
|
||||
spinnerStartField = new javax.swing.JSpinner();
|
||||
spinnerEndField = new javax.swing.JSpinner();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
spinnerE3 = new javax.swing.JSpinner();
|
||||
checkE3 = new javax.swing.JCheckBox();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
comboMode = new javax.swing.JComboBox();
|
||||
jLabel10 = new javax.swing.JLabel();
|
||||
spinnerOffset = new javax.swing.JSpinner();
|
||||
jScrollPane1 = new javax.swing.JScrollPane();
|
||||
tableEnergies = new javax.swing.JTable();
|
||||
jLabel13 = new javax.swing.JLabel();
|
||||
spinnerEnergies = new javax.swing.JSpinner();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
buttonExecute = new javax.swing.JButton();
|
||||
buttonAbort = new javax.swing.JButton();
|
||||
@@ -197,16 +197,6 @@ public class HystScan extends Panel {
|
||||
|
||||
panelParameters.setBorder(javax.swing.BorderFactory.createTitledBorder("Parameters"));
|
||||
|
||||
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel1.setText("E1:");
|
||||
|
||||
spinnerE1.setModel(new javax.swing.SpinnerNumberModel(707.9d, 0.0d, 9999.0d, 1.0d));
|
||||
|
||||
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel2.setText("E2:");
|
||||
|
||||
spinnerE2.setModel(new javax.swing.SpinnerNumberModel(703.9d, 0.0d, 9999.0d, 1.0d));
|
||||
|
||||
jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel8.setText("Ramp Rate:");
|
||||
|
||||
@@ -227,16 +217,6 @@ public class HystScan extends Panel {
|
||||
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel4.setText("End Field:");
|
||||
|
||||
spinnerE3.setModel(new javax.swing.SpinnerNumberModel(703.9d, 0.0d, 9999.0d, 1.0d));
|
||||
spinnerE3.setEnabled(false);
|
||||
|
||||
checkE3.setText("E3:");
|
||||
checkE3.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
checkE3ActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel5.setText("Mode:");
|
||||
|
||||
@@ -247,74 +227,89 @@ public class HystScan extends Panel {
|
||||
|
||||
spinnerOffset.setModel(new javax.swing.SpinnerNumberModel(0.0d, -20.0d, 20.0d, 1.0d));
|
||||
|
||||
tableEnergies.setModel(new javax.swing.table.DefaultTableModel(
|
||||
new Object [][] {
|
||||
{ new Integer(1), new Double(707.9)},
|
||||
{ new Integer(2), new Double(703.9)}
|
||||
},
|
||||
new String [] {
|
||||
"Index", "Energy"
|
||||
}
|
||||
) {
|
||||
Class[] types = new Class [] {
|
||||
java.lang.Integer.class, java.lang.Double.class
|
||||
};
|
||||
boolean[] canEdit = new boolean [] {
|
||||
false, true
|
||||
};
|
||||
|
||||
public Class getColumnClass(int columnIndex) {
|
||||
return types [columnIndex];
|
||||
}
|
||||
|
||||
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
||||
return canEdit [columnIndex];
|
||||
}
|
||||
});
|
||||
jScrollPane1.setViewportView(tableEnergies);
|
||||
|
||||
jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel13.setText("Energies:");
|
||||
|
||||
spinnerEnergies.setModel(new javax.swing.SpinnerNumberModel(2, 1, 9, 1));
|
||||
spinnerEnergies.addChangeListener(new javax.swing.event.ChangeListener() {
|
||||
public void stateChanged(javax.swing.event.ChangeEvent evt) {
|
||||
spinnerEnergiesStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout panelParametersLayout = new javax.swing.GroupLayout(panelParameters);
|
||||
panelParameters.setLayout(panelParametersLayout);
|
||||
panelParametersLayout.setHorizontalGroup(
|
||||
panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addContainerGap()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel13)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerEnergies, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerE2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerE1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(checkE3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(spinnerE3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerRampRate, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerSleep, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerEndField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerStartField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addContainerGap(298, Short.MAX_VALUE)
|
||||
.addComponent(spinnerRampRate, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerSleep, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerEndField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerStartField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel10)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerOffset, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelParametersLayout.createSequentialGroup()
|
||||
.addComponent(jLabel5)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(24, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
panelParametersLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboMode, spinnerEndField, spinnerOffset, spinnerRampRate, spinnerSleep, spinnerStartField});
|
||||
|
||||
panelParametersLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerE1, spinnerE2, spinnerE3});
|
||||
|
||||
panelParametersLayout.setVerticalGroup(
|
||||
panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(spinnerE1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(spinnerE2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3)
|
||||
@@ -322,26 +317,29 @@ public class HystScan extends Panel {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel4)
|
||||
.addComponent(spinnerEndField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel8)
|
||||
.addComponent(spinnerRampRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerE3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(checkE3))
|
||||
.addGap(5, 5, 5)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerSleep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel9))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel10)
|
||||
.addComponent(spinnerOffset, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(17, Short.MAX_VALUE))
|
||||
.addComponent(spinnerEndField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel8)
|
||||
.addComponent(spinnerRampRate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(5, 5, 5)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerSleep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel9))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(comboMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel10)
|
||||
.addComponent(spinnerOffset, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel13)
|
||||
.addComponent(spinnerEnergies, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addGroup(panelParametersLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Scan Control"));
|
||||
@@ -483,7 +481,7 @@ public class HystScan extends Panel {
|
||||
.addComponent(panelData, 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.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
);
|
||||
@@ -495,18 +493,27 @@ public class HystScan extends Panel {
|
||||
eval("FILENAME = '" + file+"'");
|
||||
|
||||
HashMap args = new HashMap();
|
||||
|
||||
ArrayList<Double> energies = new ArrayList<>();
|
||||
int rows = (Integer)spinnerEnergies.getValue();
|
||||
((DefaultTableModel)tableEnergies.getModel()).setNumRows(rows);
|
||||
for (int i=0; i<tableEnergies.getRowCount(); i++){
|
||||
energies.add((Double)((DefaultTableModel)tableEnergies.getModel()).getValueAt(i, 1));
|
||||
}
|
||||
|
||||
/*
|
||||
Double e1 = (Double) spinnerE1.getValue();
|
||||
Double e2 = (Double) spinnerE2.getValue();
|
||||
//args.put("E1", e1);
|
||||
//args.put("E2", e2);
|
||||
|
||||
ArrayList<Double> energies = new ArrayList<>();
|
||||
|
||||
energies.add(e1);
|
||||
energies.add(e2);
|
||||
if (checkE3.isSelected()){
|
||||
Double e3 = (Double) spinnerE3.getValue();
|
||||
energies.add(e3);
|
||||
}
|
||||
*/
|
||||
args.put("ENERGIES", energies);
|
||||
args.put("START_FIELD", (Double) spinnerStartField.getValue());
|
||||
args.put("END_FIELD", (Double) spinnerEndField.getValue());
|
||||
@@ -538,10 +545,6 @@ public class HystScan extends Panel {
|
||||
abort();
|
||||
}//GEN-LAST:event_buttonAbortActionPerformed
|
||||
|
||||
private void checkE3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkE3ActionPerformed
|
||||
spinnerE3.setEnabled(checkE3.isSelected());
|
||||
}//GEN-LAST:event_checkE3ActionPerformed
|
||||
|
||||
private void buttonDefaultsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDefaultsActionPerformed
|
||||
textFile.setText("{el}_hyst_{mode}");
|
||||
}//GEN-LAST:event_buttonDefaultsActionPerformed
|
||||
@@ -570,19 +573,25 @@ public class HystScan extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_comboRunTypeActionPerformed
|
||||
|
||||
private void spinnerEnergiesStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerEnergiesStateChanged
|
||||
int rows = (Integer)spinnerEnergies.getValue();
|
||||
((DefaultTableModel)tableEnergies.getModel()).setNumRows(rows);
|
||||
for (int i=0; i<rows; i++){
|
||||
((DefaultTableModel)tableEnergies.getModel()).setValueAt(i+1, i, 0);
|
||||
}
|
||||
}//GEN-LAST:event_spinnerEnergiesStateChanged
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.JButton buttonDefaults;
|
||||
private javax.swing.JButton buttonExecute;
|
||||
private javax.swing.JCheckBox checkE3;
|
||||
private javax.swing.JComboBox comboMode;
|
||||
private javax.swing.JComboBox comboRunType;
|
||||
private javax.swing.JComboBox comboSetup;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel12;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel13;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
@@ -591,16 +600,16 @@ public class HystScan extends Panel {
|
||||
private javax.swing.JLabel jLabel9;
|
||||
private javax.swing.JPanel jPanel1;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private javax.swing.JScrollPane jScrollPane1;
|
||||
private javax.swing.JPanel panelData;
|
||||
private javax.swing.JPanel panelParameters;
|
||||
private javax.swing.JSpinner spinnerE1;
|
||||
private javax.swing.JSpinner spinnerE2;
|
||||
private javax.swing.JSpinner spinnerE3;
|
||||
private javax.swing.JSpinner spinnerEndField;
|
||||
private javax.swing.JSpinner spinnerEnergies;
|
||||
private javax.swing.JSpinner spinnerOffset;
|
||||
private javax.swing.JSpinner spinnerRampRate;
|
||||
private javax.swing.JSpinner spinnerSleep;
|
||||
private javax.swing.JSpinner spinnerStartField;
|
||||
private javax.swing.JTable tableEnergies;
|
||||
private javax.swing.JTextField textFile;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user