This commit is contained in:
@@ -4,10 +4,8 @@
|
||||
|
||||
package ch.psi.mxsc;
|
||||
|
||||
import ch.psi.pshell.core.Context;
|
||||
import ch.psi.pshell.device.Device;
|
||||
import ch.psi.pshell.device.DeviceAdapter;
|
||||
import ch.psi.pshell.device.DeviceListener;
|
||||
import ch.psi.pshell.imaging.Renderer;
|
||||
import ch.psi.pshell.imaging.RendererMode;
|
||||
import ch.psi.pshell.imaging.Source;
|
||||
@@ -15,18 +13,10 @@ import ch.psi.pshell.ui.Panel;
|
||||
import ch.psi.utils.State;
|
||||
import ch.psi.utils.swing.SwingUtils;
|
||||
import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dialog;
|
||||
import java.awt.Dimension;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import javax.script.ScriptException;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.border.TitledBorder;
|
||||
|
||||
/**
|
||||
@@ -48,70 +38,77 @@ public class MainPanel extends Panel {
|
||||
public void onInitialize(int runCount) {
|
||||
Controller.getInstance().onInitialize(runCount);
|
||||
basePlatePanel.setDevice((Device) getDevice("BasePlate"));
|
||||
basePlatePanel.getDevice().setSelectable(true);
|
||||
((Device) getDevice("dewar_level")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateLevel(value);
|
||||
}
|
||||
});
|
||||
updateLevel(((Device) getDevice("dewar_level")).take());
|
||||
|
||||
((Device) getDevice("filling_dewar")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateFillingDeware(value);
|
||||
}
|
||||
});
|
||||
updateFillingDeware(((Device) getDevice("filling_dewar")).take());
|
||||
|
||||
((Device) getDevice("ln2_main_power")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateFillingControl(value);
|
||||
}
|
||||
});
|
||||
updateFillingControl(((Device) getDevice("ln2_main_power")).take());
|
||||
|
||||
((Device) getDevice("hexiposi")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onStateChanged(Device device, State state, State former) {
|
||||
updateHexiposiState(state);
|
||||
}
|
||||
});
|
||||
updateHexiposiState(((Device) getDevice("hexiposi")).getState());
|
||||
|
||||
((Device) getDevice("air_pressure_ok")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateAirPressure(value);
|
||||
}
|
||||
});
|
||||
updateAirPressure(((Device) getDevice("air_pressure_ok")).take());
|
||||
basePlatePanel.getDevice().setSelectable(true);
|
||||
try{
|
||||
devicesPanel.initialize();
|
||||
((Device) getDevice("dewar_level")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateLevel(value);
|
||||
}
|
||||
});
|
||||
updateLevel(((Device) getDevice("dewar_level")).take());
|
||||
|
||||
((Device) getDevice("n2_pressure_ok")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateN2Pressure(value);
|
||||
}
|
||||
});
|
||||
updateN2Pressure(((Device) getDevice("n2_pressure_ok")).take());
|
||||
((Device) getDevice("filling_dewar")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateFillingDeware(value);
|
||||
}
|
||||
});
|
||||
updateFillingDeware(((Device) getDevice("filling_dewar")).take());
|
||||
|
||||
((Device) getDevice("feedback_local_safety")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateLocalSafety(value);
|
||||
}
|
||||
});
|
||||
updateLocalSafety(((Device) getDevice("feedback_local_safety")).take());
|
||||
((Device) getDevice("ln2_main_power")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateFillingControl(value);
|
||||
}
|
||||
});
|
||||
updateFillingControl(((Device) getDevice("ln2_main_power")).take());
|
||||
|
||||
((Device) getDevice("hexiposi")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onStateChanged(Device device, State state, State former) {
|
||||
updateHexiposiState(state);
|
||||
}
|
||||
});
|
||||
updateHexiposiState(((Device) getDevice("hexiposi")).getState());
|
||||
|
||||
((Device) getDevice("air_pressure_ok")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateAirPressure(value);
|
||||
}
|
||||
});
|
||||
updateAirPressure(((Device) getDevice("air_pressure_ok")).take());
|
||||
|
||||
((Device) getDevice("n2_pressure_ok")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateN2Pressure(value);
|
||||
}
|
||||
});
|
||||
updateN2Pressure(((Device) getDevice("n2_pressure_ok")).take());
|
||||
|
||||
((Device) getDevice("feedback_local_safety")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updateLocalSafety(value);
|
||||
}
|
||||
});
|
||||
updateLocalSafety(((Device) getDevice("feedback_local_safety")).take());
|
||||
|
||||
((Device) getDevice("feedback_psys_safety")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updatePsysSafety(value);
|
||||
}
|
||||
});
|
||||
updatePsysSafety(((Device) getDevice("feedback_psys_safety")).take());
|
||||
} catch (Exception ex){
|
||||
this.getLogger().log(Level.SEVERE,null, ex);
|
||||
}
|
||||
updateCameraView();
|
||||
|
||||
((Device) getDevice("feedback_psys_safety")).addListener(new DeviceAdapter() {
|
||||
@Override
|
||||
public void onValueChanged(Device device, Object value, Object former) {
|
||||
updatePsysSafety(value);
|
||||
}
|
||||
});
|
||||
updatePsysSafety(((Device) getDevice("feedback_psys_safety")).take());
|
||||
}
|
||||
|
||||
void updateLevel(Object value){
|
||||
@@ -198,8 +195,40 @@ public class MainPanel extends Panel {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void updateCameraView(){
|
||||
Source source = buttonCamera.isSelected() ? (Source)this.getDevice("img"): null;
|
||||
basePlatePanel.setCameraView(source);
|
||||
}
|
||||
|
||||
void execute(String statement){
|
||||
execute(statement, false);
|
||||
}
|
||||
|
||||
void execute(String statement, boolean background){
|
||||
try {
|
||||
evalAsync(statement, background).handle((ret, ex) -> {
|
||||
if (ex != null){
|
||||
showException((Exception)ex);
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
void execute(String script, Object args){
|
||||
try {
|
||||
runAsync(script, args).handle((ret, ex) -> {
|
||||
if (ex != null){
|
||||
showException((Exception)ex);
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/** This method is called from within the constructor to
|
||||
* initialize the form.
|
||||
@@ -222,6 +251,8 @@ public class MainPanel extends Panel {
|
||||
jLabel19 = new javax.swing.JLabel();
|
||||
ledLidControlActive4 = new ch.psi.pshell.swing.Led();
|
||||
ledLidControlActive3 = new ch.psi.pshell.swing.Led();
|
||||
ledLidControlActive5 = new ch.psi.pshell.swing.Led();
|
||||
jLabel23 = new javax.swing.JLabel();
|
||||
buttonClearDet = new javax.swing.JButton();
|
||||
panelDet = new javax.swing.JPanel();
|
||||
jLabel21 = new javax.swing.JLabel();
|
||||
@@ -242,6 +273,7 @@ public class MainPanel extends Panel {
|
||||
roomTempBasePlatePanel1 = new ch.psi.mxsc.RoomTempBasePlatePanel();
|
||||
jPanel5 = new javax.swing.JPanel();
|
||||
buttonExpert = new javax.swing.JButton();
|
||||
devicesPanel = new ch.psi.mxsc.DevicesPanel();
|
||||
jPanel4 = new javax.swing.JPanel();
|
||||
ledFillingControl = new ch.psi.pshell.swing.Led();
|
||||
ledFillingDewar = new ch.psi.pshell.swing.Led();
|
||||
@@ -286,6 +318,8 @@ public class MainPanel extends Panel {
|
||||
ledLocalSafety = new ch.psi.pshell.swing.Led();
|
||||
jLabell21 = new javax.swing.JLabel();
|
||||
ledPsysSafety = new ch.psi.pshell.swing.Led();
|
||||
buttonReleaseLocal = new javax.swing.JButton();
|
||||
buttonReleasePsys = new javax.swing.JButton();
|
||||
|
||||
basePlatePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Dewar"));
|
||||
|
||||
@@ -325,6 +359,11 @@ public class MainPanel extends Panel {
|
||||
ledLidControlActive3.setForeground(new java.awt.Color(128, 192, 192));
|
||||
ledLidControlActive3.setLedSize(20);
|
||||
|
||||
ledLidControlActive5.setForeground(new java.awt.Color(192, 152, 45));
|
||||
ledLidControlActive5.setLedSize(20);
|
||||
|
||||
jLabel23.setText("Offline");
|
||||
|
||||
javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
|
||||
jPanel11.setLayout(jPanel11Layout);
|
||||
jPanel11Layout.setHorizontalGroup(
|
||||
@@ -347,7 +386,11 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(ledLidControlActive4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel20)))
|
||||
.addComponent(jLabel20))
|
||||
.addGroup(jPanel11Layout.createSequentialGroup()
|
||||
.addComponent(ledLidControlActive5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel23)))
|
||||
.addGap(4, 4, 4))
|
||||
);
|
||||
jPanel11Layout.setVerticalGroup(
|
||||
@@ -368,7 +411,11 @@ public class MainPanel extends Panel {
|
||||
.addGap(0, 0, 0)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledLidControlActive1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel15)))
|
||||
.addComponent(jLabel15))
|
||||
.addGap(0, 0, Short.MAX_VALUE)
|
||||
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledLidControlActive5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel23)))
|
||||
);
|
||||
|
||||
buttonClearDet.setText("Clear");
|
||||
@@ -418,7 +465,7 @@ public class MainPanel extends Panel {
|
||||
.addComponent(jLabel22)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(textDetImage, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap(18, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout basePlatePanelLayout = new javax.swing.GroupLayout(basePlatePanel);
|
||||
@@ -436,7 +483,7 @@ public class MainPanel extends Panel {
|
||||
.addComponent(buttonClearDet, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
||||
.addGroup(basePlatePanelLayout.createSequentialGroup()
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 375, Short.MAX_VALUE)
|
||||
.addComponent(panelDet, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(4, 4, 4))))
|
||||
);
|
||||
@@ -451,10 +498,10 @@ public class MainPanel extends Panel {
|
||||
.addComponent(buttonPuckDet)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(buttonClearDet)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 273, Short.MAX_VALUE)
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelDet, 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)
|
||||
.addGroup(basePlatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(panelDet, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jPanel11, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(4, 4, 4))
|
||||
);
|
||||
|
||||
@@ -501,11 +548,11 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(progressLN2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(jPanel3Layout.createSequentialGroup()
|
||||
.addContainerGap(53, Short.MAX_VALUE)
|
||||
.addContainerGap(44, Short.MAX_VALUE)
|
||||
.addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)
|
||||
.addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(0, 0, 0)
|
||||
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
@@ -558,7 +605,7 @@ public class MainPanel extends Panel {
|
||||
|
||||
roomTempBasePlatePanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("RT Humidifier Lid States"));
|
||||
|
||||
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Robot Arm"));
|
||||
jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Devices"));
|
||||
|
||||
buttonExpert.setText("Expert ");
|
||||
buttonExpert.addActionListener(new java.awt.event.ActionListener() {
|
||||
@@ -571,17 +618,22 @@ public class MainPanel extends Panel {
|
||||
jPanel5.setLayout(jPanel5Layout);
|
||||
jPanel5Layout.setHorizontalGroup(
|
||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(devicesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(buttonExpert)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addContainerGap())
|
||||
);
|
||||
jPanel5Layout.setVerticalGroup(
|
||||
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addContainerGap()
|
||||
.addComponent(buttonExpert)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(jPanel5Layout.createSequentialGroup()
|
||||
.addComponent(devicesPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||
.addGap(9, 9, 9))
|
||||
);
|
||||
|
||||
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("LN2 Control"));
|
||||
@@ -633,7 +685,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel14)
|
||||
.addComponent(deviceValuePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(23, Short.MAX_VALUE))
|
||||
.addContainerGap(31, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Lid Motion Control"));
|
||||
@@ -699,7 +751,7 @@ public class MainPanel extends Panel {
|
||||
.addComponent(jLabel7))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(buttonInitHexiposi)
|
||||
.addContainerGap(18, Short.MAX_VALUE))
|
||||
.addContainerGap(26, Short.MAX_VALUE))
|
||||
.addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
@@ -747,7 +799,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel10))
|
||||
.addContainerGap(26, Short.MAX_VALUE))
|
||||
.addContainerGap(34, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder("Robot Gripper"));
|
||||
@@ -803,7 +855,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(jLabel13)
|
||||
.addComponent(textSample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addContainerGap(26, Short.MAX_VALUE))
|
||||
.addContainerGap(34, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("RT Humidifier Box"));
|
||||
@@ -840,7 +892,7 @@ public class MainPanel extends Panel {
|
||||
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(led15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel18))
|
||||
.addContainerGap(52, Short.MAX_VALUE))
|
||||
.addContainerGap(60, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
panelDewar.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Dewar Light", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));
|
||||
@@ -861,30 +913,47 @@ public class MainPanel extends Panel {
|
||||
|
||||
jLabell21.setText("Psys Safety");
|
||||
|
||||
buttonReleaseLocal.setText("Release");
|
||||
buttonReleaseLocal.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonReleaseLocalActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
buttonReleasePsys.setText("Release");
|
||||
buttonReleasePsys.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
buttonReleasePsysActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
|
||||
jPanel13.setLayout(jPanel13Layout);
|
||||
jPanel13Layout.setHorizontalGroup(
|
||||
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(ledAirPressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledN2Pressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledLocalSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(ledPsysSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledAirPressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel24))
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabell21)
|
||||
.addComponent(jLabel26))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(buttonReleaseLocal)
|
||||
.addComponent(buttonReleasePsys))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledN2Pressure, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel25))
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledLocalSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabel26))
|
||||
.addGroup(jPanel13Layout.createSequentialGroup()
|
||||
.addComponent(ledPsysSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(jLabell21)))
|
||||
.addContainerGap(38, Short.MAX_VALUE))
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(jLabel25)
|
||||
.addComponent(jLabel24))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
|
||||
);
|
||||
jPanel13Layout.setVerticalGroup(
|
||||
jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
@@ -900,11 +969,13 @@ public class MainPanel extends Panel {
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(ledLocalSafety, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(jLabel26))
|
||||
.addComponent(jLabel26)
|
||||
.addComponent(buttonReleaseLocal))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addGroup(jPanel13Layout.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)))
|
||||
.addComponent(jLabell21)
|
||||
.addComponent(buttonReleasePsys)))
|
||||
);
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
@@ -926,7 +997,7 @@ public class MainPanel extends Panel {
|
||||
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
@@ -966,8 +1037,7 @@ public class MainPanel extends Panel {
|
||||
|
||||
private void buttonCameraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCameraActionPerformed
|
||||
try{
|
||||
Source source = buttonCamera.isSelected() ? (Source)this.getDevice("img"): null;
|
||||
basePlatePanel.setCameraView(source);
|
||||
updateCameraView();
|
||||
} catch (Exception ex) {
|
||||
showException(ex);
|
||||
}
|
||||
@@ -1031,6 +1101,14 @@ public class MainPanel extends Panel {
|
||||
}
|
||||
}//GEN-LAST:event_buttonClearDetActionPerformed
|
||||
|
||||
private void buttonReleaseLocalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonReleaseLocalActionPerformed
|
||||
execute("release_local()", true);
|
||||
}//GEN-LAST:event_buttonReleaseLocalActionPerformed
|
||||
|
||||
private void buttonReleasePsysActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonReleasePsysActionPerformed
|
||||
execute("release_psys()", true);
|
||||
}//GEN-LAST:event_buttonReleasePsysActionPerformed
|
||||
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private ch.psi.mxsc.BasePlatePanel basePlatePanel;
|
||||
@@ -1039,7 +1117,10 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JButton buttonExpert;
|
||||
private javax.swing.JButton buttonInitHexiposi;
|
||||
private javax.swing.JButton buttonPuckDet;
|
||||
private javax.swing.JButton buttonReleaseLocal;
|
||||
private javax.swing.JButton buttonReleasePsys;
|
||||
private ch.psi.pshell.swing.DeviceValuePanel deviceValuePanel1;
|
||||
private ch.psi.mxsc.DevicesPanel devicesPanel;
|
||||
private ch.psi.mxsc.HexiposiPanel hexiposiPanel;
|
||||
private javax.swing.JLabel jLabel1;
|
||||
private javax.swing.JLabel jLabel10;
|
||||
@@ -1056,6 +1137,7 @@ public class MainPanel extends Panel {
|
||||
private javax.swing.JLabel jLabel20;
|
||||
private javax.swing.JLabel jLabel21;
|
||||
private javax.swing.JLabel jLabel22;
|
||||
private javax.swing.JLabel jLabel23;
|
||||
private javax.swing.JLabel jLabel24;
|
||||
private javax.swing.JLabel jLabel25;
|
||||
private javax.swing.JLabel jLabel26;
|
||||
@@ -1095,6 +1177,7 @@ public class MainPanel extends Panel {
|
||||
private ch.psi.pshell.swing.Led ledLidControlActive2;
|
||||
private ch.psi.pshell.swing.Led ledLidControlActive3;
|
||||
private ch.psi.pshell.swing.Led ledLidControlActive4;
|
||||
private ch.psi.pshell.swing.Led ledLidControlActive5;
|
||||
private ch.psi.pshell.swing.Led ledLidInitialized;
|
||||
private ch.psi.pshell.swing.Led ledLocalSafety;
|
||||
private ch.psi.pshell.swing.Led ledN2Pressure;
|
||||
|
||||
Reference in New Issue
Block a user