Startup
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,9 +2,8 @@
|
||||
/sessions
|
||||
/context
|
||||
/log
|
||||
/plugins
|
||||
/extensions
|
||||
script/cachedir
|
||||
script/Lib
|
||||
script/*.class
|
||||
/script/
|
||||
/script/
|
||||
|
||||
BIN
plugins/HoloScan$1.class
Normal file
BIN
plugins/HoloScan$1.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan$2.class
Normal file
BIN
plugins/HoloScan$2.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan$3.class
Normal file
BIN
plugins/HoloScan$3.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan$4.class
Normal file
BIN
plugins/HoloScan$4.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan$5.class
Normal file
BIN
plugins/HoloScan$5.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan$6.class
Normal file
BIN
plugins/HoloScan$6.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan$7.class
Normal file
BIN
plugins/HoloScan$7.class
Normal file
Binary file not shown.
BIN
plugins/HoloScan.class
Normal file
BIN
plugins/HoloScan.class
Normal file
Binary file not shown.
626
plugins/HoloScan.form
Normal file
626
plugins/HoloScan.form
Normal file
@@ -0,0 +1,626 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup1">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup2">
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<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" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="panelSensors" linkSize="8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="panelPhi" linkSize="8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jPanel3" linkSize="8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelPhi" max="32767" attributes="0"/>
|
||||
<Component id="panelSensors" pref="538" max="32767" attributes="0"/>
|
||||
<Component id="jPanel3" alignment="0" pref="538" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelPhi">
|
||||
<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="Positioners"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[239, 538]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel6" linkSize="6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="motorPanelPhi" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="jLabel7" linkSize="6" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="motorPanelTheta" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="radioSteps" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioStepSize" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="16" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel4" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel9" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel10" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="spinnerFromPhi" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerRangePhi" linkSize="4" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerToPhi" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerFromTheta" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerToTheta" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerRangeTheta" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel11" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerStepSizePhi" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel12" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerStepSizeTheta" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="jLabel14" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel13" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="6" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="spinnerStepsPhi" linkSize="4" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerStepsTheta" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel6" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="motorPanelPhi" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel7" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="motorPanelTheta" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerFromPhi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerToPhi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerFromTheta" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerToTheta" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerRangePhi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerRangeTheta" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioStepSize" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerStepSizePhi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerStepSizeTheta" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Component id="radioSteps" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerStepsPhi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerStepsTheta" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel14" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="ch.psi.pshell.swing.MotorReadoutPanel" name="motorPanelPhi">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Range Phi:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerRangePhi">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="100.0" minimum="0.001" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioStepSize">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Step Size"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioStepSizeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioSteps">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Number of Steps"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioStepSizeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerStepSizePhi">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0.1" maximum="10.0" minimum="0.001" numberType="java.lang.Double" stepSize="0.1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerStepsPhi">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="10" maximum="1000" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioAbsolute">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup2"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Absolute Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioAbsoluteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerFromPhi">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Phi From:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Phi To:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerToPhi">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioRelative">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup2"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Relative Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioAbsoluteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Phi:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||
<Properties>
|
||||
<Property name="horizontalAlignment" type="int" value="11"/>
|
||||
<Property name="text" type="java.lang.String" value="Theta:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.MotorReadoutPanel" name="motorPanelTheta">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Theta To:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel9">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Theta From:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerFromTheta">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerToTheta">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel10">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Range Theta:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerRangeTheta">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="100.0" minimum="0.001" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel11">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Phi:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel12">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Theta:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerStepSizeTheta">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0.1" maximum="10.0" minimum="0.001" numberType="java.lang.Double" stepSize="0.1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel13">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Phi:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel14">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Theta:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerStepsTheta">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="10" maximum="1000" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelSensors">
|
||||
<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="Sensors"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[239, 422]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonScientaSetup" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="checkImage" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkImageIntegration" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkSpectrum" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkTotalCount" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts4" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCurrent" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="14" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkImage" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkImageIntegration" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkSpectrum" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkTotalCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCurrent" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<Component id="buttonScientaSetup" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JCheckBox" name="checkImage">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Image"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="scienta.dataMatrix" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkImageIntegration">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Image Integration"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="integration" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkSpectrum">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Spectrum"/>
|
||||
<Property name="name" type="java.lang.String" value="scienta.spectrum" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 1"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkTotalCount">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Total Counts"/>
|
||||
<Property name="name" type="java.lang.String" value="counts" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 2"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 3"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 4"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCurrent">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Current"/>
|
||||
<Property name="name" type="java.lang.String" value="current" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 1"/>
|
||||
<Property name="name" type="java.lang.String" value="cur1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 2"/>
|
||||
<Property name="name" type="java.lang.String" value="cur2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 3"/>
|
||||
<Property name="name" type="java.lang.String" value="cur3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonScientaSetup">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Setup"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonScientaSetupActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<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="Scan Control"/>
|
||||
</Border>
|
||||
</Property>
|
||||
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
|
||||
<Dimension value="[239, 119]"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonStart" max="32767" attributes="0"/>
|
||||
<Component id="buttonAbort" pref="203" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="buttonStart" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="buttonAbort" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="buttonStart">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Start"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStartActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonAbort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Abort"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonAbortActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
630
plugins/HoloScan.java
Normal file
630
plugins/HoloScan.java
Normal file
@@ -0,0 +1,630 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
|
||||
*/
|
||||
|
||||
import ch.psi.pshell.dev.Motor;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.awt.Component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.SpinnerNumberModel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class HoloScan extends Panel {
|
||||
|
||||
public HoloScan() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
//Overridable callbacks
|
||||
@Override
|
||||
public void onInitialize(int runCount) {
|
||||
Motor phi = (Motor) getDevice("phi");
|
||||
Motor theta = (Motor) getDevice("theta");
|
||||
motorPanelPhi.setDevice(phi);
|
||||
motorPanelTheta.setDevice(theta);
|
||||
spinnerFromPhi.setModel(new SpinnerNumberModel(phi.getMinValue(), phi.getMinValue(), phi.getMaxValue(), 1.0));
|
||||
spinnerToPhi.setModel(new SpinnerNumberModel(phi.getMaxValue(), phi.getMinValue(), phi.getMaxValue(), 1.0));
|
||||
spinnerFromTheta.setModel(new SpinnerNumberModel(theta.getMinValue(), theta.getMinValue(), theta.getMaxValue(), 1.0));
|
||||
spinnerToTheta.setModel(new SpinnerNumberModel(theta.getMaxValue(), theta.getMinValue(), theta.getMaxValue(), 1.0));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateChange(State state, State former) {
|
||||
setEnabled(isEnabled());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecutedFile(String fileName, Object result) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
buttonAbort.setEnabled(value && getState().isInitialized());
|
||||
|
||||
boolean enableControls = (value && (getState()==State.Ready));
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
c.setEnabled(enableControls);
|
||||
}
|
||||
for (Component c : panelPhi.getComponents()) {
|
||||
c.setEnabled(enableControls);
|
||||
}
|
||||
buttonStart.setEnabled(enableControls);
|
||||
|
||||
spinnerStepSizePhi.setEnabled(enableControls && radioStepSize.isSelected());
|
||||
spinnerStepsPhi.setEnabled(enableControls && radioSteps.isSelected());
|
||||
spinnerFromPhi.setEnabled(enableControls && radioAbsolute.isSelected());
|
||||
spinnerToPhi.setEnabled(enableControls && radioAbsolute.isSelected());
|
||||
spinnerRangePhi.setEnabled(enableControls && !radioAbsolute.isSelected());
|
||||
|
||||
spinnerStepSizeTheta.setEnabled(spinnerStepSizePhi.isEnabled());
|
||||
spinnerStepsTheta.setEnabled(spinnerStepsPhi.isEnabled());
|
||||
spinnerFromTheta.setEnabled(spinnerFromPhi.isEnabled());
|
||||
spinnerToTheta.setEnabled(spinnerToPhi.isEnabled());
|
||||
spinnerRangeTheta.setEnabled(spinnerRangePhi.isEnabled());
|
||||
}
|
||||
|
||||
void startScan() throws Exception{
|
||||
HashMap<String, Object> args = new HashMap<>();
|
||||
ArrayList<String> sensors = new ArrayList();
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
if ((c instanceof JCheckBox) && ((JCheckBox) c).isSelected()) {
|
||||
sensors.add(c.getName());
|
||||
}
|
||||
}
|
||||
args.put("SENSORS", sensors);
|
||||
if (radioRelative.isSelected()) {
|
||||
args.put("PHI_RANGE", new Double[]{-(Double) spinnerRangePhi.getValue() / 2, (Double) spinnerRangePhi.getValue() / 2});
|
||||
args.put("THETA_RANGE", new Double[]{-(Double) spinnerRangeTheta.getValue() / 2, (Double) spinnerRangeTheta.getValue() / 2});
|
||||
} else {
|
||||
args.put("PHI_RANGE", new Double[]{(Double) spinnerFromPhi.getValue(), (Double) spinnerToPhi.getValue()});
|
||||
args.put("THETA_RANGE", new Double[]{(Double) spinnerFromTheta.getValue(), (Double) spinnerToTheta.getValue()});
|
||||
}
|
||||
ArrayList steps = new ArrayList();
|
||||
if (radioStepSize.isSelected()) {
|
||||
steps.add((Double) spinnerStepSizePhi.getValue());
|
||||
steps.add((Double) spinnerStepSizeTheta.getValue());
|
||||
} else {
|
||||
steps.add((Integer) spinnerStepsPhi.getValue());
|
||||
steps.add((Integer) spinnerStepsTheta.getValue());
|
||||
}
|
||||
args.put("STEPS", steps);
|
||||
args.put("LATENCY", (Double) 0.0);
|
||||
args.put("RELATIVE", radioRelative.isSelected());
|
||||
|
||||
runAsync("HoloScan", args);
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
buttonGroup1 = new javax.swing.ButtonGroup();
|
||||
buttonGroup2 = new javax.swing.ButtonGroup();
|
||||
panelPhi = new javax.swing.JPanel();
|
||||
motorPanelPhi = new ch.psi.pshell.swing.MotorReadoutPanel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
spinnerRangePhi = new javax.swing.JSpinner();
|
||||
radioStepSize = new javax.swing.JRadioButton();
|
||||
radioSteps = new javax.swing.JRadioButton();
|
||||
spinnerStepSizePhi = new javax.swing.JSpinner();
|
||||
spinnerStepsPhi = new javax.swing.JSpinner();
|
||||
radioAbsolute = new javax.swing.JRadioButton();
|
||||
spinnerFromPhi = new javax.swing.JSpinner();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
spinnerToPhi = new javax.swing.JSpinner();
|
||||
radioRelative = new javax.swing.JRadioButton();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
motorPanelTheta = new ch.psi.pshell.swing.MotorReadoutPanel();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
jLabel9 = new javax.swing.JLabel();
|
||||
spinnerFromTheta = new javax.swing.JSpinner();
|
||||
spinnerToTheta = new javax.swing.JSpinner();
|
||||
jLabel10 = new javax.swing.JLabel();
|
||||
spinnerRangeTheta = new javax.swing.JSpinner();
|
||||
jLabel11 = new javax.swing.JLabel();
|
||||
jLabel12 = new javax.swing.JLabel();
|
||||
spinnerStepSizeTheta = new javax.swing.JSpinner();
|
||||
jLabel13 = new javax.swing.JLabel();
|
||||
jLabel14 = new javax.swing.JLabel();
|
||||
spinnerStepsTheta = new javax.swing.JSpinner();
|
||||
panelSensors = new javax.swing.JPanel();
|
||||
checkImage = new javax.swing.JCheckBox();
|
||||
checkImageIntegration = new javax.swing.JCheckBox();
|
||||
checkSpectrum = new javax.swing.JCheckBox();
|
||||
checkCounts1 = new javax.swing.JCheckBox();
|
||||
checkTotalCount = new javax.swing.JCheckBox();
|
||||
checkCounts2 = new javax.swing.JCheckBox();
|
||||
checkCounts3 = new javax.swing.JCheckBox();
|
||||
checkCounts4 = new javax.swing.JCheckBox();
|
||||
checkCurrent = new javax.swing.JCheckBox();
|
||||
checkCur1 = new javax.swing.JCheckBox();
|
||||
checkCur2 = new javax.swing.JCheckBox();
|
||||
checkCur3 = new javax.swing.JCheckBox();
|
||||
buttonScientaSetup = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
buttonStart = new javax.swing.JButton();
|
||||
buttonAbort = new javax.swing.JButton();
|
||||
|
||||
panelPhi.setBorder(javax.swing.BorderFactory.createTitledBorder("Positioners"));
|
||||
panelPhi.setPreferredSize(new java.awt.Dimension(239, 538));
|
||||
|
||||
jLabel2.setText("Range Phi:");
|
||||
|
||||
spinnerRangePhi.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.001d, 100.0d, 1.0d));
|
||||
spinnerRangePhi.setEnabled(false);
|
||||
|
||||
buttonGroup1.add(radioStepSize);
|
||||
radioStepSize.setSelected(true);
|
||||
radioStepSize.setText("Step Size");
|
||||
radioStepSize.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioStepSizeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonGroup1.add(radioSteps);
|
||||
radioSteps.setText("Number of Steps");
|
||||
radioSteps.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioStepSizeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerStepSizePhi.setModel(new javax.swing.SpinnerNumberModel(0.1d, 0.001d, 10.0d, 0.1d));
|
||||
|
||||
spinnerStepsPhi.setModel(new javax.swing.SpinnerNumberModel(10, 1, 1000, 1));
|
||||
spinnerStepsPhi.setEnabled(false);
|
||||
|
||||
buttonGroup2.add(radioAbsolute);
|
||||
radioAbsolute.setSelected(true);
|
||||
radioAbsolute.setText("Absolute Scan");
|
||||
radioAbsolute.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioAbsoluteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerFromPhi.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
jLabel4.setText("Phi From:");
|
||||
|
||||
jLabel5.setText("Phi To:");
|
||||
|
||||
spinnerToPhi.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
buttonGroup2.add(radioRelative);
|
||||
radioRelative.setText("Relative Scan");
|
||||
radioRelative.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioAbsoluteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel6.setText("Phi:");
|
||||
|
||||
jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||
jLabel7.setText("Theta:");
|
||||
|
||||
jLabel8.setText("Theta To:");
|
||||
|
||||
jLabel9.setText("Theta From:");
|
||||
|
||||
spinnerFromTheta.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
spinnerToTheta.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
jLabel10.setText("Range Theta:");
|
||||
|
||||
spinnerRangeTheta.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.001d, 100.0d, 1.0d));
|
||||
spinnerRangeTheta.setEnabled(false);
|
||||
|
||||
jLabel11.setText("Phi:");
|
||||
|
||||
jLabel12.setText("Theta:");
|
||||
|
||||
spinnerStepSizeTheta.setModel(new javax.swing.SpinnerNumberModel(0.1d, 0.001d, 10.0d, 0.1d));
|
||||
|
||||
jLabel13.setText("Phi:");
|
||||
|
||||
jLabel14.setText("Theta:");
|
||||
|
||||
spinnerStepsTheta.setModel(new javax.swing.SpinnerNumberModel(10, 1, 1000, 1));
|
||||
spinnerStepsTheta.setEnabled(false);
|
||||
|
||||
javax.swing.GroupLayout panelPhiLayout = new javax.swing.GroupLayout(panelPhi);
|
||||
panelPhi.setLayout(panelPhiLayout);
|
||||
panelPhiLayout.setHorizontalGroup(
|
||||
panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPhiLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPhiLayout.createSequentialGroup()
|
||||
.addComponent(jLabel6)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(motorPanelPhi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(panelPhiLayout.createSequentialGroup()
|
||||
.addComponent(jLabel7)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(motorPanelTheta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(panelPhiLayout.createSequentialGroup()
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(radioSteps)
|
||||
.addComponent(radioStepSize)
|
||||
.addComponent(radioAbsolute)
|
||||
.addComponent(radioRelative))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPhiLayout.createSequentialGroup()
|
||||
.addGap(0, 16, Short.MAX_VALUE)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPhiLayout.createSequentialGroup()
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel9, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel10, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(spinnerFromPhi, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerRangePhi, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerToPhi, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerFromTheta, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerToTheta, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerRangeTheta, javax.swing.GroupLayout.Alignment.TRAILING)))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPhiLayout.createSequentialGroup()
|
||||
.addComponent(jLabel11)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerStepSizePhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPhiLayout.createSequentialGroup()
|
||||
.addComponent(jLabel12)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerStepSizeTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPhiLayout.createSequentialGroup()
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel14)
|
||||
.addComponent(jLabel13))
|
||||
.addGap(6, 6, 6)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(spinnerStepsPhi, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(spinnerStepsTheta, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
panelPhiLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {radioStepSize, radioSteps});
|
||||
|
||||
panelPhiLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerRangePhi, spinnerStepSizePhi, spinnerStepsPhi});
|
||||
|
||||
panelPhiLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel6, jLabel7});
|
||||
|
||||
panelPhiLayout.setVerticalGroup(
|
||||
panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPhiLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(motorPanelPhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel7)
|
||||
.addComponent(motorPanelTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioAbsolute)
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerFromPhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4))
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerToPhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5))
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerFromTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel9))
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerToTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel8))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioRelative)
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(spinnerRangePhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel10)
|
||||
.addComponent(spinnerRangeTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioStepSize)
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerStepSizePhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel11))
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerStepSizeTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel12))
|
||||
.addGap(1, 1, 1)
|
||||
.addComponent(radioSteps)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerStepsPhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel13))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPhiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerStepsTheta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel14))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelSensors.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensors"));
|
||||
panelSensors.setPreferredSize(new java.awt.Dimension(239, 422));
|
||||
|
||||
checkImage.setSelected(true);
|
||||
checkImage.setText("Scienta Image");
|
||||
checkImage.setToolTipText("");
|
||||
checkImage.setContentAreaFilled(false);
|
||||
checkImage.setName("scienta.dataMatrix"); // NOI18N
|
||||
|
||||
checkImageIntegration.setSelected(true);
|
||||
checkImageIntegration.setText("Scienta Image Integration");
|
||||
checkImageIntegration.setToolTipText("");
|
||||
checkImageIntegration.setContentAreaFilled(false);
|
||||
checkImageIntegration.setName("integration"); // NOI18N
|
||||
|
||||
checkSpectrum.setSelected(true);
|
||||
checkSpectrum.setText("Scienta Spectrum");
|
||||
checkSpectrum.setName("scienta.spectrum"); // NOI18N
|
||||
|
||||
checkCounts1.setText("Counts Region 1");
|
||||
checkCounts1.setName("countsr1"); // NOI18N
|
||||
|
||||
checkTotalCount.setSelected(true);
|
||||
checkTotalCount.setText("Total Counts");
|
||||
checkTotalCount.setName("counts"); // NOI18N
|
||||
|
||||
checkCounts2.setText("Counts Region 2");
|
||||
checkCounts2.setName("countsr2"); // NOI18N
|
||||
|
||||
checkCounts3.setText("Counts Region 3");
|
||||
checkCounts3.setName("countsr3"); // NOI18N
|
||||
|
||||
checkCounts4.setText("Counts Region 4");
|
||||
checkCounts4.setName("countsr4"); // NOI18N
|
||||
|
||||
checkCurrent.setText("Current");
|
||||
checkCurrent.setName("current"); // NOI18N
|
||||
|
||||
checkCur1.setText("Cur 1");
|
||||
checkCur1.setName("cur1"); // NOI18N
|
||||
|
||||
checkCur2.setText("Cur 2");
|
||||
checkCur2.setName("cur2"); // NOI18N
|
||||
|
||||
checkCur3.setText("Cur 3");
|
||||
checkCur3.setName("cur3"); // NOI18N
|
||||
|
||||
buttonScientaSetup.setText("Scienta Setup");
|
||||
buttonScientaSetup.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonScientaSetupActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout panelSensorsLayout = new javax.swing.GroupLayout(panelSensors);
|
||||
panelSensors.setLayout(panelSensorsLayout);
|
||||
panelSensorsLayout.setHorizontalGroup(
|
||||
panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonScientaSetup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addGroup(panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(checkImage)
|
||||
.addComponent(checkImageIntegration)
|
||||
.addComponent(checkSpectrum)
|
||||
.addComponent(checkCounts1)
|
||||
.addComponent(checkTotalCount)
|
||||
.addComponent(checkCounts2)
|
||||
.addComponent(checkCounts3)
|
||||
.addComponent(checkCounts4)
|
||||
.addComponent(checkCurrent)
|
||||
.addComponent(checkCur1)
|
||||
.addComponent(checkCur2)
|
||||
.addComponent(checkCur3))
|
||||
.addGap(0, 14, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
panelSensorsLayout.setVerticalGroup(
|
||||
panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(checkImage)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkImageIntegration)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkSpectrum)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkTotalCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCurrent)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur3)
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addComponent(buttonScientaSetup)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Scan Control"));
|
||||
jPanel3.setPreferredSize(new java.awt.Dimension(239, 119));
|
||||
|
||||
buttonStart.setText("Start");
|
||||
buttonStart.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonStartActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonAbort.setText("Abort");
|
||||
buttonAbort.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonAbortActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonAbort, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(buttonStart)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(buttonAbort)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(panelSensors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(panelPhi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jPanel3, panelPhi, panelSensors});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelPhi, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelSensors, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, 538, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void buttonScientaSetupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScientaSetupActionPerformed
|
||||
try{
|
||||
showDevicePanel("scienta");
|
||||
} catch (Exception ex){
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonScientaSetupActionPerformed
|
||||
|
||||
private void buttonStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartActionPerformed
|
||||
try{
|
||||
startScan();
|
||||
} catch (Exception ex){
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonStartActionPerformed
|
||||
|
||||
private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed
|
||||
abort();
|
||||
}//GEN-LAST:event_buttonAbortActionPerformed
|
||||
|
||||
private void radioStepSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioStepSizeActionPerformed
|
||||
setEnabled(isEnabled());
|
||||
}//GEN-LAST:event_radioStepSizeActionPerformed
|
||||
|
||||
private void radioAbsoluteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioAbsoluteActionPerformed
|
||||
setEnabled(isEnabled());
|
||||
}//GEN-LAST:event_radioAbsoluteActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.ButtonGroup buttonGroup1;
|
||||
private javax.swing.ButtonGroup buttonGroup2;
|
||||
private javax.swing.JButton buttonScientaSetup;
|
||||
private javax.swing.JButton buttonStart;
|
||||
private javax.swing.JCheckBox checkCounts1;
|
||||
private javax.swing.JCheckBox checkCounts2;
|
||||
private javax.swing.JCheckBox checkCounts3;
|
||||
private javax.swing.JCheckBox checkCounts4;
|
||||
private javax.swing.JCheckBox checkCur1;
|
||||
private javax.swing.JCheckBox checkCur2;
|
||||
private javax.swing.JCheckBox checkCur3;
|
||||
private javax.swing.JCheckBox checkCurrent;
|
||||
private javax.swing.JCheckBox checkImage;
|
||||
private javax.swing.JCheckBox checkImageIntegration;
|
||||
private javax.swing.JCheckBox checkSpectrum;
|
||||
private javax.swing.JCheckBox checkTotalCount;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
private javax.swing.JLabel jLabel11;
|
||||
private javax.swing.JLabel jLabel12;
|
||||
private javax.swing.JLabel jLabel13;
|
||||
private javax.swing.JLabel jLabel14;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
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.JLabel jLabel9;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private ch.psi.pshell.swing.MotorReadoutPanel motorPanelPhi;
|
||||
private ch.psi.pshell.swing.MotorReadoutPanel motorPanelTheta;
|
||||
private javax.swing.JPanel panelPhi;
|
||||
private javax.swing.JPanel panelSensors;
|
||||
private javax.swing.JRadioButton radioAbsolute;
|
||||
private javax.swing.JRadioButton radioRelative;
|
||||
private javax.swing.JRadioButton radioStepSize;
|
||||
private javax.swing.JRadioButton radioSteps;
|
||||
private javax.swing.JSpinner spinnerFromPhi;
|
||||
private javax.swing.JSpinner spinnerFromTheta;
|
||||
private javax.swing.JSpinner spinnerRangePhi;
|
||||
private javax.swing.JSpinner spinnerRangeTheta;
|
||||
private javax.swing.JSpinner spinnerStepSizePhi;
|
||||
private javax.swing.JSpinner spinnerStepSizeTheta;
|
||||
private javax.swing.JSpinner spinnerStepsPhi;
|
||||
private javax.swing.JSpinner spinnerStepsTheta;
|
||||
private javax.swing.JSpinner spinnerToPhi;
|
||||
private javax.swing.JSpinner spinnerToTheta;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
|
||||
BIN
plugins/ManipulatorScan$1.class
Normal file
BIN
plugins/ManipulatorScan$1.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$2.class
Normal file
BIN
plugins/ManipulatorScan$2.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$3.class
Normal file
BIN
plugins/ManipulatorScan$3.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$4.class
Normal file
BIN
plugins/ManipulatorScan$4.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$5.class
Normal file
BIN
plugins/ManipulatorScan$5.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$6.class
Normal file
BIN
plugins/ManipulatorScan$6.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$7.class
Normal file
BIN
plugins/ManipulatorScan$7.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$8.class
Normal file
BIN
plugins/ManipulatorScan$8.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$1.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$1.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$2.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$2.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$3.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$3.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$4.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$4.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$5.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$5.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$6.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$6.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$7.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$7.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel$8.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel$8.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan$PluginPanel.class
Normal file
BIN
plugins/ManipulatorScan$PluginPanel.class
Normal file
Binary file not shown.
BIN
plugins/ManipulatorScan.class
Normal file
BIN
plugins/ManipulatorScan.class
Normal file
Binary file not shown.
557
plugins/ManipulatorScan.form
Normal file
557
plugins/ManipulatorScan.form
Normal file
@@ -0,0 +1,557 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup1">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup2">
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<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" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="panelSensors" linkSize="7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="panelPositioner" linkSize="7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jPanel3" linkSize="7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelPositioner" max="32767" attributes="0"/>
|
||||
<Component id="panelSensors" max="32767" attributes="0"/>
|
||||
<Component id="jPanel3" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelPositioner">
|
||||
<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="Positioner"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="radioSteps" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="motorPanel" max="32767" attributes="0"/>
|
||||
<Component id="comboMotor" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="41" max="32767" attributes="0"/>
|
||||
<Component id="spinnerLatency" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="radioStepSize" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel4" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel7" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="spinnerFrom" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerRange" linkSize="4" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerTo" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="jLabel8" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerSteps" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="txtSize" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="spinnerStepSize" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="comboMotor" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel6" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="motorPanel" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerFrom" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerTo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerRange" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioStepSize" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerStepSize" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtSize" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="12" max="-2" attributes="0"/>
|
||||
<Component id="radioSteps" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerSteps" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerLatency" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Motor:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboMotor">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="7">
|
||||
<StringItem index="0" value="dummy"/>
|
||||
<StringItem index="1" value="x"/>
|
||||
<StringItem index="2" value="y"/>
|
||||
<StringItem index="3" value="z"/>
|
||||
<StringItem index="4" value="theta"/>
|
||||
<StringItem index="5" value="tilt"/>
|
||||
<StringItem index="6" value="phi"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboMotorActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.MotorReadoutPanel" name="motorPanel">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="txtSize">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Size:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerRange">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="100.0" minimum="0.001" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioStepSize">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Step Size"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioStepSizeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioSteps">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Number of Steps"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioStepSizeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerStepSize">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0.1" maximum="10.0" minimum="0.001" numberType="java.lang.Double" stepSize="0.1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerSteps">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="10" maximum="1000" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Latency(s):"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerLatency">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0.0" maximum="10.0" minimum="0.0" numberType="java.lang.Double" stepSize="0.1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioAbsolute">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup2"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Absolute Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioAbsoluteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerFrom">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="From:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="To:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerTo">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioRelative">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup2"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Relative Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioAbsoluteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Position:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel7">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Range:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel8">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Steps:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelSensors">
|
||||
<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="Sensors"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonScientaSetup" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="checkImage" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkImageIntegration" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkSpectrum" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkTotalCount" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCurrent" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts4" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="14" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkImage" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkImageIntegration" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkSpectrum" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkTotalCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCurrent" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<Component id="buttonScientaSetup" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JCheckBox" name="checkImage">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Image"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="scienta.dataMatrix" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkImageIntegration">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Image Integration"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="integration" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkSpectrum">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Spectrum"/>
|
||||
<Property name="name" type="java.lang.String" value="scienta.spectrum" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 1"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkTotalCount">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Total Counts"/>
|
||||
<Property name="name" type="java.lang.String" value="counts" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 2"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 3"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 4"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCurrent">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Current"/>
|
||||
<Property name="name" type="java.lang.String" value="current" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 1"/>
|
||||
<Property name="name" type="java.lang.String" value="cur1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 2"/>
|
||||
<Property name="name" type="java.lang.String" value="cur2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 3"/>
|
||||
<Property name="name" type="java.lang.String" value="cur3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonScientaSetup">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Setup"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonScientaSetupActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<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="Scan Control"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonStart" max="32767" attributes="0"/>
|
||||
<Component id="buttonAbort" pref="203" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="buttonStart" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="buttonAbort" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="buttonStart">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Start"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStartActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonAbort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Abort"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonAbortActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
530
plugins/ManipulatorScan.form~
Normal file
530
plugins/ManipulatorScan.form~
Normal file
@@ -0,0 +1,530 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<NonVisualComponents>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup1">
|
||||
</Component>
|
||||
<Component class="javax.swing.ButtonGroup" name="buttonGroup2">
|
||||
</Component>
|
||||
</NonVisualComponents>
|
||||
<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" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="panelSensors" linkSize="5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="panelPositioner" linkSize="5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="jPanel3" linkSize="5" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="panelPositioner" max="32767" attributes="0"/>
|
||||
<Component id="panelSensors" max="32767" attributes="0"/>
|
||||
<Component id="jPanel3" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JPanel" name="panelPositioner">
|
||||
<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="Positioner"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="radioStepSize" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="11" max="32767" attributes="0"/>
|
||||
<Component id="spinnerStepSize" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel6" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="motorPanel" max="32767" attributes="0"/>
|
||||
<Component id="comboMotor" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="radioSteps" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="spinnerSteps" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="jLabel3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="spinnerLatency" linkSize="4" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="jLabel4" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="spinnerFrom" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerRange" linkSize="4" alignment="1" max="32767" attributes="0"/>
|
||||
<Component id="spinnerTo" alignment="1" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="comboMotor" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel6" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="motorPanel" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioAbsolute" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerFrom" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="3" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="spinnerTo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radioRelative" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="1" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerRange" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="radioStepSize" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerStepSize" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="radioSteps" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerSteps" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="spinnerLatency" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Motor:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="comboMotor">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
|
||||
<StringArray count="7">
|
||||
<StringItem index="0" value="dummy"/>
|
||||
<StringItem index="1" value="x"/>
|
||||
<StringItem index="2" value="y"/>
|
||||
<StringItem index="3" value="z"/>
|
||||
<StringItem index="4" value="theta"/>
|
||||
<StringItem index="5" value="tilt"/>
|
||||
<StringItem index="6" value="phi"/>
|
||||
</StringArray>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comboMotorActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.MotorReadoutPanel" name="motorPanel">
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Range:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerRange">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="100.0" minimum="0.001" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioStepSize">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Step size:"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioStepSizeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioSteps">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Steps:"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioStepSizeActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerStepSize">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0.1" maximum="10.0" minimum="0.001" numberType="java.lang.Double" stepSize="0.1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerSteps">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="10" maximum="1000" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Latency(s):"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerLatency">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="0.0" maximum="10.0" minimum="0.0" numberType="java.lang.Double" stepSize="0.1" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioAbsolute">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup2"/>
|
||||
</Property>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Absolute Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioAbsoluteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerFrom">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="From:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel5">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="To:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JSpinner" name="spinnerTo">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
|
||||
<SpinnerModel initial="1.0" maximum="1.0" minimum="0.0" numberType="java.lang.Double" stepSize="1.0" type="number"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radioRelative">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="buttonGroup2"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="Relative Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radioAbsoluteActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel6">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Position:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="panelSensors">
|
||||
<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="Sensors"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonScientaSetup" max="32767" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="checkImage" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkSpectrum" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkTotalCount" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCounts4" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCurrent" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur2" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkCur3" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="checkImageIntegration" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkImage" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkImageIntegration" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkSpectrum" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkTotalCount" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCounts4" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCurrent" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="checkCur3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="32767" attributes="0"/>
|
||||
<Component id="buttonScientaSetup" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JCheckBox" name="checkImage">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Image"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="scienta.dataMatrix" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkImageIntegration">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Image Integration"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
<Property name="contentAreaFilled" type="boolean" value="false"/>
|
||||
<Property name="name" type="java.lang.String" value="integration" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkSpectrum">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Spectrum"/>
|
||||
<Property name="name" type="java.lang.String" value="scienta.spectrum" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 1"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkTotalCount">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Total Counts"/>
|
||||
<Property name="name" type="java.lang.String" value="counts" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 2"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 3"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCounts4">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Counts Region 4"/>
|
||||
<Property name="name" type="java.lang.String" value="countsr4" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCurrent">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Current"/>
|
||||
<Property name="name" type="java.lang.String" value="current" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 1"/>
|
||||
<Property name="name" type="java.lang.String" value="cur1" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 2"/>
|
||||
<Property name="name" type="java.lang.String" value="cur2" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cur 3"/>
|
||||
<Property name="name" type="java.lang.String" value="cur3" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonScientaSetup">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Scienta Setup"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonScientaSetupActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="jPanel3">
|
||||
<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="Scan Control"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="buttonStart" max="32767" attributes="0"/>
|
||||
<Component id="buttonAbort" pref="189" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="buttonStart" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="buttonAbort" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="buttonStart">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Start"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonStartActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonAbort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Abort"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonAbortActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
603
plugins/ManipulatorScan.java
Normal file
603
plugins/ManipulatorScan.java
Normal file
@@ -0,0 +1,603 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
|
||||
*/
|
||||
|
||||
import ch.psi.pshell.dev.Motor;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.awt.Component;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.SpinnerNumberModel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class ManipulatorScan extends Panel {
|
||||
|
||||
public ManipulatorScan() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
//Overridable callbacks
|
||||
@Override
|
||||
public void onInitialize(int runCount) {
|
||||
comboMotorActionPerformed(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateChange(State state, State former) {
|
||||
setEnabled(isEnabled());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecutedFile(String fileName, Object result) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
buttonAbort.setEnabled(value && getState().isInitialized());
|
||||
|
||||
boolean enableControls = (value && (getState() == State.Ready));
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
c.setEnabled(enableControls);
|
||||
}
|
||||
for (Component c : panelPositioner.getComponents()) {
|
||||
c.setEnabled(enableControls);
|
||||
}
|
||||
buttonStart.setEnabled(enableControls);
|
||||
spinnerStepSize.setEnabled(enableControls && radioStepSize.isSelected());
|
||||
spinnerSteps.setEnabled(enableControls && radioSteps.isSelected());
|
||||
|
||||
spinnerFrom.setEnabled(enableControls && radioAbsolute.isSelected());
|
||||
spinnerTo.setEnabled(enableControls && radioAbsolute.isSelected());
|
||||
spinnerRange.setEnabled(enableControls && !radioAbsolute.isSelected());
|
||||
|
||||
}
|
||||
|
||||
void startScan() throws Exception {
|
||||
HashMap<String, Object> args = new HashMap<>();
|
||||
args.put("MOTOR", comboMotor.getSelectedItem().toString());
|
||||
ArrayList<String> sensors = new ArrayList();
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
if ((c instanceof JCheckBox) && ((JCheckBox) c).isSelected()) {
|
||||
sensors.add(c.getName());
|
||||
}
|
||||
}
|
||||
args.put("SENSORS", sensors);
|
||||
if (radioRelative.isSelected()) {
|
||||
args.put("RANGE", new Double[]{-(Double) spinnerRange.getValue() / 2, (Double) spinnerRange.getValue() / 2});
|
||||
} else {
|
||||
args.put("RANGE", new Double[]{(Double) spinnerFrom.getValue(), (Double) spinnerTo.getValue()});
|
||||
}
|
||||
if (radioStepSize.isSelected()) {
|
||||
ArrayList<Double> steps = new ArrayList();
|
||||
steps.add((Double) spinnerStepSize.getValue());
|
||||
args.put("STEPS", steps);
|
||||
} else {
|
||||
args.put("STEPS", (Integer) spinnerSteps.getValue());
|
||||
}
|
||||
args.put("LATENCY", (Double) spinnerLatency.getValue());
|
||||
args.put("RELATIVE", radioRelative.isSelected());
|
||||
|
||||
runAsync("ManipulatorScan", args);
|
||||
|
||||
/*
|
||||
getController().setExecutingContext("manip_scan");
|
||||
String scan ="lscan(" + comboMotor.getSelectedItem().toString() + ", ( " ;
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
if ((c instanceof JCheckBox) && ((JCheckBox)c).isSelected())
|
||||
scan += c.getName() + ", ";
|
||||
}
|
||||
scan+="), ";
|
||||
if (radioRelative.isSelected()){
|
||||
double halfRange = (Double)spinnerRange.getValue()/2;
|
||||
scan+= (-halfRange) + ", " + (halfRange)+ ", ";
|
||||
} else {
|
||||
Double from = (Double)spinnerFrom.getValue();
|
||||
Double to = (Double)spinnerTo.getValue();
|
||||
|
||||
if (to <= from){
|
||||
throw new Exception ("Invalid range");
|
||||
}
|
||||
scan+= from + ", " + to + ", ";
|
||||
}
|
||||
|
||||
scan+= (radioStepSize.isSelected()) ? "(" +((Double)spinnerStepSize.getValue())+",)" :((Integer)spinnerSteps.getValue());
|
||||
scan+=", " + (Double)spinnerLatency.getValue() + ", ";
|
||||
if (radioRelative.isSelected()){
|
||||
scan+="True, "; //Relative
|
||||
}
|
||||
scan+="before_read=trig_scienta)"; //Relative
|
||||
|
||||
if (checkImageIntegration.isSelected()){
|
||||
scan = "set_preference(Preference.PLOT_TYPES,{'integration':1}); " + scan;
|
||||
}
|
||||
|
||||
evalAsync(scan);
|
||||
*/
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
buttonGroup1 = new javax.swing.ButtonGroup();
|
||||
buttonGroup2 = new javax.swing.ButtonGroup();
|
||||
panelPositioner = new javax.swing.JPanel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
comboMotor = new javax.swing.JComboBox();
|
||||
motorPanel = new ch.psi.pshell.swing.MotorReadoutPanel();
|
||||
txtSize = new javax.swing.JLabel();
|
||||
spinnerRange = new javax.swing.JSpinner();
|
||||
radioStepSize = new javax.swing.JRadioButton();
|
||||
radioSteps = new javax.swing.JRadioButton();
|
||||
spinnerStepSize = new javax.swing.JSpinner();
|
||||
spinnerSteps = new javax.swing.JSpinner();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
spinnerLatency = new javax.swing.JSpinner();
|
||||
radioAbsolute = new javax.swing.JRadioButton();
|
||||
spinnerFrom = new javax.swing.JSpinner();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
spinnerTo = new javax.swing.JSpinner();
|
||||
radioRelative = new javax.swing.JRadioButton();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
jLabel7 = new javax.swing.JLabel();
|
||||
jLabel8 = new javax.swing.JLabel();
|
||||
panelSensors = new javax.swing.JPanel();
|
||||
checkImage = new javax.swing.JCheckBox();
|
||||
checkImageIntegration = new javax.swing.JCheckBox();
|
||||
checkSpectrum = new javax.swing.JCheckBox();
|
||||
checkCounts1 = new javax.swing.JCheckBox();
|
||||
checkTotalCount = new javax.swing.JCheckBox();
|
||||
checkCounts2 = new javax.swing.JCheckBox();
|
||||
checkCounts3 = new javax.swing.JCheckBox();
|
||||
checkCounts4 = new javax.swing.JCheckBox();
|
||||
checkCurrent = new javax.swing.JCheckBox();
|
||||
checkCur1 = new javax.swing.JCheckBox();
|
||||
checkCur2 = new javax.swing.JCheckBox();
|
||||
checkCur3 = new javax.swing.JCheckBox();
|
||||
buttonScientaSetup = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
buttonStart = new javax.swing.JButton();
|
||||
buttonAbort = new javax.swing.JButton();
|
||||
|
||||
panelPositioner.setBorder(javax.swing.BorderFactory.createTitledBorder("Positioner"));
|
||||
|
||||
jLabel1.setText("Motor:");
|
||||
|
||||
comboMotor.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "dummy", "x", "y", "z", "theta", "tilt", "phi" }));
|
||||
comboMotor.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
comboMotorActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
txtSize.setText("Size:");
|
||||
|
||||
spinnerRange.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.001d, 100.0d, 1.0d));
|
||||
spinnerRange.setEnabled(false);
|
||||
|
||||
buttonGroup1.add(radioStepSize);
|
||||
radioStepSize.setSelected(true);
|
||||
radioStepSize.setText("Step Size");
|
||||
radioStepSize.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioStepSizeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonGroup1.add(radioSteps);
|
||||
radioSteps.setText("Number of Steps");
|
||||
radioSteps.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioStepSizeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerStepSize.setModel(new javax.swing.SpinnerNumberModel(0.1d, 0.001d, 10.0d, 0.1d));
|
||||
|
||||
spinnerSteps.setModel(new javax.swing.SpinnerNumberModel(10, 1, 1000, 1));
|
||||
spinnerSteps.setEnabled(false);
|
||||
|
||||
jLabel3.setText("Latency(s):");
|
||||
|
||||
spinnerLatency.setModel(new javax.swing.SpinnerNumberModel(0.0d, 0.0d, 10.0d, 0.1d));
|
||||
|
||||
buttonGroup2.add(radioAbsolute);
|
||||
radioAbsolute.setSelected(true);
|
||||
radioAbsolute.setText("Absolute Scan");
|
||||
radioAbsolute.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioAbsoluteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerFrom.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
jLabel4.setText("From:");
|
||||
|
||||
jLabel5.setText("To:");
|
||||
|
||||
spinnerTo.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
buttonGroup2.add(radioRelative);
|
||||
radioRelative.setText("Relative Scan");
|
||||
radioRelative.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioAbsoluteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel6.setText("Position:");
|
||||
|
||||
jLabel7.setText("Range:");
|
||||
|
||||
jLabel8.setText("Steps:");
|
||||
|
||||
javax.swing.GroupLayout panelPositionerLayout = new javax.swing.GroupLayout(panelPositioner);
|
||||
panelPositioner.setLayout(panelPositionerLayout);
|
||||
panelPositionerLayout.setHorizontalGroup(
|
||||
panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(radioSteps, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(jLabel1))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(motorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(comboMotor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(jLabel3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
|
||||
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(radioStepSize)
|
||||
.addComponent(radioAbsolute)
|
||||
.addComponent(radioRelative))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(jLabel7)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(spinnerFrom, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerRange, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerTo, javax.swing.GroupLayout.Alignment.TRAILING)))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(jLabel8)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerSteps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(txtSize)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(spinnerStepSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
panelPositionerLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerLatency, spinnerRange, spinnerStepSize, spinnerSteps});
|
||||
|
||||
panelPositionerLayout.setVerticalGroup(
|
||||
panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(comboMotor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(motorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioAbsolute)
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4))
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioRelative)
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerRange, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel7))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioStepSize)
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerStepSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(txtSize))
|
||||
.addGap(12, 12, 12)
|
||||
.addComponent(radioSteps)
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerSteps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel8))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelSensors.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensors"));
|
||||
|
||||
checkImage.setSelected(true);
|
||||
checkImage.setText("Scienta Image");
|
||||
checkImage.setToolTipText("");
|
||||
checkImage.setContentAreaFilled(false);
|
||||
checkImage.setName("scienta.dataMatrix"); // NOI18N
|
||||
|
||||
checkImageIntegration.setSelected(true);
|
||||
checkImageIntegration.setText("Scienta Image Integration");
|
||||
checkImageIntegration.setToolTipText("");
|
||||
checkImageIntegration.setContentAreaFilled(false);
|
||||
checkImageIntegration.setName("integration"); // NOI18N
|
||||
|
||||
checkSpectrum.setSelected(true);
|
||||
checkSpectrum.setText("Scienta Spectrum");
|
||||
checkSpectrum.setName("scienta.spectrum"); // NOI18N
|
||||
|
||||
checkCounts1.setText("Counts Region 1");
|
||||
checkCounts1.setName("countsr1"); // NOI18N
|
||||
|
||||
checkTotalCount.setSelected(true);
|
||||
checkTotalCount.setText("Total Counts");
|
||||
checkTotalCount.setName("counts"); // NOI18N
|
||||
|
||||
checkCounts2.setText("Counts Region 2");
|
||||
checkCounts2.setName("countsr2"); // NOI18N
|
||||
|
||||
checkCounts3.setText("Counts Region 3");
|
||||
checkCounts3.setName("countsr3"); // NOI18N
|
||||
|
||||
checkCounts4.setText("Counts Region 4");
|
||||
checkCounts4.setName("countsr4"); // NOI18N
|
||||
|
||||
checkCurrent.setText("Current");
|
||||
checkCurrent.setName("current"); // NOI18N
|
||||
|
||||
checkCur1.setText("Cur 1");
|
||||
checkCur1.setName("cur1"); // NOI18N
|
||||
|
||||
checkCur2.setText("Cur 2");
|
||||
checkCur2.setName("cur2"); // NOI18N
|
||||
|
||||
checkCur3.setText("Cur 3");
|
||||
checkCur3.setName("cur3"); // NOI18N
|
||||
|
||||
buttonScientaSetup.setText("Scienta Setup");
|
||||
buttonScientaSetup.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonScientaSetupActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout panelSensorsLayout = new javax.swing.GroupLayout(panelSensors);
|
||||
panelSensors.setLayout(panelSensorsLayout);
|
||||
panelSensorsLayout.setHorizontalGroup(
|
||||
panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonScientaSetup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addGroup(panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(checkImage)
|
||||
.addComponent(checkImageIntegration)
|
||||
.addComponent(checkSpectrum)
|
||||
.addComponent(checkCounts1)
|
||||
.addComponent(checkTotalCount)
|
||||
.addComponent(checkCounts2)
|
||||
.addComponent(checkCounts3)
|
||||
.addComponent(checkCurrent)
|
||||
.addComponent(checkCur1)
|
||||
.addComponent(checkCur2)
|
||||
.addComponent(checkCur3)
|
||||
.addComponent(checkCounts4))
|
||||
.addGap(0, 14, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
panelSensorsLayout.setVerticalGroup(
|
||||
panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(checkImage)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkImageIntegration)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkSpectrum)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkTotalCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCurrent)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur3)
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addComponent(buttonScientaSetup)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Scan Control"));
|
||||
|
||||
buttonStart.setText("Start");
|
||||
buttonStart.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonStartActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonAbort.setText("Abort");
|
||||
buttonAbort.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonAbortActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonAbort, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(buttonStart)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(buttonAbort)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(panelSensors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(panelPositioner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jPanel3, panelPositioner, panelSensors});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelPositioner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelSensors, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void buttonScientaSetupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScientaSetupActionPerformed
|
||||
try {
|
||||
showDevicePanel("scienta");
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonScientaSetupActionPerformed
|
||||
|
||||
private void buttonStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartActionPerformed
|
||||
try {
|
||||
startScan();
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonStartActionPerformed
|
||||
|
||||
private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed
|
||||
abort();
|
||||
}//GEN-LAST:event_buttonAbortActionPerformed
|
||||
|
||||
private void radioStepSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioStepSizeActionPerformed
|
||||
setEnabled(isEnabled());
|
||||
}//GEN-LAST:event_radioStepSizeActionPerformed
|
||||
|
||||
private void comboMotorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboMotorActionPerformed
|
||||
try {
|
||||
Motor motor = (Motor) getDevice(comboMotor.getSelectedItem().toString());
|
||||
motorPanel.setDevice(motor);
|
||||
spinnerFrom.setModel(new SpinnerNumberModel(motor.getMinValue(), motor.getMinValue(), motor.getMaxValue(), 1.0));
|
||||
spinnerTo.setModel(new SpinnerNumberModel(motor.getMaxValue(), motor.getMinValue(), motor.getMaxValue(), 1.0));
|
||||
txtSize.setText("Size (" + motor.getUnit() +")");
|
||||
//spinnerFrom.setModel(new javax.swing.SpinnerNumberModel(3.0, 0.001, 100.0, 1.0));
|
||||
//spinnerTo.setModel(new javax.swing.SpinnerNumberModel(2.0, 0.001, 100.0, 1.0));
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_comboMotorActionPerformed
|
||||
|
||||
private void radioAbsoluteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioAbsoluteActionPerformed
|
||||
setEnabled(isEnabled());
|
||||
}//GEN-LAST:event_radioAbsoluteActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.ButtonGroup buttonGroup1;
|
||||
private javax.swing.ButtonGroup buttonGroup2;
|
||||
private javax.swing.JButton buttonScientaSetup;
|
||||
private javax.swing.JButton buttonStart;
|
||||
private javax.swing.JCheckBox checkCounts1;
|
||||
private javax.swing.JCheckBox checkCounts2;
|
||||
private javax.swing.JCheckBox checkCounts3;
|
||||
private javax.swing.JCheckBox checkCounts4;
|
||||
private javax.swing.JCheckBox checkCur1;
|
||||
private javax.swing.JCheckBox checkCur2;
|
||||
private javax.swing.JCheckBox checkCur3;
|
||||
private javax.swing.JCheckBox checkCurrent;
|
||||
private javax.swing.JCheckBox checkImage;
|
||||
private javax.swing.JCheckBox checkImageIntegration;
|
||||
private javax.swing.JCheckBox checkSpectrum;
|
||||
private javax.swing.JCheckBox checkTotalCount;
|
||||
private javax.swing.JComboBox comboMotor;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
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 jPanel3;
|
||||
private ch.psi.pshell.swing.MotorReadoutPanel motorPanel;
|
||||
private javax.swing.JPanel panelPositioner;
|
||||
private javax.swing.JPanel panelSensors;
|
||||
private javax.swing.JRadioButton radioAbsolute;
|
||||
private javax.swing.JRadioButton radioRelative;
|
||||
private javax.swing.JRadioButton radioStepSize;
|
||||
private javax.swing.JRadioButton radioSteps;
|
||||
private javax.swing.JSpinner spinnerFrom;
|
||||
private javax.swing.JSpinner spinnerLatency;
|
||||
private javax.swing.JSpinner spinnerRange;
|
||||
private javax.swing.JSpinner spinnerStepSize;
|
||||
private javax.swing.JSpinner spinnerSteps;
|
||||
private javax.swing.JSpinner spinnerTo;
|
||||
private javax.swing.JLabel txtSize;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
575
plugins/ManipulatorScan.java~
Normal file
575
plugins/ManipulatorScan.java~
Normal file
@@ -0,0 +1,575 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
|
||||
*/
|
||||
|
||||
import ch.psi.pshell.dev.Motor;
|
||||
import ch.psi.utils.swing.MonitoredPanel;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.awt.Component;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SpinnerNumberModel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class ManipulatorScan extends Panel {
|
||||
|
||||
@Override
|
||||
protected JPanel create() {
|
||||
return new PluginPanel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PluginPanel getComponent(){
|
||||
return (PluginPanel) super.getComponent();
|
||||
}
|
||||
|
||||
//Overridables
|
||||
@Override
|
||||
protected void onInitialize(int runCount) {
|
||||
getComponent().comboMotorActionPerformed(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStateChange(State state, State former) {
|
||||
getComponent().setEnabled(getComponent().isEnabled());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecutedFile(String fileName, Object result) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doUpdate() {
|
||||
}
|
||||
|
||||
|
||||
//Panel Class
|
||||
public class PluginPanel extends MonitoredPanel {
|
||||
|
||||
public PluginPanel() {
|
||||
initComponents();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
buttonAbort.setEnabled(value && getState().isInitialized());
|
||||
|
||||
boolean enableControls = (value && (getState()==State.Ready));
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
c.setEnabled(enableControls);
|
||||
}
|
||||
for (Component c : panelPositioner.getComponents()) {
|
||||
c.setEnabled(enableControls);
|
||||
}
|
||||
buttonStart.setEnabled(enableControls);
|
||||
spinnerStepSize.setEnabled(enableControls && radioStepSize.isSelected());
|
||||
spinnerSteps.setEnabled(enableControls && radioSteps.isSelected());
|
||||
|
||||
spinnerFrom.setEnabled(enableControls && radioAbsolute.isSelected());
|
||||
spinnerTo.setEnabled(enableControls && radioAbsolute.isSelected());
|
||||
spinnerRange.setEnabled(enableControls && !radioAbsolute.isSelected());
|
||||
|
||||
}
|
||||
|
||||
void startScan() throws Exception{
|
||||
String scan ="lscan(" + comboMotor.getSelectedItem().toString() + ",( " ;
|
||||
for (Component c : panelSensors.getComponents()) {
|
||||
if ((c instanceof JCheckBox) && ((JCheckBox)c).isSelected())
|
||||
scan += c.getName() + ", ";
|
||||
}
|
||||
scan+="), ";
|
||||
if (radioRelative.isSelected()){
|
||||
double halfRange = (Double)spinnerRange.getValue()/2;
|
||||
scan+= (-halfRange) + ", " + (halfRange)+ ", ";
|
||||
} else {
|
||||
Double from = (Double)spinnerFrom.getValue();
|
||||
Double to = (Double)spinnerTo.getValue();
|
||||
|
||||
if (to <= from){
|
||||
throw new Exception ("Invalid range");
|
||||
}
|
||||
scan+= from + ", " + to + ", ";
|
||||
}
|
||||
|
||||
scan+= (radioStepSize.isSelected()) ? "(" +((Double)spinnerStepSize.getValue())+",)" :((Integer)spinnerSteps.getValue());
|
||||
scan+=", " + (Double)spinnerLatency.getValue() + ", ";
|
||||
if (radioRelative.isSelected()){
|
||||
scan+="True, "; //Relative
|
||||
}
|
||||
scan+="before_read=trig_scienta)"; //Relative
|
||||
|
||||
if (checkImageIntegration.isSelected()){
|
||||
scan = "set_preference(Preference.PLOT_TYPES,{'integration':1}); " + scan;
|
||||
}
|
||||
|
||||
evalAsync(scan);
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
buttonGroup1 = new javax.swing.ButtonGroup();
|
||||
buttonGroup2 = new javax.swing.ButtonGroup();
|
||||
panelPositioner = new javax.swing.JPanel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
comboMotor = new javax.swing.JComboBox();
|
||||
motorPanel = new ch.psi.pshell.swing.MotorReadoutPanel();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
spinnerRange = new javax.swing.JSpinner();
|
||||
radioStepSize = new javax.swing.JRadioButton();
|
||||
radioSteps = new javax.swing.JRadioButton();
|
||||
spinnerStepSize = new javax.swing.JSpinner();
|
||||
spinnerSteps = new javax.swing.JSpinner();
|
||||
jLabel3 = new javax.swing.JLabel();
|
||||
spinnerLatency = new javax.swing.JSpinner();
|
||||
radioAbsolute = new javax.swing.JRadioButton();
|
||||
spinnerFrom = new javax.swing.JSpinner();
|
||||
jLabel4 = new javax.swing.JLabel();
|
||||
jLabel5 = new javax.swing.JLabel();
|
||||
spinnerTo = new javax.swing.JSpinner();
|
||||
radioRelative = new javax.swing.JRadioButton();
|
||||
jLabel6 = new javax.swing.JLabel();
|
||||
panelSensors = new javax.swing.JPanel();
|
||||
checkImage = new javax.swing.JCheckBox();
|
||||
checkImageIntegration = new javax.swing.JCheckBox();
|
||||
checkSpectrum = new javax.swing.JCheckBox();
|
||||
checkCounts1 = new javax.swing.JCheckBox();
|
||||
checkTotalCount = new javax.swing.JCheckBox();
|
||||
checkCounts2 = new javax.swing.JCheckBox();
|
||||
checkCounts3 = new javax.swing.JCheckBox();
|
||||
checkCounts4 = new javax.swing.JCheckBox();
|
||||
checkCurrent = new javax.swing.JCheckBox();
|
||||
checkCur1 = new javax.swing.JCheckBox();
|
||||
checkCur2 = new javax.swing.JCheckBox();
|
||||
checkCur3 = new javax.swing.JCheckBox();
|
||||
buttonScientaSetup = new javax.swing.JButton();
|
||||
jPanel3 = new javax.swing.JPanel();
|
||||
buttonStart = new javax.swing.JButton();
|
||||
buttonAbort = new javax.swing.JButton();
|
||||
|
||||
panelPositioner.setBorder(javax.swing.BorderFactory.createTitledBorder("Positioner"));
|
||||
|
||||
jLabel1.setText("Motor:");
|
||||
|
||||
comboMotor.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "dummy", "x", "y", "z", "theta", "tilt", "phi" }));
|
||||
comboMotor.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
comboMotorActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel2.setText("Range:");
|
||||
|
||||
spinnerRange.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.001d, 100.0d, 1.0d));
|
||||
spinnerRange.setEnabled(false);
|
||||
|
||||
buttonGroup1.add(radioStepSize);
|
||||
radioStepSize.setSelected(true);
|
||||
radioStepSize.setText("Step size:");
|
||||
radioStepSize.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioStepSizeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonGroup1.add(radioSteps);
|
||||
radioSteps.setText("Steps:");
|
||||
radioSteps.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioStepSizeActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerStepSize.setModel(new javax.swing.SpinnerNumberModel(0.1d, 0.001d, 10.0d, 0.1d));
|
||||
|
||||
spinnerSteps.setModel(new javax.swing.SpinnerNumberModel(10, 1, 1000, 1));
|
||||
spinnerSteps.setEnabled(false);
|
||||
|
||||
jLabel3.setText("Latency(s):");
|
||||
|
||||
spinnerLatency.setModel(new javax.swing.SpinnerNumberModel(0.0d, 0.0d, 10.0d, 0.1d));
|
||||
|
||||
buttonGroup2.add(radioAbsolute);
|
||||
radioAbsolute.setSelected(true);
|
||||
radioAbsolute.setText("Absolute Scan");
|
||||
radioAbsolute.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioAbsoluteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
spinnerFrom.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
jLabel4.setText("From:");
|
||||
|
||||
jLabel5.setText("To:");
|
||||
|
||||
spinnerTo.setModel(new javax.swing.SpinnerNumberModel(1.0d, 0.0d, 1.0d, 1.0d));
|
||||
|
||||
buttonGroup2.add(radioRelative);
|
||||
radioRelative.setText("Relative Scan");
|
||||
radioRelative.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
radioAbsoluteActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel6.setText("Position:");
|
||||
|
||||
javax.swing.GroupLayout panelPositionerLayout = new javax.swing.GroupLayout(panelPositioner);
|
||||
panelPositioner.setLayout(panelPositionerLayout);
|
||||
panelPositionerLayout.setHorizontalGroup(
|
||||
panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(radioStepSize)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
|
||||
.addComponent(spinnerStepSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(jLabel1))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(motorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(comboMotor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(radioSteps)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(spinnerSteps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addComponent(jLabel3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPositionerLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(spinnerFrom, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerRange, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(spinnerTo, javax.swing.GroupLayout.Alignment.TRAILING)))
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(radioAbsolute)
|
||||
.addComponent(radioRelative))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
panelPositionerLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {radioStepSize, radioSteps});
|
||||
|
||||
panelPositionerLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerLatency, spinnerRange, spinnerStepSize, spinnerSteps});
|
||||
|
||||
panelPositionerLayout.setVerticalGroup(
|
||||
panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelPositionerLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel1)
|
||||
.addComponent(comboMotor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel6)
|
||||
.addComponent(motorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioAbsolute)
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel4))
|
||||
.addGap(3, 3, 3)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(spinnerTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel5))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(radioRelative)
|
||||
.addGap(1, 1, 1)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(spinnerRange, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(radioStepSize)
|
||||
.addComponent(spinnerStepSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(radioSteps)
|
||||
.addComponent(spinnerSteps, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(panelPositionerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel3)
|
||||
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelSensors.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensors"));
|
||||
|
||||
checkImage.setSelected(true);
|
||||
checkImage.setText("Scienta Image");
|
||||
checkImage.setToolTipText("");
|
||||
checkImage.setContentAreaFilled(false);
|
||||
checkImage.setName("scienta.dataMatrix"); // NOI18N
|
||||
|
||||
checkImageIntegration.setSelected(true);
|
||||
checkImageIntegration.setText("Scienta Image Integration");
|
||||
checkImageIntegration.setToolTipText("");
|
||||
checkImageIntegration.setContentAreaFilled(false);
|
||||
checkImageIntegration.setName("integration"); // NOI18N
|
||||
|
||||
checkSpectrum.setSelected(true);
|
||||
checkSpectrum.setText("Scienta Spectrum");
|
||||
checkSpectrum.setName("scienta.spectrum"); // NOI18N
|
||||
|
||||
checkCounts1.setText("Counts Region 1");
|
||||
checkCounts1.setName("countsr1"); // NOI18N
|
||||
|
||||
checkTotalCount.setSelected(true);
|
||||
checkTotalCount.setText("Total Counts");
|
||||
checkTotalCount.setName("counts"); // NOI18N
|
||||
|
||||
checkCounts2.setText("Counts Region 2");
|
||||
checkCounts2.setName("countsr2"); // NOI18N
|
||||
|
||||
checkCounts3.setText("Counts Region 3");
|
||||
checkCounts3.setName("countsr3"); // NOI18N
|
||||
|
||||
checkCounts4.setText("Counts Region 4");
|
||||
checkCounts4.setName("countsr4"); // NOI18N
|
||||
|
||||
checkCurrent.setText("Current");
|
||||
checkCurrent.setName("current"); // NOI18N
|
||||
|
||||
checkCur1.setText("Cur 1");
|
||||
checkCur1.setName("cur1"); // NOI18N
|
||||
|
||||
checkCur2.setText("Cur 2");
|
||||
checkCur2.setName("cur2"); // NOI18N
|
||||
|
||||
checkCur3.setText("Cur 3");
|
||||
checkCur3.setName("cur3"); // NOI18N
|
||||
|
||||
buttonScientaSetup.setText("Scienta Setup");
|
||||
buttonScientaSetup.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonScientaSetupActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout panelSensorsLayout = new javax.swing.GroupLayout(panelSensors);
|
||||
panelSensors.setLayout(panelSensorsLayout);
|
||||
panelSensorsLayout.setHorizontalGroup(
|
||||
panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonScientaSetup, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addGroup(panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(checkImage)
|
||||
.addComponent(checkSpectrum)
|
||||
.addComponent(checkCounts1)
|
||||
.addComponent(checkTotalCount)
|
||||
.addComponent(checkCounts2)
|
||||
.addComponent(checkCounts3)
|
||||
.addComponent(checkCounts4)
|
||||
.addComponent(checkCurrent)
|
||||
.addComponent(checkCur1)
|
||||
.addComponent(checkCur2)
|
||||
.addComponent(checkCur3)
|
||||
.addComponent(checkImageIntegration))
|
||||
.addGap(0, 0, Short.MAX_VALUE)))
|
||||
.addContainerGap())
|
||||
);
|
||||
panelSensorsLayout.setVerticalGroup(
|
||||
panelSensorsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSensorsLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(checkImage)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkImageIntegration)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkSpectrum)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkTotalCount)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts3)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCounts4)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCurrent)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(checkCur3)
|
||||
.addGap(18, 18, Short.MAX_VALUE)
|
||||
.addComponent(buttonScientaSetup)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Scan Control"));
|
||||
|
||||
buttonStart.setText("Start");
|
||||
buttonStart.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonStartActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonAbort.setText("Abort");
|
||||
buttonAbort.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonAbortActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
||||
jPanel3.setLayout(jPanel3Layout);
|
||||
jPanel3Layout.setHorizontalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonAbort, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel3Layout.setVerticalGroup(
|
||||
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(buttonStart)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(buttonAbort)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(panelSensors, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(panelPositioner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jPanel3, panelPositioner, panelSensors});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelPositioner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelSensors, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void buttonScientaSetupActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScientaSetupActionPerformed
|
||||
try{
|
||||
showDevicePanel("scienta");
|
||||
} catch (Exception ex){
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonScientaSetupActionPerformed
|
||||
|
||||
private void buttonStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartActionPerformed
|
||||
try{
|
||||
startScan();
|
||||
} catch (Exception ex){
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonStartActionPerformed
|
||||
|
||||
private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed
|
||||
ManipulatorScan.this.abort();
|
||||
}//GEN-LAST:event_buttonAbortActionPerformed
|
||||
|
||||
private void radioStepSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioStepSizeActionPerformed
|
||||
setEnabled(isEnabled());
|
||||
}//GEN-LAST:event_radioStepSizeActionPerformed
|
||||
|
||||
private void comboMotorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboMotorActionPerformed
|
||||
try{
|
||||
Motor motor = (Motor) getDevice(comboMotor.getSelectedItem().toString());
|
||||
motorPanel.setDevice(motor);
|
||||
spinnerFrom.setModel(new SpinnerNumberModel(motor.getMinValue(), motor.getMinValue(), motor.getMaxValue(), 1.0));
|
||||
spinnerTo.setModel(new SpinnerNumberModel(motor.getMaxValue(), motor.getMinValue(), motor.getMaxValue(), 1.0));
|
||||
//spinnerFrom.setModel(new javax.swing.SpinnerNumberModel(3.0, 0.001, 100.0, 1.0));
|
||||
//spinnerTo.setModel(new javax.swing.SpinnerNumberModel(2.0, 0.001, 100.0, 1.0));
|
||||
} catch (Exception ex){
|
||||
SwingUtils.showException(this, ex);
|
||||
}
|
||||
}//GEN-LAST:event_comboMotorActionPerformed
|
||||
|
||||
private void radioAbsoluteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioAbsoluteActionPerformed
|
||||
setEnabled(isEnabled());
|
||||
}//GEN-LAST:event_radioAbsoluteActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.ButtonGroup buttonGroup1;
|
||||
private javax.swing.ButtonGroup buttonGroup2;
|
||||
private javax.swing.JButton buttonScientaSetup;
|
||||
private javax.swing.JButton buttonStart;
|
||||
private javax.swing.JCheckBox checkCounts1;
|
||||
private javax.swing.JCheckBox checkCounts2;
|
||||
private javax.swing.JCheckBox checkCounts3;
|
||||
private javax.swing.JCheckBox checkCounts4;
|
||||
private javax.swing.JCheckBox checkCur1;
|
||||
private javax.swing.JCheckBox checkCur2;
|
||||
private javax.swing.JCheckBox checkCur3;
|
||||
private javax.swing.JCheckBox checkCurrent;
|
||||
private javax.swing.JCheckBox checkImage;
|
||||
private javax.swing.JCheckBox checkImageIntegration;
|
||||
private javax.swing.JCheckBox checkSpectrum;
|
||||
private javax.swing.JCheckBox checkTotalCount;
|
||||
private javax.swing.JComboBox comboMotor;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private javax.swing.JLabel jLabel3;
|
||||
private javax.swing.JLabel jLabel4;
|
||||
private javax.swing.JLabel jLabel5;
|
||||
private javax.swing.JLabel jLabel6;
|
||||
private javax.swing.JPanel jPanel3;
|
||||
private ch.psi.pshell.swing.MotorReadoutPanel motorPanel;
|
||||
private javax.swing.JPanel panelPositioner;
|
||||
private javax.swing.JPanel panelSensors;
|
||||
private javax.swing.JRadioButton radioAbsolute;
|
||||
private javax.swing.JRadioButton radioRelative;
|
||||
private javax.swing.JRadioButton radioStepSize;
|
||||
private javax.swing.JRadioButton radioSteps;
|
||||
private javax.swing.JSpinner spinnerFrom;
|
||||
private javax.swing.JSpinner spinnerLatency;
|
||||
private javax.swing.JSpinner spinnerRange;
|
||||
private javax.swing.JSpinner spinnerStepSize;
|
||||
private javax.swing.JSpinner spinnerSteps;
|
||||
private javax.swing.JSpinner spinnerTo;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
}
|
||||
BIN
plugins/XPSSpectrum$1$1.class
Normal file
BIN
plugins/XPSSpectrum$1$1.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$1.class
Normal file
BIN
plugins/XPSSpectrum$1.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$10.class
Normal file
BIN
plugins/XPSSpectrum$10.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$2.class
Normal file
BIN
plugins/XPSSpectrum$2.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$3.class
Normal file
BIN
plugins/XPSSpectrum$3.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$4.class
Normal file
BIN
plugins/XPSSpectrum$4.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$5.class
Normal file
BIN
plugins/XPSSpectrum$5.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$6.class
Normal file
BIN
plugins/XPSSpectrum$6.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$7.class
Normal file
BIN
plugins/XPSSpectrum$7.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$8.class
Normal file
BIN
plugins/XPSSpectrum$8.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum$9.class
Normal file
BIN
plugins/XPSSpectrum$9.class
Normal file
Binary file not shown.
BIN
plugins/XPSSpectrum.class
Normal file
BIN
plugins/XPSSpectrum.class
Normal file
Binary file not shown.
158
plugins/XPSSpectrum.form
Normal file
158
plugins/XPSSpectrum.form
Normal file
@@ -0,0 +1,158 @@
|
||||
<?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" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="rangeSelectionPanel" alignment="0" pref="900" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="buttonInitialScan" linkSize="1" max="32767" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="valueLow" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="valueHigh" linkSize="3" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="60" max="-2" attributes="0"/>
|
||||
<Component id="buttonDetailedScan" linkSize="1" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="buttonAbort" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Component id="btLoad" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="btSave" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<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" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="buttonInitialScan" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonDetailedScan" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="buttonAbort" alignment="3" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="1" groupAlignment="2" attributes="0">
|
||||
<Component id="jLabel2" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="valueHigh" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="valueLow" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jLabel1" alignment="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="rangeSelectionPanel" pref="240" max="32767" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="43" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btLoad" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btSave" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JButton" name="buttonAbort">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Abort"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonAbortActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonInitialScan">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Initial Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonInitialScanActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.RangeSelectionPanel" name="rangeSelectionPanel">
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_CreateCodeCustom" type="java.lang.String" value="new ch.psi.pshell.swing.RangeSelectionPanel() {
 protected void onSeriesChanged() {
 updateButtons();
 }
 protected void onSelectionChanged() {
 updateButtons();
 }
}
"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="buttonDetailedScan">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Detailed Scan"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonDetailedScanActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btSave">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Save"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btSaveActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btLoad">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Load"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btLoadActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Low:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueLow">
|
||||
<Properties>
|
||||
<Property name="decimals" type="int" value="2"/>
|
||||
<Property name="maxValue" type="double" value="1000.0"/>
|
||||
<Property name="minValue" type="double" value="0.0"/>
|
||||
<Property name="showButtons" type="boolean" value="false"/>
|
||||
<Property name="value" type="double" value="0.0"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="High:"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="ch.psi.pshell.swing.ValueSelection" name="valueHigh">
|
||||
<Properties>
|
||||
<Property name="decimals" type="int" value="2"/>
|
||||
<Property name="maxValue" type="double" value="1000.0"/>
|
||||
<Property name="minValue" type="double" value="0.0"/>
|
||||
<Property name="showButtons" type="boolean" value="false"/>
|
||||
<Property name="value" type="double" value="100.0"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
386
plugins/XPSSpectrum.java
Normal file
386
plugins/XPSSpectrum.java
Normal file
@@ -0,0 +1,386 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Paul Scherrer Institute. All rights reserved.
|
||||
*/
|
||||
|
||||
import ch.psi.pshell.dev.Device;
|
||||
import ch.psi.pshell.dev.DeviceListener;
|
||||
import ch.psi.pshell.epics.Scienta;
|
||||
import ch.psi.pshell.plot.LinePlotSeries;
|
||||
import ch.psi.pshell.plot.RangeSelectionPlot.RangeSelection;
|
||||
import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.Convert;
|
||||
import ch.psi.utils.IO;
|
||||
import ch.psi.utils.Serializer;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.util.HashMap;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.event.TableModelEvent;
|
||||
import javax.swing.event.TableModelListener;
|
||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class XPSSpectrum extends Panel {
|
||||
|
||||
boolean detailedScan;
|
||||
boolean running;
|
||||
Scienta scienta;
|
||||
|
||||
public XPSSpectrum() {
|
||||
initComponents();
|
||||
rangeSelectionPanel.setAditionalColumns(new String[]{"Time", "Size", "Iter"}, new Class[]{Double.class, Double.class, Integer.class});
|
||||
final DefaultTableModel model = (DefaultTableModel) rangeSelectionPanel.getTable().getModel();
|
||||
model.addTableModelListener(new TableModelListener() {
|
||||
@Override
|
||||
public void tableChanged(TableModelEvent e) {
|
||||
if (e.getType() == TableModelEvent.INSERT) {
|
||||
final int row = e.getFirstRow();
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (row > 0) {
|
||||
for (int col = 3; col < 6; col++) {
|
||||
model.setValueAt(model.getValueAt(row - 1, col), row, col);
|
||||
}
|
||||
} else {
|
||||
model.setValueAt(scienta.getStepTime().take(), row, 3);
|
||||
model.setValueAt(scienta.getStepSize().take(), row, 4);
|
||||
model.setValueAt(Integer.valueOf(1), row, 5);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInitialize(int runCount) {
|
||||
scienta = (Scienta) getDevice("scienta");
|
||||
scienta.getTotalChannels().addListener(progressListener);
|
||||
scienta.getCurrentChannel().addListener(progressListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStateChange(State state, State former) {
|
||||
setEnabled(state == State.Ready);
|
||||
if (!state.isProcessing()){
|
||||
if (running){
|
||||
running = false;
|
||||
getView().getStatusBar().setProgress(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onExecutedFile(String fileName, Object result) {
|
||||
String script = IO.getPrefix(fileName);
|
||||
if (script != null) {
|
||||
switch (script) {
|
||||
case "XPSSpectrum":
|
||||
if (result instanceof Exception) {
|
||||
//SwingUtils.showMessage(getComponent(), "Error in " + fileName, exception.getMessage());
|
||||
} else {
|
||||
if (detailedScan) {
|
||||
|
||||
} else {
|
||||
Object[] ret = (Object[]) ((Object[]) result)[0];
|
||||
if (ret.length > 0) {
|
||||
//double[] data = (double[]) Convert.wrapperArrayToPrimitiveArray(ret[0], Double.class);
|
||||
double[] xdata = (double[]) ret[0];
|
||||
double[] ydata = (double[]) ret[1];
|
||||
|
||||
//double[] data = new double[]{1.0,1.0,1.0,1.0,1.0};
|
||||
LinePlotSeries series = new LinePlotSeries("Data");
|
||||
rangeSelectionPanel.setSeries(series);
|
||||
series.setData(xdata, ydata);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
detailedScan = false;
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean value) {
|
||||
super.setEnabled(value);
|
||||
rangeSelectionPanel.setEnabled(value);
|
||||
valueLow.setEnabled(value);
|
||||
valueHigh.setEnabled(value);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
void updateButtons() {
|
||||
buttonInitialScan.setEnabled(isEnabled());
|
||||
buttonDetailedScan.setEnabled(isEnabled() && rangeSelectionPanel.getPlot().getSelectedRanges().length > 0);
|
||||
btLoad.setEnabled(isEnabled());
|
||||
btSave.setEnabled(buttonDetailedScan.isEnabled());
|
||||
}
|
||||
|
||||
DeviceListener progressListener = new DeviceListener() {
|
||||
|
||||
@Override
|
||||
public void onStateChanged(Device device, State state, State state1) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object o, Object o1) {
|
||||
if (running){
|
||||
Double total = scienta.getTotalChannels().take();
|
||||
Double current = scienta.getCurrentChannel().take();
|
||||
if ((total!=null) && (current!=null)){
|
||||
getView().getStatusBar().setProgress(scienta.getProgress());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
buttonAbort = new javax.swing.JButton();
|
||||
buttonInitialScan = new javax.swing.JButton();
|
||||
rangeSelectionPanel = new ch.psi.pshell.swing.RangeSelectionPanel() {
|
||||
protected void onSeriesChanged() {
|
||||
updateButtons();
|
||||
}
|
||||
protected void onSelectionChanged() {
|
||||
updateButtons();
|
||||
}
|
||||
}
|
||||
;
|
||||
buttonDetailedScan = new javax.swing.JButton();
|
||||
btSave = new javax.swing.JButton();
|
||||
btLoad = new javax.swing.JButton();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
valueLow = new ch.psi.pshell.swing.ValueSelection();
|
||||
jLabel2 = new javax.swing.JLabel();
|
||||
valueHigh = new ch.psi.pshell.swing.ValueSelection();
|
||||
|
||||
buttonAbort.setText("Abort");
|
||||
buttonAbort.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonAbortActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonInitialScan.setText("Initial Scan");
|
||||
buttonInitialScan.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonInitialScanActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonDetailedScan.setText("Detailed Scan");
|
||||
buttonDetailedScan.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonDetailedScanActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btSave.setText("Save");
|
||||
btSave.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btSaveActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
btLoad.setText("Load");
|
||||
btLoad.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
btLoadActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
jLabel1.setText("Low:");
|
||||
|
||||
valueLow.setDecimals(2);
|
||||
valueLow.setMaxValue(1000.0);
|
||||
valueLow.setMinValue(0.0);
|
||||
valueLow.setShowButtons(false);
|
||||
valueLow.setValue(0.0);
|
||||
|
||||
jLabel2.setText("High:");
|
||||
|
||||
valueHigh.setDecimals(2);
|
||||
valueHigh.setMaxValue(1000.0);
|
||||
valueHigh.setMinValue(0.0);
|
||||
valueHigh.setShowButtons(false);
|
||||
valueHigh.setValue(100.0);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(rangeSelectionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 900, Short.MAX_VALUE)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(buttonInitialScan, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabel1)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(valueLow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(jLabel2)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(valueHigh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(60, 60, 60)
|
||||
.addComponent(buttonDetailedScan, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonAbort))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addComponent(btLoad)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(btSave)))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btLoad, btSave, buttonAbort, buttonDetailedScan, buttonInitialScan});
|
||||
|
||||
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {valueHigh, valueLow});
|
||||
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(buttonInitialScan)
|
||||
.addComponent(buttonDetailedScan)
|
||||
.addComponent(buttonAbort)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(jLabel2)
|
||||
.addComponent(valueHigh, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(valueLow, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel1)))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(rangeSelectionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 240, Short.MAX_VALUE)
|
||||
.addGap(43, 43, 43))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btLoad, javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addComponent(btSave, javax.swing.GroupLayout.Alignment.TRAILING))))
|
||||
.addContainerGap())
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed
|
||||
abort();
|
||||
}//GEN-LAST:event_buttonAbortActionPerformed
|
||||
|
||||
private void buttonInitialScanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonInitialScanActionPerformed
|
||||
try {
|
||||
//getApp().startTask(task);
|
||||
HashMap<String, RangeSelection[]> args = new HashMap<>();
|
||||
args.put("ranges", new RangeSelection[]{new RangeSelection(valueLow.getValue(),valueHigh.getValue())});
|
||||
rangeSelectionPanel.clear();
|
||||
detailedScan = false;
|
||||
runAsync("XPSSpectrum", args);
|
||||
running = true;
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_buttonInitialScanActionPerformed
|
||||
|
||||
private void buttonDetailedScanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDetailedScanActionPerformed
|
||||
try {
|
||||
RangeSelection[] ranges = rangeSelectionPanel.getRangesOrdered();
|
||||
HashMap<String, RangeSelection[]> args = new HashMap<>();
|
||||
args.put("ranges", ranges);
|
||||
detailedScan = true;
|
||||
runAsync("XPSSpectrum", args);
|
||||
running = true;
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonDetailedScanActionPerformed
|
||||
|
||||
private void btSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSaveActionPerformed
|
||||
try {
|
||||
JFileChooser chooser = new JFileChooser(getController().getSetup().getContextPath());
|
||||
FileNameExtensionFilter filter = new FileNameExtensionFilter("XPS Spectrum scan definition file", "xps");
|
||||
chooser.setFileFilter(filter);
|
||||
int rVal = chooser.showSaveDialog(this);
|
||||
if (rVal == JFileChooser.APPROVE_OPTION) {
|
||||
File f = chooser.getSelectedFile();
|
||||
if (IO.getExtension(f).isEmpty()){
|
||||
f = new File(f.getPath() + ".xps");
|
||||
}
|
||||
Object[] obj = new Object[]{SwingUtils.getTableData(rangeSelectionPanel.getTable()),
|
||||
rangeSelectionPanel.getPlot().getSeries(0).getX(),
|
||||
rangeSelectionPanel.getPlot().getSeries(0).getY()};
|
||||
Files.write(f.toPath(), Serializer.encode(obj, Serializer.EncoderType.bin));
|
||||
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
|
||||
}//GEN-LAST:event_btSaveActionPerformed
|
||||
|
||||
private void btLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btLoadActionPerformed
|
||||
try {
|
||||
JFileChooser chooser = new JFileChooser(getController().getSetup().getContextPath());
|
||||
FileNameExtensionFilter filter = new FileNameExtensionFilter("XPS Spectrum scan definition file", "xps");
|
||||
chooser.setFileFilter(filter);
|
||||
int rVal = chooser.showOpenDialog(this);
|
||||
if (rVal == JFileChooser.APPROVE_OPTION) {
|
||||
rangeSelectionPanel.removeAllRanges();
|
||||
Object[] obj = (Object[])Serializer.decode(Files.readAllBytes(chooser.getSelectedFile().toPath()), Serializer.EncoderType.bin);
|
||||
Object[][] table = (Object[][]) obj[0];
|
||||
if (!rangeSelectionPanel.getPlot().hasData()){
|
||||
double[] x = (double[]) obj[1];
|
||||
double[] y = (double[]) obj[2];
|
||||
LinePlotSeries series = new LinePlotSeries("Data");
|
||||
rangeSelectionPanel.setSeries(series);
|
||||
series.setData(x, y);
|
||||
}
|
||||
for (Object[] row:table){
|
||||
rangeSelectionPanel.getPlot().addRange((Double)row[0], (Double)row[2]);
|
||||
}
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (int row = 0; row < table.length; row++) {
|
||||
for (int col = 3; col < 6; col++) {
|
||||
rangeSelectionPanel.getTable().setValueAt(table[row][col], row , col);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_btLoadActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btLoad;
|
||||
private javax.swing.JButton btSave;
|
||||
private javax.swing.JButton buttonAbort;
|
||||
private javax.swing.JButton buttonDetailedScan;
|
||||
private javax.swing.JButton buttonInitialScan;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel2;
|
||||
private ch.psi.pshell.swing.RangeSelectionPanel rangeSelectionPanel;
|
||||
private ch.psi.pshell.swing.ValueSelection valueHigh;
|
||||
private ch.psi.pshell.swing.ValueSelection valueLow;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
Reference in New Issue
Block a user