915 lines
48 KiB
Java
915 lines
48 KiB
Java
/*
|
|
* Copyright (c) 2014-2017 Paul Scherrer Institute. All rights reserved.
|
|
*/
|
|
|
|
import ch.psi.pshell.device.Device;
|
|
import ch.psi.pshell.device.DeviceAdapter;
|
|
import ch.psi.pshell.device.GenericDevice;
|
|
import ch.psi.pshell.ui.Panel;
|
|
import ch.psi.utils.State;
|
|
import ch.psi.utils.swing.SwingUtils;
|
|
import java.awt.Component;
|
|
import javax.swing.JComponent;
|
|
import javax.swing.JSpinner;
|
|
import javax.swing.JTextField;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public class Commands extends Panel {
|
|
|
|
public Commands() {
|
|
initComponents();
|
|
((JSpinner.DefaultEditor)spinnerSegment.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER);
|
|
((JSpinner.DefaultEditor)spinnerPuck.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER);
|
|
((JSpinner.DefaultEditor)spinnerSample.getEditor()).getTextField().setHorizontalAlignment(JTextField.CENTER);
|
|
}
|
|
|
|
//Overridable callbacks
|
|
@Override
|
|
public void onInitialize(int runCount) {
|
|
GenericDevice basePlate = getDevice("BasePlate");
|
|
if (basePlate != null){
|
|
basePlate.addListener(new DeviceAdapter() {
|
|
@Override
|
|
public void onValueChanged(Device device, Object value, Object former) {
|
|
if (value!=null){
|
|
String segment = ((Object[])value)[0].toString();
|
|
spinnerSegment.setValue(segment);
|
|
Integer puck = (Integer) ((Object[])value)[1];
|
|
spinnerPuck.setValue(Integer.valueOf(puck));
|
|
Integer sample = (Integer) ((Object[])value)[2];
|
|
if (sample!=null){
|
|
spinnerSample.setValue(Integer.valueOf(sample));
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void onStateChange(State state, State former) {
|
|
boolean enabled = (state == State.Ready);
|
|
for (Component c: SwingUtils.getComponentsByType(this, JComponent.class)){
|
|
c.setEnabled(enabled);
|
|
}
|
|
spinnerSegment.setEnabled(enabled && !checkAuxiliary.isSelected());
|
|
spinnerPuck.setEnabled(enabled && !checkAuxiliary.isSelected());
|
|
buttonScanPuck.setEnabled(enabled && !checkAuxiliary.isSelected());
|
|
}
|
|
|
|
@Override
|
|
public void onExecutedFile(String fileName, Object result) {
|
|
}
|
|
|
|
//Callback to perform update - in event thread
|
|
@Override
|
|
protected void doUpdate() {
|
|
}
|
|
|
|
@Override
|
|
public boolean isActive() {
|
|
return true;
|
|
}
|
|
|
|
|
|
void execute(String statement){
|
|
execute(statement, false);
|
|
}
|
|
|
|
void execute(String statement, boolean background){
|
|
execute(statement, background, false);
|
|
}
|
|
|
|
void execute(String statement, boolean background, boolean showReturn){
|
|
try {
|
|
evalAsync(statement, background).handle((ret, ex) -> {
|
|
if (ex != null){
|
|
showException((Exception)ex);
|
|
} else if (showReturn){
|
|
SwingUtils.showMessage(getTopLevel(), "Return", String.valueOf(ret));
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
private void initComponents() {
|
|
|
|
jTabbedPane1 = new javax.swing.JTabbedPane();
|
|
tabCommands = new javax.swing.JPanel();
|
|
pnDry = new javax.swing.JPanel();
|
|
jLabel6 = new javax.swing.JLabel();
|
|
spinnerDryTime = new ch.psi.utils.swing.HorizontalSpinner();
|
|
buttonDry = new javax.swing.JButton();
|
|
spinnerDrySpeed = new ch.psi.utils.swing.HorizontalSpinner();
|
|
jLabel7 = new javax.swing.JLabel();
|
|
ckeckParkOnDry = new javax.swing.JCheckBox();
|
|
pnTransfer = new javax.swing.JPanel();
|
|
buttonMount = new javax.swing.JButton();
|
|
jPanel5 = new javax.swing.JPanel();
|
|
jLabel4 = new javax.swing.JLabel();
|
|
checkForce = new javax.swing.JCheckBox();
|
|
spinnerSample = new ch.psi.utils.swing.HorizontalSpinner();
|
|
spinnerPuck = new ch.psi.utils.swing.HorizontalSpinner();
|
|
jLabel1 = new javax.swing.JLabel();
|
|
jLabel2 = new javax.swing.JLabel();
|
|
spinnerSegment = new ch.psi.utils.swing.HorizontalSpinner();
|
|
jLabel3 = new javax.swing.JLabel();
|
|
jLabel5 = new javax.swing.JLabel();
|
|
checkDatamatrix = new javax.swing.JCheckBox();
|
|
buttonUnmount = new javax.swing.JButton();
|
|
buttonScanPin = new javax.swing.JButton();
|
|
buttonScanPuck = new javax.swing.JButton();
|
|
checkAuxiliary = new javax.swing.JCheckBox();
|
|
jPanel1 = new javax.swing.JPanel();
|
|
buttonGripperScan = new javax.swing.JButton();
|
|
buttonTrash = new javax.swing.JButton();
|
|
tabAdvanced = new javax.swing.JPanel();
|
|
pnLowLevel = new javax.swing.JPanel();
|
|
buttonMovePark = new javax.swing.JButton();
|
|
buttonMoveCold = new javax.swing.JButton();
|
|
buttonMoveGonio = new javax.swing.JButton();
|
|
buttonMoveHeater = new javax.swing.JButton();
|
|
buttonGetGonio = new javax.swing.JButton();
|
|
buttonPutGonio = new javax.swing.JButton();
|
|
buttonMoveDewar = new javax.swing.JButton();
|
|
buttonMoveHome = new javax.swing.JButton();
|
|
buttonMoveScanner = new javax.swing.JButton();
|
|
buttonGetDewar = new javax.swing.JButton();
|
|
buttonPutDewar = new javax.swing.JButton();
|
|
buttonMoveAux = new javax.swing.JButton();
|
|
buttonGetAux = new javax.swing.JButton();
|
|
buttonPutAux = new javax.swing.JButton();
|
|
pnDatabase = new javax.swing.JPanel();
|
|
buttonClearSampleDb = new javax.swing.JButton();
|
|
buttonResetPuckIds = new javax.swing.JButton();
|
|
pnMotion = new javax.swing.JPanel();
|
|
buttonRecover = new javax.swing.JButton();
|
|
buttonEnableAll = new javax.swing.JButton();
|
|
|
|
pnDry.setBorder(javax.swing.BorderFactory.createTitledBorder("Drying"));
|
|
|
|
jLabel6.setText("Heat time(s):");
|
|
|
|
spinnerDryTime.setModel(new javax.swing.SpinnerNumberModel(30.0d, 1.0d, 30.0d, 1.0d));
|
|
|
|
buttonDry.setText("Dry");
|
|
buttonDry.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonDryActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
spinnerDrySpeed.setModel(new javax.swing.SpinnerNumberModel(0.5d, 0.1d, 10.0d, 1.0d));
|
|
|
|
jLabel7.setText("Speed(%):");
|
|
|
|
ckeckParkOnDry.setText("Park on finish");
|
|
|
|
javax.swing.GroupLayout pnDryLayout = new javax.swing.GroupLayout(pnDry);
|
|
pnDry.setLayout(pnDryLayout);
|
|
pnDryLayout.setHorizontalGroup(
|
|
pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnDryLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(buttonDry, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(ckeckParkOnDry))
|
|
.addGap(18, 25, Short.MAX_VALUE)
|
|
.addGroup(pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
|
.addComponent(jLabel6)
|
|
.addComponent(jLabel7))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(spinnerDrySpeed, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(spinnerDryTime, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnDryLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonDry, spinnerDrySpeed, spinnerDryTime});
|
|
|
|
pnDryLayout.setVerticalGroup(
|
|
pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnDryLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnDryLayout.createSequentialGroup()
|
|
.addGroup(pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(buttonDry)
|
|
.addComponent(spinnerDryTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnDryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(spinnerDrySpeed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel7)
|
|
.addComponent(ckeckParkOnDry)))
|
|
.addComponent(jLabel6))
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnTransfer.setBorder(javax.swing.BorderFactory.createTitledBorder("Sample Transfer"));
|
|
|
|
buttonMount.setText("Mount");
|
|
buttonMount.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMountActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel4.setText("Force:");
|
|
|
|
checkForce.setSelected(true);
|
|
checkForce.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
|
|
|
|
spinnerSample.setModel(new javax.swing.SpinnerNumberModel(1, 1, 16, 1));
|
|
|
|
spinnerPuck.setModel(new javax.swing.SpinnerNumberModel(1, 1, 5, 1));
|
|
|
|
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel1.setText("Segment:");
|
|
|
|
jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel2.setText("Puck:");
|
|
|
|
spinnerSegment.setModel(new javax.swing.SpinnerListModel(new String[] {"A", "B", "C", "D", "E", "F"}));
|
|
|
|
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel3.setText("Sample:");
|
|
|
|
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel5.setText("Read DM:");
|
|
|
|
checkDatamatrix.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
|
|
|
|
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
|
jPanel5.setLayout(jPanel5Layout);
|
|
jPanel5Layout.setHorizontalGroup(
|
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addGap(0, 0, 0)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jLabel3)
|
|
.addComponent(jLabel2)
|
|
.addComponent(jLabel1)
|
|
.addComponent(jLabel4)
|
|
.addComponent(jLabel5))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(spinnerPuck, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(checkForce)
|
|
.addComponent(checkDatamatrix)
|
|
.addComponent(spinnerSample, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(spinnerSegment, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addGap(0, 0, 0))
|
|
);
|
|
|
|
jPanel5Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3, jLabel4, jLabel5});
|
|
|
|
jPanel5Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerPuck, spinnerSample, spinnerSegment});
|
|
|
|
jPanel5Layout.setVerticalGroup(
|
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addGap(0, 0, 0)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
|
.addComponent(jLabel1)
|
|
.addComponent(spinnerSegment, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
|
.addComponent(jLabel2)
|
|
.addComponent(spinnerPuck, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
|
.addComponent(jLabel3)
|
|
.addComponent(spinnerSample, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
|
.addComponent(jLabel4)
|
|
.addComponent(checkForce))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
|
|
.addComponent(jLabel5)
|
|
.addComponent(checkDatamatrix)))
|
|
);
|
|
|
|
buttonUnmount.setText("Unmount");
|
|
buttonUnmount.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonUnmountActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonScanPin.setText("Scan Pin");
|
|
buttonScanPin.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonScanPinActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonScanPuck.setText("Scan Puck");
|
|
buttonScanPuck.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonScanPuckActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
checkAuxiliary.setText("Auxiliary");
|
|
checkAuxiliary.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
checkAuxiliaryActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout pnTransferLayout = new javax.swing.GroupLayout(pnTransfer);
|
|
pnTransfer.setLayout(pnTransferLayout);
|
|
pnTransferLayout.setHorizontalGroup(
|
|
pnTransferLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnTransferLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnTransferLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(buttonMount, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonUnmount, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonScanPin, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonScanPuck, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(checkAuxiliary))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnTransferLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonMount, buttonScanPin, buttonUnmount});
|
|
|
|
pnTransferLayout.setVerticalGroup(
|
|
pnTransferLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnTransferLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnTransferLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGroup(pnTransferLayout.createSequentialGroup()
|
|
.addComponent(buttonMount)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonUnmount)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonScanPin)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonScanPuck)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addComponent(checkAuxiliary)))
|
|
.addContainerGap())
|
|
);
|
|
|
|
jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Gripper"));
|
|
|
|
buttonGripperScan.setText("Scan");
|
|
buttonGripperScan.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonGripperScanActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonTrash.setText("Trash");
|
|
buttonTrash.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonTrashActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
|
jPanel1.setLayout(jPanel1Layout);
|
|
jPanel1Layout.setHorizontalGroup(
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(buttonGripperScan, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(buttonTrash, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addContainerGap())
|
|
);
|
|
jPanel1Layout.setVerticalGroup(
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonGripperScan)
|
|
.addComponent(buttonTrash))
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
);
|
|
|
|
javax.swing.GroupLayout tabCommandsLayout = new javax.swing.GroupLayout(tabCommands);
|
|
tabCommands.setLayout(tabCommandsLayout);
|
|
tabCommandsLayout.setHorizontalGroup(
|
|
tabCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(tabCommandsLayout.createSequentialGroup()
|
|
.addGap(0, 0, 0)
|
|
.addGroup(tabCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(pnDry, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(pnTransfer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
|
);
|
|
tabCommandsLayout.setVerticalGroup(
|
|
tabCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(tabCommandsLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(pnDry, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGap(0, 0, 0)
|
|
.addComponent(pnTransfer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addContainerGap())
|
|
);
|
|
|
|
jTabbedPane1.addTab("Commands", tabCommands);
|
|
|
|
pnLowLevel.setBorder(javax.swing.BorderFactory.createTitledBorder("Low-level Motion Commands"));
|
|
|
|
buttonMovePark.setText("Move Park");
|
|
buttonMovePark.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveParkActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveCold.setText("Move Cold");
|
|
buttonMoveCold.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveColdActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveGonio.setText("Move Gonio");
|
|
buttonMoveGonio.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveGonioActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveHeater.setText("Move Heater");
|
|
buttonMoveHeater.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveHeaterActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonGetGonio.setText("Get Gonio");
|
|
buttonGetGonio.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonGetGonioActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonPutGonio.setText("Put Gonio");
|
|
buttonPutGonio.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonPutGonioActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveDewar.setText("Move Dewar");
|
|
buttonMoveDewar.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveDewarActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveHome.setText("Move Home");
|
|
buttonMoveHome.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveHomeActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveScanner.setText("Move Scanner");
|
|
buttonMoveScanner.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveScannerActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonGetDewar.setText("Get Dewar");
|
|
buttonGetDewar.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonGetDewarActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonPutDewar.setText("Put Dewar");
|
|
buttonPutDewar.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonPutDewarActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonMoveAux.setText("Move Aux");
|
|
buttonMoveAux.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonMoveAuxActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonGetAux.setText("Get Aux");
|
|
buttonGetAux.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonGetAuxActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonPutAux.setText("Put Aux");
|
|
buttonPutAux.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonPutAuxActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout pnLowLevelLayout = new javax.swing.GroupLayout(pnLowLevel);
|
|
pnLowLevel.setLayout(pnLowLevelLayout);
|
|
pnLowLevelLayout.setHorizontalGroup(
|
|
pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnLowLevelLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(buttonMovePark, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonMoveAux)
|
|
.addComponent(buttonMoveCold, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonMoveHeater)
|
|
.addComponent(buttonGetGonio)
|
|
.addComponent(buttonGetDewar, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonGetAux, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(buttonPutDewar, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonPutGonio, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonMoveGonio, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonMoveHome, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonMoveDewar, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonMoveScanner)
|
|
.addComponent(buttonPutAux, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnLowLevelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonGetAux, buttonGetDewar, buttonGetGonio, buttonMoveAux, buttonMoveCold, buttonMoveDewar, buttonMoveGonio, buttonMoveHeater, buttonMoveHome, buttonMovePark, buttonMoveScanner, buttonPutAux, buttonPutDewar, buttonPutGonio});
|
|
|
|
pnLowLevelLayout.setVerticalGroup(
|
|
pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnLowLevelLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonGetDewar)
|
|
.addComponent(buttonPutDewar))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonGetAux)
|
|
.addComponent(buttonPutAux))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonGetGonio)
|
|
.addComponent(buttonPutGonio))
|
|
.addGap(18, 18, 18)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonMoveGonio)
|
|
.addComponent(buttonMoveAux))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonMovePark)
|
|
.addComponent(buttonMoveHome))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonMoveDewar)
|
|
.addComponent(buttonMoveCold))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(pnLowLevelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonMoveHeater)
|
|
.addComponent(buttonMoveScanner))
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnDatabase.setBorder(javax.swing.BorderFactory.createTitledBorder("Database"));
|
|
|
|
buttonClearSampleDb.setText("Clear Sample Db");
|
|
buttonClearSampleDb.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonClearSampleDbActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonResetPuckIds.setText("Reset Puck IDs");
|
|
buttonResetPuckIds.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonResetPuckIdsActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout pnDatabaseLayout = new javax.swing.GroupLayout(pnDatabase);
|
|
pnDatabase.setLayout(pnDatabaseLayout);
|
|
pnDatabaseLayout.setHorizontalGroup(
|
|
pnDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnDatabaseLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(buttonClearSampleDb)
|
|
.addGap(18, 18, Short.MAX_VALUE)
|
|
.addComponent(buttonResetPuckIds)
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnDatabaseLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonClearSampleDb, buttonResetPuckIds});
|
|
|
|
pnDatabaseLayout.setVerticalGroup(
|
|
pnDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnDatabaseLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnDatabaseLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonClearSampleDb)
|
|
.addComponent(buttonResetPuckIds))
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnMotion.setBorder(javax.swing.BorderFactory.createTitledBorder("Motion"));
|
|
|
|
buttonRecover.setText("Dewar Recovery");
|
|
buttonRecover.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonRecoverActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonEnableAll.setText("Enable Motion");
|
|
buttonEnableAll.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonEnableAllActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout pnMotionLayout = new javax.swing.GroupLayout(pnMotion);
|
|
pnMotion.setLayout(pnMotionLayout);
|
|
pnMotionLayout.setHorizontalGroup(
|
|
pnMotionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnMotionLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(buttonRecover)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(buttonEnableAll)
|
|
.addContainerGap())
|
|
);
|
|
|
|
pnMotionLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonEnableAll, buttonRecover});
|
|
|
|
pnMotionLayout.setVerticalGroup(
|
|
pnMotionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(pnMotionLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(pnMotionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonRecover)
|
|
.addComponent(buttonEnableAll))
|
|
.addContainerGap())
|
|
);
|
|
|
|
javax.swing.GroupLayout tabAdvancedLayout = new javax.swing.GroupLayout(tabAdvanced);
|
|
tabAdvanced.setLayout(tabAdvancedLayout);
|
|
tabAdvancedLayout.setHorizontalGroup(
|
|
tabAdvancedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(tabAdvancedLayout.createSequentialGroup()
|
|
.addGap(0, 0, 0)
|
|
.addGroup(tabAdvancedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(pnMotion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(pnDatabase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(pnLowLevel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
.addGap(0, 0, 0))
|
|
);
|
|
tabAdvancedLayout.setVerticalGroup(
|
|
tabAdvancedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(tabAdvancedLayout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(pnLowLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGap(0, 0, 0)
|
|
.addComponent(pnDatabase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGap(0, 0, 0)
|
|
.addComponent(pnMotion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addContainerGap())
|
|
);
|
|
|
|
jTabbedPane1.addTab("Advanced", tabAdvanced);
|
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
|
this.setLayout(layout);
|
|
layout.setHorizontalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING)
|
|
);
|
|
layout.setVerticalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
);
|
|
}// </editor-fold>//GEN-END:initComponents
|
|
|
|
private void buttonEnableAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonEnableAllActionPerformed
|
|
execute("enable_motion()", true);
|
|
}//GEN-LAST:event_buttonEnableAllActionPerformed
|
|
|
|
private void buttonMountActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMountActionPerformed
|
|
String segment = checkAuxiliary.isSelected() ? "X" : (String) spinnerSegment.getValue();
|
|
int puck = checkAuxiliary.isSelected() ? 1 :(Integer) spinnerPuck.getValue();
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
String readDatamatrix = checkDatamatrix.isSelected() ? "True" : "False";
|
|
execute("mount('" + segment + "'," + puck + "," + sample + ", force=" + force + ", read_dm=" + readDatamatrix + ")");
|
|
|
|
}//GEN-LAST:event_buttonMountActionPerformed
|
|
|
|
private void buttonMoveAuxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveAuxActionPerformed
|
|
execute("move_aux()");
|
|
}//GEN-LAST:event_buttonMoveAuxActionPerformed
|
|
|
|
private void buttonUnmountActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonUnmountActionPerformed
|
|
String segment = checkAuxiliary.isSelected() ? "X" : (String) spinnerSegment.getValue();
|
|
int puck = checkAuxiliary.isSelected() ? 1 :(Integer) spinnerPuck.getValue();
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("unmount('" + segment + "'," + puck + "," + sample + ", force=" + force + ")");
|
|
}//GEN-LAST:event_buttonUnmountActionPerformed
|
|
|
|
private void buttonGetDewarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGetDewarActionPerformed
|
|
String segment = (String) spinnerSegment.getValue();
|
|
int puck = (Integer) spinnerPuck.getValue();
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("get_dewar('" + segment + "'," + puck + "," + sample + ", force=" + force + ")");
|
|
}//GEN-LAST:event_buttonGetDewarActionPerformed
|
|
|
|
private void buttonPutDewarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPutDewarActionPerformed
|
|
String segment = (String) spinnerSegment.getValue();
|
|
int puck = (Integer) spinnerPuck.getValue();
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("put_dewar('" + segment + "'," + puck + "," + sample + ", force=" + force + ")");
|
|
}//GEN-LAST:event_buttonPutDewarActionPerformed
|
|
|
|
private void buttonGetGonioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGetGonioActionPerformed
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("get_gonio(force=" + force + ")");
|
|
}//GEN-LAST:event_buttonGetGonioActionPerformed
|
|
|
|
private void buttonPutGonioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPutGonioActionPerformed
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("put_gonio(force=" + force + ")");
|
|
}//GEN-LAST:event_buttonPutGonioActionPerformed
|
|
|
|
private void buttonMoveParkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveParkActionPerformed
|
|
execute("move_park()");
|
|
}//GEN-LAST:event_buttonMoveParkActionPerformed
|
|
|
|
private void buttonMoveHomeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveHomeActionPerformed
|
|
execute("move_home()");
|
|
}//GEN-LAST:event_buttonMoveHomeActionPerformed
|
|
|
|
private void buttonMoveGonioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveGonioActionPerformed
|
|
execute("move_gonio()");
|
|
}//GEN-LAST:event_buttonMoveGonioActionPerformed
|
|
|
|
private void buttonMoveDewarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveDewarActionPerformed
|
|
execute("move_dewar()");
|
|
}//GEN-LAST:event_buttonMoveDewarActionPerformed
|
|
|
|
private void buttonMoveScannerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveScannerActionPerformed
|
|
execute("move_scanner()");
|
|
}//GEN-LAST:event_buttonMoveScannerActionPerformed
|
|
|
|
private void buttonMoveHeaterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveHeaterActionPerformed
|
|
execute("move_heater()");
|
|
}//GEN-LAST:event_buttonMoveHeaterActionPerformed
|
|
|
|
private void buttonDryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonDryActionPerformed
|
|
double dryTime = (Double) spinnerDryTime.getValue();
|
|
double streamTime = (Double) spinnerDrySpeed.getValue();
|
|
boolean park = ckeckParkOnDry.isSelected();
|
|
|
|
execute("dry(" + dryTime + ", " + streamTime + (park ? ", wait_cold=-1": "") + ")");
|
|
}//GEN-LAST:event_buttonDryActionPerformed
|
|
|
|
private void buttonRecoverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRecoverActionPerformed
|
|
execute("robot_recover()");
|
|
}//GEN-LAST:event_buttonRecoverActionPerformed
|
|
|
|
private void buttonMoveColdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonMoveColdActionPerformed
|
|
execute("move_cold()");
|
|
}//GEN-LAST:event_buttonMoveColdActionPerformed
|
|
|
|
private void buttonClearSampleDbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonClearSampleDbActionPerformed
|
|
execute("clear_samples_info()", true);
|
|
}//GEN-LAST:event_buttonClearSampleDbActionPerformed
|
|
|
|
private void buttonResetPuckIdsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonResetPuckIdsActionPerformed
|
|
execute("reset_puck_datamatrix()", true);
|
|
}//GEN-LAST:event_buttonResetPuckIdsActionPerformed
|
|
|
|
private void buttonScanPinActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScanPinActionPerformed
|
|
String segment = checkAuxiliary.isSelected() ? "X" : (String) spinnerSegment.getValue();
|
|
int puck = checkAuxiliary.isSelected() ? 1 :(Integer) spinnerPuck.getValue();
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("scan_pin('" + segment + "'," + puck + "," + sample + ", force=" + force + ")", false, true);
|
|
}//GEN-LAST:event_buttonScanPinActionPerformed
|
|
|
|
private void buttonScanPuckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScanPuckActionPerformed
|
|
String segment = checkAuxiliary.isSelected() ? "X" : (String) spinnerSegment.getValue();
|
|
int puck = checkAuxiliary.isSelected() ? 1 :(Integer) spinnerPuck.getValue();
|
|
String force = checkForce.isSelected() ? "True" : "False";
|
|
execute("scan_puck('" + segment + "'," + puck + ", force=" + force + ")", false, true);
|
|
}//GEN-LAST:event_buttonScanPuckActionPerformed
|
|
|
|
private void buttonGetAuxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGetAuxActionPerformed
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
execute("get_aux('" + sample + ")");
|
|
}//GEN-LAST:event_buttonGetAuxActionPerformed
|
|
|
|
private void buttonPutAuxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPutAuxActionPerformed
|
|
int sample = (Integer) spinnerSample.getValue();
|
|
execute("put_aux('" + sample + ")");
|
|
}//GEN-LAST:event_buttonPutAuxActionPerformed
|
|
|
|
private void checkAuxiliaryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkAuxiliaryActionPerformed
|
|
onStateChange(getState(), null);
|
|
}//GEN-LAST:event_checkAuxiliaryActionPerformed
|
|
|
|
private void buttonGripperScanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonGripperScanActionPerformed
|
|
execute("scan_gripper()");
|
|
}//GEN-LAST:event_buttonGripperScanActionPerformed
|
|
|
|
private void buttonTrashActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonTrashActionPerformed
|
|
execute("trash()");
|
|
}//GEN-LAST:event_buttonTrashActionPerformed
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
private javax.swing.JButton buttonClearSampleDb;
|
|
private javax.swing.JButton buttonDry;
|
|
private javax.swing.JButton buttonEnableAll;
|
|
private javax.swing.JButton buttonGetAux;
|
|
private javax.swing.JButton buttonGetDewar;
|
|
private javax.swing.JButton buttonGetGonio;
|
|
private javax.swing.JButton buttonGripperScan;
|
|
private javax.swing.JButton buttonMount;
|
|
private javax.swing.JButton buttonMoveAux;
|
|
private javax.swing.JButton buttonMoveCold;
|
|
private javax.swing.JButton buttonMoveDewar;
|
|
private javax.swing.JButton buttonMoveGonio;
|
|
private javax.swing.JButton buttonMoveHeater;
|
|
private javax.swing.JButton buttonMoveHome;
|
|
private javax.swing.JButton buttonMovePark;
|
|
private javax.swing.JButton buttonMoveScanner;
|
|
private javax.swing.JButton buttonPutAux;
|
|
private javax.swing.JButton buttonPutDewar;
|
|
private javax.swing.JButton buttonPutGonio;
|
|
private javax.swing.JButton buttonRecover;
|
|
private javax.swing.JButton buttonResetPuckIds;
|
|
private javax.swing.JButton buttonScanPin;
|
|
private javax.swing.JButton buttonScanPuck;
|
|
private javax.swing.JButton buttonTrash;
|
|
private javax.swing.JButton buttonUnmount;
|
|
private javax.swing.JCheckBox checkAuxiliary;
|
|
private javax.swing.JCheckBox checkDatamatrix;
|
|
private javax.swing.JCheckBox checkForce;
|
|
private javax.swing.JCheckBox ckeckParkOnDry;
|
|
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.JLabel jLabel7;
|
|
private javax.swing.JPanel jPanel1;
|
|
private javax.swing.JPanel jPanel5;
|
|
private javax.swing.JTabbedPane jTabbedPane1;
|
|
private javax.swing.JPanel pnDatabase;
|
|
private javax.swing.JPanel pnDry;
|
|
private javax.swing.JPanel pnLowLevel;
|
|
private javax.swing.JPanel pnMotion;
|
|
private javax.swing.JPanel pnTransfer;
|
|
private javax.swing.JSpinner spinnerDrySpeed;
|
|
private javax.swing.JSpinner spinnerDryTime;
|
|
private javax.swing.JSpinner spinnerPuck;
|
|
private javax.swing.JSpinner spinnerSample;
|
|
private javax.swing.JSpinner spinnerSegment;
|
|
private javax.swing.JPanel tabAdvanced;
|
|
private javax.swing.JPanel tabCommands;
|
|
// End of variables declaration//GEN-END:variables
|
|
}
|