Add exposure apply button

This commit is contained in:
2025-08-19 09:31:29 +02:00
parent 1a077f7e69
commit 9703240a4c
2 changed files with 237 additions and 127 deletions

View File

@@ -45,16 +45,18 @@
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelScreen" alignment="1" max="32767" attributes="0"/>
<Component id="panelControls" alignment="0" max="32767" attributes="0"/>
<Component id="panelParameters" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="-2" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="panelParameters" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="panelScreen" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="panelControls" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="342" max="32767" attributes="0"/>
<EmptySpace pref="334" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -114,7 +116,7 @@
<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="Camera Control"/>
<TitledBorder title="Device Control"/>
</Border>
</Property>
</Properties>
@@ -127,12 +129,10 @@
<Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="jLabel4" max="32767" attributes="0"/>
<Component id="jLabel2" linkSize="14" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" linkSize="14" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="jLabel3" alignment="1" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="panelExposure" pref="0" max="32767" attributes="0"/>
<Component id="selMirror" pref="0" max="32767" attributes="0"/>
<Component id="selLedPower" pref="0" max="32767" attributes="0"/>
<Group type="102" attributes="0">
@@ -150,43 +150,29 @@
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="panelExposure" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel2" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="selMirror" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
<Component id="selMirror" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel3" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="selLedPower" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
<Component id="selLedPower" alignment="0" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="jLabel4" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonFLDown" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="panelFlStep" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonFLUp" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="buttonFLDown" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
<Component id="panelFlStep" min="-2" max="-2" attributes="0"/>
<Component id="buttonFLUp" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="ch.psi.pshell.swing.RegisterPanel" name="panelExposure">
</Component>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Exposure:"/>
</Properties>
</Component>
<Component class="javax.swing.JLabel" name="jLabel2">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
@@ -229,6 +215,63 @@
</Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="panelParameters">
<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="Camera Parameters"/>
</Border>
</Property>
</Properties>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="panelExposure" pref="0" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
<Component id="buttonApplyExposure" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
<Group type="103" groupAlignment="2" attributes="0">
<Component id="panelExposure" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="jLabel1" alignment="2" min="-2" max="-2" attributes="0"/>
<Component id="buttonApplyExposure" alignment="2" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Component class="javax.swing.JLabel" name="jLabel1">
<Properties>
<Property name="horizontalAlignment" type="int" value="11"/>
<Property name="text" type="java.lang.String" value="Exposure:"/>
</Properties>
</Component>
<Component class="ch.psi.pshell.swing.RegisterPanel" name="panelExposure">
</Component>
<Component class="javax.swing.JButton" name="buttonApplyExposure">
<Properties>
<Property name="text" type="java.lang.String" value="&#x2713;"/>
<Property name="toolTipText" type="java.lang.String" value="Set camera status to &apos;Idle&apos; and then to &apos;Running&apos;"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="buttonApplyExposureActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
</SubComponents>
</Container>
<Component class="ch.psi.pshell.screenpanel.CamServerViewer" name="camServerViewer">

View File

@@ -67,6 +67,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
public ScreenPanelSLS() {
logger = Logger.getLogger(getClass().getName());
initComponents();
panelParameters.setVisible(false);
panelScreen.setVisible(false);
panelControls.setVisible(false);
camServerViewer.setListener(this);
@@ -76,7 +77,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
camServerViewer.setSidePanelVisible(true);
camServerViewer.setShowFit(true);
camServerViewer.setShowProfile(true);
camServerViewer.setShowReticle(true);
camServerViewer.setShowReticle(true);
}
@Override
@@ -183,10 +184,12 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
buttonFLUp.setEnabled(false);
selLedPower.setEnabled(false);
panelExposure.setEnabled(false);
buttonApplyExposure.setEnabled(false);
selMirror.setEnabled(false);
if ((name==null)|| name.isBlank()){
panelParameters.setVisible(false);
panelScreen.setVisible(false);
panelControls.setVisible(false);
panelControls.setVisible(false);
}
updateDialogTitle();
}
@@ -203,94 +206,100 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
boolean ltb = (types!=null) && types.contains(LTB_TYPE);
boolean linac = (types!=null) && types.contains(LINAC_TYPE);
boolean rf = (types!=null) && types.contains(RF_TYPE);
boolean ring = (types!=null) && types.contains(RING_TYPE);
boolean ring = (types!=null) && types.contains(RING_TYPE);
boolean cameraControls = linac || ltb || booster || btr || ring;
boolean flipMirror = linac || ltb || booster;
boolean cameraParameters = cameraControls || frontend || rf;
panelParameters.setVisible(cameraParameters);
panelScreen.setVisible(cameraControls);
panelControls.setVisible(cameraControls);
if (cameraName!=null){
if (cameraControls) {
if (cameraName!=null){
if (cameraParameters || cameraControls) {
//Parallelizing initialization
devicesInitTask = new Thread(() -> {
try {
exposure = new ChannelDouble("Exposure Time", cameraName + ":EXPOSURE");
exposure.setMonitored(true);
exposure.initialize();
} catch (Exception ex) {
System.err.println(ex.getMessage());
exposure = null;
}
panelExposure.setEnabled(exposure != null);
panelExposure.setDevice(exposure);
if (flipMirror){
if (cameraParameters){
try {
mirror = new BinaryPositioner("Flip Mirror", cameraName + ":FLIP-MIRROR");
mirror.setMonitored(true);
mirror.initialize();
exposure = new ChannelDouble("Exposure Time", cameraName + ":EXPOSURE");
exposure.setMonitored(true);
exposure.initialize();
} catch (Exception ex) {
System.err.println(ex.getMessage());
exposure = null;
}
panelExposure.setEnabled(exposure != null);
panelExposure.setDevice(exposure);
buttonApplyExposure.setEnabled(panelExposure.isEnabled());
}
if (cameraControls) {
if (flipMirror){
try {
mirror = new BinaryPositioner("Flip Mirror", cameraName + ":FLIP-MIRROR");
mirror.setMonitored(true);
mirror.initialize();
} catch (Exception ex) {
System.err.println(ex.getMessage());
mirror = null;
}
} else {
mirror = null;
}
} else {
mirror = null;
}
selMirror.setEnabled(mirror != null);
selMirror.setDevice(mirror);
try {
ledPower = new BinaryPositioner("Led Power", cameraName + ":LED-POWER");
ledPower.setMonitored(true);
ledPower.initialize();
selMirror.setEnabled(mirror != null);
selMirror.setDevice(mirror);
} catch (Exception ex) {
System.err.println(ex.getMessage());
ledPower = null;
}
selLedPower.setEnabled(ledPower != null);
selLedPower.setDevice(ledPower);
try {
flStep = new ChannelDouble("Lens FL Step", cameraName + "-LENS:FL_STEP");
flStep.setMonitored(true);
flStep.initialize();
} catch (Exception ex) {
System.err.println(ex.getMessage());
flStep = null;
}
panelFlStep.setEnabled(flStep != null);
buttonFLDown.setEnabled(flStep != null);
buttonFLUp.setEnabled(flStep != null);
panelFlStep.setDevice(flStep);
try{
screen = new DiscretePositioner("CurrentScreen", cameraName + ":SET_SCREEN1_POS", cameraName + ":GET_SCREEN1_POS");
screen.setMonitored(true);
screen.initialize();
DefaultComboBoxModel model = new DefaultComboBoxModel();
for (String pos : screen.getPositions()) {
model.addElement(pos);
try {
ledPower = new BinaryPositioner("Led Power", cameraName + ":LED-POWER");
ledPower.setMonitored(true);
ledPower.initialize();
} catch (Exception ex) {
System.err.println(ex.getMessage());
ledPower = null;
}
comboScreen.setModel(model);
comboScreen.setSelectedItem(screen.read());
selLedPower.setEnabled(ledPower != null);
selLedPower.setDevice(ledPower);
} catch (Exception ex) {
comboScreen.setModel(new DefaultComboBoxModel());
System.err.println(ex.getMessage());
screen = null;
try {
flStep = new ChannelDouble("Lens FL Step", cameraName + "-LENS:FL_STEP");
flStep.setMonitored(true);
flStep.initialize();
} catch (Exception ex) {
System.err.println(ex.getMessage());
flStep = null;
}
panelFlStep.setEnabled(flStep != null);
buttonFLDown.setEnabled(flStep != null);
buttonFLUp.setEnabled(flStep != null);
panelFlStep.setDevice(flStep);
try{
screen = new DiscretePositioner("CurrentScreen", cameraName + ":SET_SCREEN1_POS", cameraName + ":GET_SCREEN1_POS");
screen.setMonitored(true);
screen.initialize();
DefaultComboBoxModel model = new DefaultComboBoxModel();
for (String pos : screen.getPositions()) {
model.addElement(pos);
}
comboScreen.setModel(model);
comboScreen.setSelectedItem(screen.read());
} catch (Exception ex) {
comboScreen.setModel(new DefaultComboBoxModel());
System.err.println(ex.getMessage());
screen = null;
}
comboScreen.setEnabled(screen != null);
valueScreen.setEnabled(screen != null);
valueScreen.setDevice(screen);
}
comboScreen.setEnabled(screen != null);
valueScreen.setEnabled(screen != null);
valueScreen.setDevice(screen);
});
devicesInitTask.start();
}
@@ -376,8 +385,6 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
valueScreen = new ch.psi.pshell.swing.DeviceValuePanel();
comboScreen = new javax.swing.JComboBox();
panelControls = new javax.swing.JPanel();
panelExposure = new ch.psi.pshell.swing.RegisterPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
selMirror = new ch.psi.pshell.swing.DiscretePositionerSelector();
jLabel3 = new javax.swing.JLabel();
@@ -386,6 +393,10 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
panelFlStep = new ch.psi.pshell.swing.RegisterPanel();
buttonFLDown = new javax.swing.JButton();
buttonFLUp = new javax.swing.JButton();
panelParameters = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
panelExposure = new ch.psi.pshell.swing.RegisterPanel();
buttonApplyExposure = new javax.swing.JButton();
camServerViewer = new ch.psi.pshell.screenpanel.CamServerViewer();
setPreferredSize(new java.awt.Dimension(873, 600));
@@ -421,10 +432,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
.addContainerGap())
);
panelControls.setBorder(javax.swing.BorderFactory.createTitledBorder("Camera Control"));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel1.setText("Exposure:");
panelControls.setBorder(javax.swing.BorderFactory.createTitledBorder("Device Control"));
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel2.setText("Flip Mirror:");
@@ -458,11 +466,9 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelExposure, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(selMirror, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
.addComponent(selLedPower, javax.swing.GroupLayout.DEFAULT_SIZE, 0, Short.MAX_VALUE)
.addGroup(panelControlsLayout.createSequentialGroup()
@@ -473,31 +479,61 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
.addComponent(buttonFLUp)))
.addContainerGap())
);
panelControlsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2});
panelControlsLayout.setVerticalGroup(
panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelControlsLayout.createSequentialGroup()
.addGap(4, 4, 4)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(panelExposure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(selMirror, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel3)
.addComponent(selLedPower, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(buttonFLDown))
.addGroup(panelControlsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(jLabel4)
.addComponent(buttonFLDown)
.addComponent(panelFlStep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(buttonFLUp))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
panelParameters.setBorder(javax.swing.BorderFactory.createTitledBorder("Camera Parameters"));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel1.setText("Exposure:");
buttonApplyExposure.setText("");
buttonApplyExposure.setToolTipText("Set camera status to 'Idle' and then to 'Running'");
buttonApplyExposure.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
buttonApplyExposureActionPerformed(evt);
}
});
javax.swing.GroupLayout panelParametersLayout = new javax.swing.GroupLayout(panelParameters);
panelParameters.setLayout(panelParametersLayout);
panelParametersLayout.setHorizontalGroup(
panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelParametersLayout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(panelExposure, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(buttonApplyExposure)
.addContainerGap())
);
panelParametersLayout.setVerticalGroup(
panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelParametersLayout.createSequentialGroup()
.addGap(4, 4, 4)
.addGroup(panelParametersLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(panelExposure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1)
.addComponent(buttonApplyExposure))
.addContainerGap())
);
javax.swing.GroupLayout customPanelLayout = new javax.swing.GroupLayout(customPanel);
@@ -506,15 +542,17 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
customPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(panelScreen, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelControls, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelParameters, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
customPanelLayout.setVerticalGroup(
customPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(customPanelLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(panelParameters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(panelScreen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(panelControls, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(342, Short.MAX_VALUE))
.addContainerGap(334, Short.MAX_VALUE))
);
add(customPanel, java.awt.BorderLayout.WEST);
@@ -572,7 +610,35 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
}
}//GEN-LAST:event_buttonFLUpActionPerformed
private void buttonApplyExposureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonApplyExposureActionPerformed
try {
String cameraName = camServerViewer.getCameraName();
if (cameraName!=null){
String chStatus = cameraName+":CAMERASTATUS";
buttonApplyExposure.setEnabled(false);
SwingUtilities.invokeLater(()->{
try {
//int status = Epics.get(chStatus, Integer.class);
//if (status==2){
Epics.put(chStatus, 1);
Epics.put(chStatus, 2);
//}
} catch (Exception ex) {
showException(ex);
} finally{
if (cameraName.equals(camServerViewer.getCameraName())){
buttonApplyExposure.setEnabled(true);
}
}
});
}
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_buttonApplyExposureActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonApplyExposure;
private javax.swing.JButton buttonFLDown;
private javax.swing.JButton buttonFLUp;
private javax.swing.ButtonGroup buttonGroup1;
@@ -590,6 +656,7 @@ public class ScreenPanelSLS extends Panel implements CamServerViewer.CamServerVi
private javax.swing.JPanel panelControls;
private ch.psi.pshell.swing.RegisterPanel panelExposure;
private ch.psi.pshell.swing.RegisterPanel panelFlStep;
private javax.swing.JPanel panelParameters;
private javax.swing.JPanel panelScreen;
private ch.psi.pshell.swing.DiscretePositionerSelector selLedPower;
private ch.psi.pshell.swing.DiscretePositionerSelector selMirror;