Remove Hexiposi
This commit is contained in:
@@ -9,6 +9,7 @@ import ch.psi.pshell.device.Device;
|
||||
import ch.psi.pshell.device.DeviceAdapter;
|
||||
import ch.psi.pshell.device.DeviceBase;
|
||||
import ch.psi.pshell.device.DeviceListener;
|
||||
import ch.psi.pshell.device.GenericDevice;
|
||||
import ch.psi.pshell.imaging.PointDouble;
|
||||
import ch.psi.pshell.imaging.Renderer;
|
||||
import ch.psi.pshell.imaging.RendererMode;
|
||||
@@ -431,6 +432,12 @@ public class MainPanel extends Panel {
|
||||
setSampleDatamatrix(null);
|
||||
setBackgroundUpdate(true);
|
||||
startTimer(3000, 1000);
|
||||
if (runCount==0){
|
||||
GenericDevice img = this.getDevice("img");
|
||||
if (img!=null){
|
||||
buttonCamera.setSelected(true);
|
||||
}
|
||||
}
|
||||
updateCameraView();
|
||||
} catch (Exception ex){
|
||||
getLogger().log(Level.SEVERE, null, ex);
|
||||
@@ -1003,7 +1010,7 @@ public class MainPanel extends Panel {
|
||||
ledLidControlActive5 = new ch.psi.pshell.swing.Led();
|
||||
jLabel23 = new javax.swing.JLabel();
|
||||
panelDetection = new javax.swing.JPanel();
|
||||
buttonCalibrationPanel = new javax.swing.JButton();
|
||||
buttonDetectionExposure = new javax.swing.JButton();
|
||||
buttonDetectionCalibrate = new javax.swing.JButton();
|
||||
panelCover = new javax.swing.JPanel();
|
||||
jLabel1 = new javax.swing.JLabel();
|
||||
@@ -1062,6 +1069,7 @@ public class MainPanel extends Panel {
|
||||
buttonExpertCommands = new javax.swing.JButton();
|
||||
buttonRecovery = new javax.swing.JButton();
|
||||
buttonConfig = new javax.swing.JButton();
|
||||
buttonExpertDetection = new javax.swing.JButton();
|
||||
panelBottom = new javax.swing.JPanel();
|
||||
panelSamples = new javax.swing.JPanel();
|
||||
panelTableSamples = new javax.swing.JScrollPane();
|
||||
@@ -1158,10 +1166,10 @@ public class MainPanel extends Panel {
|
||||
|
||||
panelDetection.setBorder(javax.swing.BorderFactory.createTitledBorder("Detection"));
|
||||
|
||||
buttonCalibrationPanel.setText("Panel");
|
||||
buttonCalibrationPanel.addActionListener(new java.awt.event.ActionListener() {
|
||||
buttonDetectionExposure.setText("Exposure");
|
||||
buttonDetectionExposure.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonCalibrationPanelActionPerformed(evt);
|
||||
buttonDetectionExposureActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1180,11 +1188,11 @@ public class MainPanel extends Panel {
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(panelDetectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
||||
.addComponent(buttonDetectionCalibrate)
|
||||
.addComponent(buttonCalibrationPanel))
|
||||
.addComponent(buttonDetectionExposure))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelDetectionLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonCalibrationPanel, buttonDetectionCalibrate});
|
||||
panelDetectionLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonDetectionCalibrate, buttonDetectionExposure});
|
||||
|
||||
panelDetectionLayout.setVerticalGroup(
|
||||
panelDetectionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -1192,7 +1200,7 @@ public class MainPanel extends Panel {
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonDetectionCalibrate)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonCalibrationPanel)
|
||||
.addComponent(buttonDetectionExposure)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
@@ -1245,7 +1253,6 @@ public class MainPanel extends Panel {
|
||||
panelViewType.setBorder(javax.swing.BorderFactory.createTitledBorder("View"));
|
||||
|
||||
buttonGroup1.add(buttonCamera);
|
||||
buttonCamera.setSelected(true);
|
||||
buttonCamera.setText("Image");
|
||||
buttonCamera.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -1254,6 +1261,7 @@ public class MainPanel extends Panel {
|
||||
});
|
||||
|
||||
buttonGroup1.add(buttonDrawing);
|
||||
buttonDrawing.setSelected(true);
|
||||
buttonDrawing.setText("Design");
|
||||
buttonDrawing.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
@@ -1294,7 +1302,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(panelLegend, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelDetection, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 255, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 254, Short.MAX_VALUE)
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(panelCover, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelViewType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
@@ -1386,7 +1394,7 @@ public class MainPanel extends Panel {
|
||||
panelBeamlineStatusLayout.setVerticalGroup(
|
||||
panelBeamlineStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelBeamlineStatusLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGap(0, 3, Short.MAX_VALUE)
|
||||
.addGroup(panelBeamlineStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel8))
|
||||
@@ -1394,7 +1402,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(panelBeamlineStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel9))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(9, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelSystemStatus.setBorder(javax.swing.BorderFactory.createTitledBorder("System Status"));
|
||||
@@ -1463,7 +1471,7 @@ public class MainPanel extends Panel {
|
||||
panelSystemStatusLayout.setVerticalGroup(
|
||||
panelSystemStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSystemStatusLayout.createSequentialGroup()
|
||||
.addGap(0, 7, Short.MAX_VALUE)
|
||||
.addGap(0, 9, Short.MAX_VALUE)
|
||||
.addGroup(panelSystemStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(panelSystemStatusLayout.createSequentialGroup()
|
||||
.addGroup(panelSystemStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
@@ -1498,12 +1506,12 @@ public class MainPanel extends Panel {
|
||||
.addGroup(panelSystemStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledPsysSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabell21))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 11, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE)
|
||||
.addGroup(panelSystemStatusLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSystemStatusLayout.createSequentialGroup()
|
||||
.addComponent(buttonRelease)
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE))
|
||||
.addComponent(filler1, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE))
|
||||
.addGap(4, 4, 4))
|
||||
);
|
||||
|
||||
@@ -1546,7 +1554,7 @@ public class MainPanel extends Panel {
|
||||
panelDatamatrixLayout.setVerticalGroup(
|
||||
panelDatamatrixLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelDatamatrixLayout.createSequentialGroup()
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGap(0, 4, Short.MAX_VALUE)
|
||||
.addGroup(panelDatamatrixLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel11)
|
||||
.addComponent(textPuckDatamatrix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
@@ -1554,7 +1562,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(panelDatamatrixLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel13)
|
||||
.addComponent(textSampleDatamatrix, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(0, 0, Short.MAX_VALUE))
|
||||
.addGap(0, 4, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout panelStatusLayout = new javax.swing.GroupLayout(panelStatus);
|
||||
@@ -1679,6 +1687,13 @@ public class MainPanel extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
buttonExpertDetection.setText("Cover Det");
|
||||
buttonExpertDetection.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonExpertDetectionActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout panelExpertLayout = new javax.swing.GroupLayout(panelExpert);
|
||||
panelExpert.setLayout(panelExpertLayout);
|
||||
panelExpertLayout.setHorizontalGroup(
|
||||
@@ -1689,7 +1704,8 @@ public class MainPanel extends Panel {
|
||||
.addComponent(buttonRecovery, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonCalibrateImage, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonCalibrateCover, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonConfig, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(buttonConfig, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(buttonExpertDetection, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(panelExpertLayout.createSequentialGroup()
|
||||
.addComponent(checkExpert, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -1703,7 +1719,9 @@ public class MainPanel extends Panel {
|
||||
.addGroup(panelExpertLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(checkExpert)
|
||||
.addGap(18, 26, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonExpertDetection)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonExpertCommands)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonRecovery)
|
||||
@@ -1730,11 +1748,11 @@ public class MainPanel extends Panel {
|
||||
panelDevicesLayout.setVerticalGroup(
|
||||
panelDevicesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelDevicesLayout.createSequentialGroup()
|
||||
.addContainerGap(10, Short.MAX_VALUE)
|
||||
.addContainerGap(13, Short.MAX_VALUE)
|
||||
.addGroup(panelDevicesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelExpert, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(devicesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
|
||||
.addContainerGap(11, Short.MAX_VALUE))
|
||||
.addComponent(devicesPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout panelRightLayout = new javax.swing.GroupLayout(panelRight);
|
||||
@@ -1817,7 +1835,7 @@ public class MainPanel extends Panel {
|
||||
panelSamplesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelSamplesLayout.createSequentialGroup()
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(panelTableSamples, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
|
||||
.addComponent(panelTableSamples, javax.swing.GroupLayout.DEFAULT_SIZE, 56, Short.MAX_VALUE)
|
||||
.addGap(0, 0, 0))
|
||||
);
|
||||
|
||||
@@ -1958,13 +1976,13 @@ public class MainPanel extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_buttonDetectionCalibrateActionPerformed
|
||||
|
||||
private void buttonCalibrationPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCalibrationPanelActionPerformed
|
||||
try {
|
||||
this.evalAsync("cover_detection.set_renderer(show_panel(img))", true);
|
||||
private void buttonDetectionExposureActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDetectionExposureActionPerformed
|
||||
try {
|
||||
this.runAsync("setupCoverDetectionExposureScan.py", this, false);
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonCalibrationPanelActionPerformed
|
||||
}//GEN-LAST:event_buttonDetectionExposureActionPerformed
|
||||
|
||||
|
||||
private void checkExpertActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkExpertActionPerformed
|
||||
@@ -2052,6 +2070,14 @@ public class MainPanel extends Panel {
|
||||
execute("release_safety()", true);
|
||||
}//GEN-LAST:event_buttonReleaseActionPerformed
|
||||
|
||||
private void buttonExpertDetectionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonExpertDetectionActionPerformed
|
||||
try {
|
||||
this.evalAsync("cover_detection.set_renderer(show_panel(img))", true);
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}//GEN-LAST:event_buttonExpertDetectionActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
ch.psi.mxsc.BasePlatePanel basePlatePanel;
|
||||
@@ -2059,12 +2085,13 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JToggleButton btViewRT;
|
||||
private javax.swing.JButton buttonCalibrateCover;
|
||||
private javax.swing.JButton buttonCalibrateImage;
|
||||
private javax.swing.JButton buttonCalibrationPanel;
|
||||
private javax.swing.JToggleButton buttonCamera;
|
||||
private javax.swing.JButton buttonConfig;
|
||||
private javax.swing.JButton buttonDetectionCalibrate;
|
||||
private javax.swing.JButton buttonDetectionExposure;
|
||||
private javax.swing.JToggleButton buttonDrawing;
|
||||
private javax.swing.JButton buttonExpertCommands;
|
||||
private javax.swing.JButton buttonExpertDetection;
|
||||
private javax.swing.ButtonGroup buttonGroup1;
|
||||
private javax.swing.JButton buttonRecovery;
|
||||
private javax.swing.JButton buttonRelease;
|
||||
|
||||
Reference in New Issue
Block a user