1541 lines
75 KiB
Java
1541 lines
75 KiB
Java
|
|
import ch.psi.pshell.core.JsonSerializer;
|
|
import ch.psi.pshell.device.Motor;
|
|
import ch.psi.pshell.device.Positioner;
|
|
import ch.psi.pshell.device.ReadonlyProcessVariable;
|
|
import ch.psi.pshell.ui.PanelProcessor;
|
|
import ch.psi.pshell.ui.QueueProcessor;
|
|
import ch.psi.utils.Arr;
|
|
import ch.psi.utils.Convert;
|
|
import ch.psi.utils.IO;
|
|
import ch.psi.utils.Reflection;
|
|
import ch.psi.utils.State;
|
|
import ch.psi.utils.swing.SwingUtils;
|
|
import java.awt.datatransfer.DataFlavor;
|
|
import java.awt.datatransfer.StringSelection;
|
|
import java.awt.datatransfer.Transferable;
|
|
import java.awt.dnd.DnDConstants;
|
|
import java.io.File;
|
|
import java.io.IOException;
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Path;
|
|
import java.nio.file.Paths;
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.logging.Level;
|
|
import java.util.logging.Logger;
|
|
import javax.swing.DropMode;
|
|
import javax.swing.JComboBox;
|
|
import javax.swing.JComponent;
|
|
import javax.swing.JFileChooser;
|
|
import javax.swing.JTable;
|
|
import javax.swing.JTextArea;
|
|
import javax.swing.JTextField;
|
|
import javax.swing.TransferHandler;
|
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
|
import javax.swing.table.DefaultTableModel;
|
|
|
|
/**
|
|
*
|
|
*/
|
|
public class SIStem extends PanelProcessor {
|
|
|
|
File currentFile;
|
|
final DefaultTableModel modelInactive;
|
|
final DefaultTableModel modelFixed;
|
|
final DefaultTableModel modelScanned;
|
|
|
|
public static final String FILE_EXTENSION = "json";
|
|
final JTextField[] scientaFloatFields;
|
|
final JTextField[] scientaIntFields;
|
|
final JComboBox[] scientaCombos;
|
|
final JTextField[] scientaRangeFields;
|
|
|
|
public SIStem() {
|
|
initComponents();
|
|
modelInactive = (DefaultTableModel) tableInactive.getModel();
|
|
modelFixed = (DefaultTableModel) tableFixed.getModel();
|
|
modelScanned = (DefaultTableModel) tableScanned.getModel();
|
|
|
|
abstract class PositinerTransferHandler extends TransferHandler {
|
|
|
|
@Override
|
|
public int getSourceActions(JComponent c) {
|
|
return DnDConstants.ACTION_COPY_OR_MOVE;
|
|
}
|
|
|
|
@Override
|
|
public Transferable createTransferable(JComponent comp) {
|
|
try {
|
|
JTable table = (JTable) comp;
|
|
return new StringSelection((String) table.getModel().getValueAt(table.getSelectedRow(), 0));
|
|
} catch (Exception ex) {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public boolean canImport(TransferHandler.TransferSupport support) {
|
|
return support.isDataFlavorSupported(DataFlavor.stringFlavor);
|
|
}
|
|
|
|
@Override
|
|
public boolean importData(TransferHandler.TransferSupport support) {
|
|
if (support.isDrop() && canImport(support)) {
|
|
try {
|
|
JTable.DropLocation dl = (JTable.DropLocation) support.getDropLocation();
|
|
String name = (String) support.getTransferable().getTransferData(DataFlavor.stringFlavor);
|
|
Positioner pos = getContext().getDevicePool().getByName(name, Positioner.class);
|
|
DefaultTableModel model = ((DefaultTableModel) ((JTable) support.getComponent()).getModel());
|
|
addPositioner(pos, model, dl.getRow(), getRowData(pos));
|
|
} catch (Exception ex) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
abstract Object[] getRowData(Positioner pos);
|
|
};
|
|
|
|
tableInactive.setDragEnabled(true);
|
|
tableInactive.setDropMode(DropMode.INSERT_ROWS);
|
|
tableInactive.setFillsViewportHeight(true);
|
|
tableInactive.setTransferHandler(new PositinerTransferHandler() {
|
|
@Override
|
|
Object[] getRowData(Positioner pos) {
|
|
return new Object[]{pos.getName()};
|
|
}
|
|
});
|
|
|
|
tableFixed.setDragEnabled(true);
|
|
tableFixed.setDropMode(DropMode.INSERT_ROWS);
|
|
tableFixed.setFillsViewportHeight(true);
|
|
tableFixed.setTransferHandler(new PositinerTransferHandler() {
|
|
@Override
|
|
Object[] getRowData(Positioner pos) {
|
|
return new Object[]{pos.getName(), Double.NaN, pos.getUnit()};
|
|
}
|
|
});
|
|
|
|
tableScanned.setDragEnabled(true);
|
|
tableScanned.setDropMode(DropMode.INSERT_ROWS);
|
|
tableScanned.setFillsViewportHeight(true);
|
|
tableScanned.setTransferHandler(new PositinerTransferHandler() {
|
|
@Override
|
|
Object[] getRowData(Positioner pos) {
|
|
return new Object[]{pos.getName(), Double.NaN, Double.NaN, 0, Double.NaN, pos.getUnit()};
|
|
}
|
|
});
|
|
|
|
scientaFloatFields = new JTextField[]{textLowEnergy, textCenterEnergy, textHighEnergy, textStepEnergy,
|
|
textLowThetaY, textCenterThetaY, textHighThetaY, textStepThetaY, textCenterThetaX};
|
|
scientaIntFields= new JTextField[]{textSlices, textChannels};
|
|
scientaRangeFields = new JTextField[]{ textXChannelMax, textXChannelMin, textYChannelMax, textYChannelMin};
|
|
scientaCombos = new JComboBox[]{ comboPass, comboAcquisition, comboEnergy, comboLens, comboDetMode};
|
|
|
|
try {
|
|
Class scienta = getContext().getClassByName("Scienta");
|
|
SwingUtils.setEnumCombo(comboLens, Reflection.getDeclaredClass(scienta, "LensMode"), true);
|
|
SwingUtils.setEnumCombo(comboEnergy, Reflection.getDeclaredClass(scienta, "EnergyMode"), true);
|
|
SwingUtils.setEnumCombo(comboAcquisition, Reflection.getDeclaredClass(scienta, "AcquisitionMode"), true);
|
|
SwingUtils.setEnumCombo(comboDetMode, Reflection.getDeclaredClass(scienta, "DetectorMode"), true);
|
|
comboPass.setModel(new javax.swing.DefaultComboBoxModel(Convert.toStringArray(scienta.getField("PASS_ENERGY_VALUES").get(null))));
|
|
} catch (Exception ex) {
|
|
getLogger().log(Level.SEVERE, null, ex);
|
|
}
|
|
|
|
for (JComboBox combo : scientaCombos){
|
|
SwingUtils.insertCombo(combo, "", 0);
|
|
}
|
|
clear();
|
|
}
|
|
|
|
void addPositioner(Positioner pos, DefaultTableModel model, int row, Object[] data) {
|
|
if (row < 0) {
|
|
row = model.getRowCount();
|
|
}
|
|
model.insertRow(row, data);
|
|
removePositioner(pos, modelInactive, (model == modelInactive) ? row : -1);
|
|
removePositioner(pos, modelFixed, (model == modelFixed) ? row : -1);
|
|
removePositioner(pos, modelScanned, (model == modelScanned) ? row : -1);
|
|
}
|
|
|
|
void removePositioner(Positioner pos, DefaultTableModel model, int except) {
|
|
for (int i = 0; i < model.getRowCount(); i++) {
|
|
if ((except < 0) || (i != except)) {
|
|
if (model.getValueAt(i, 0).equals(pos.getName())) {
|
|
model.removeRow(i);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//Overridable callbacks
|
|
@Override
|
|
public void onInitialize(int runCount) {
|
|
if ((modelFixed.getRowCount() == 0) && (modelScanned.getRowCount() == 0) && (modelInactive.getRowCount() == 0)) {
|
|
initInactive();
|
|
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void onStateChange(State state, State former) {
|
|
updateControls();
|
|
}
|
|
|
|
@Override
|
|
public void onExecutedFile(String fileName, Object result) {
|
|
}
|
|
|
|
//Callback to perform update - in event thread
|
|
@Override
|
|
protected void doUpdate() {
|
|
}
|
|
|
|
@Override
|
|
public String getFileName() {
|
|
return (currentFile == null) ? null : currentFile.toString();
|
|
}
|
|
|
|
@Override
|
|
public boolean isTabNameUpdated() {
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public String getType() {
|
|
return "SIStem";
|
|
}
|
|
|
|
@Override
|
|
public boolean createMenuNew() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public boolean createFilePanel() {
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String getDescription() {
|
|
return "SIStem Scan definition file (*." + FILE_EXTENSION + ")";
|
|
}
|
|
|
|
@Override
|
|
public String[] getExtensions() {
|
|
return new String[]{FILE_EXTENSION};
|
|
}
|
|
|
|
@Override
|
|
public String getHomePath() {
|
|
return "{script}/scans";
|
|
}
|
|
|
|
@Override
|
|
public void saveAs(String fileName) throws IOException {
|
|
currentFile = new File(fileName);
|
|
Map preActions = new HashMap();
|
|
|
|
for (JComboBox combo : scientaCombos){
|
|
if (combo.getSelectedIndex()>0){
|
|
preActions.put(combo.getName(), String.valueOf(combo.getSelectedItem()));
|
|
}
|
|
}
|
|
for (JTextField text :scientaFloatFields) {
|
|
if (!text.getText().isBlank()){
|
|
preActions.put(text.getName(), Double.valueOf(text.getText().trim()));
|
|
}
|
|
}
|
|
for (JTextField text :scientaIntFields) {
|
|
if (!text.getText().isBlank()){
|
|
preActions.put(text.getName(), Integer.valueOf(text.getText().trim()));
|
|
}
|
|
}
|
|
for (int i = 0; i < modelFixed.getRowCount(); i++) {
|
|
preActions.put(modelFixed.getValueAt(i, 0), modelFixed.getValueAt(i, 1));
|
|
}
|
|
|
|
String[] positioners = new String[modelScanned.getRowCount()];
|
|
Double[] start = new Double[modelScanned.getRowCount()];
|
|
Double[] stop = new Double[modelScanned.getRowCount()];
|
|
Integer[] steps = new Integer[modelScanned.getRowCount()];
|
|
for (int i = 0; i < modelScanned.getRowCount(); i++) {
|
|
positioners[i] = (String) modelScanned.getValueAt(i, 0);
|
|
start[i] = (Double) modelScanned.getValueAt(i, 1);
|
|
stop[i] = (Double) modelScanned.getValueAt(i, 2);
|
|
steps[i] = (Integer) modelScanned.getValueAt(i, 3) - 1;
|
|
}
|
|
|
|
Integer[] range = new Integer[4];
|
|
for (int i=0; i< scientaRangeFields.length; i++){
|
|
range[i] = scientaRangeFields[i].getText().isBlank() ? null : Integer.valueOf(scientaRangeFields[i].getText().trim());
|
|
}
|
|
|
|
|
|
Map config = new HashMap();
|
|
config.put("PRE_ACTIONS", preActions);
|
|
config.put("RANGE", range.equals(new Integer[]{null,null,null,null}) ? new ArrayList() : Arr.toList(range));
|
|
config.put("POSITIONERS", positioners);
|
|
config.put("START", start);
|
|
config.put("STOP", stop);
|
|
config.put("STEPS", steps);
|
|
|
|
config.put("SENSORS", getDevices(textSensors));
|
|
config.put("SNAPS", getDevices(textSnapshots));
|
|
config.put("DIAGS", getDevices(textDiagnostics));
|
|
config.put("MONITORS", getDevices(textMonitors));
|
|
|
|
config.put("SETTLING_TIME", spinnerLatency.getValue());
|
|
config.put("PASSES", spinnerPasses.getValue());
|
|
config.put("ZIGZAG", checkZigzag.isSelected());
|
|
config.put("COMPRESSION", true);
|
|
|
|
String json = JsonSerializer.encode(config, true);
|
|
Files.write(currentFile.toPath(), json.getBytes());
|
|
updateControls();
|
|
}
|
|
|
|
@Override
|
|
public void open(String fileName) throws IOException {
|
|
clear();
|
|
if (fileName != null) {
|
|
Path path = Paths.get(fileName);
|
|
String json = new String(Files.readAllBytes(path));
|
|
currentFile = path.toFile();
|
|
Map config = (Map) JsonSerializer.decode(json, Map.class);
|
|
|
|
Map<String, Double> preActions = (Map) config.get("PRE_ACTIONS");
|
|
List<Integer> range = (List) config.getOrDefault("RANGE", new ArrayList());
|
|
|
|
List<String> positioners = (List) config.get("POSITIONERS");
|
|
List<Double> start = (List) config.get("START");
|
|
List<Double> stop = (List) config.get("STOP");
|
|
List<Integer> steps = (List) config.get("STEPS");
|
|
|
|
for (String name : preActions.keySet()) {
|
|
for (JComboBox combo : scientaCombos){
|
|
if (name.equals(combo.getName())){
|
|
combo.setSelectedItem(String.valueOf(preActions.get(name)));
|
|
break;
|
|
}
|
|
}
|
|
for (JTextField text :Arr.append(scientaFloatFields, scientaIntFields)) {
|
|
if (name.equals(text.getName())){
|
|
text.setText(String.valueOf(preActions.get(name)));
|
|
break;
|
|
}
|
|
}
|
|
for (int i = 0; i<range.size(); i++){
|
|
if (range.get(i)!=null){
|
|
scientaRangeFields[i].setText(String.valueOf(range.get(i)).trim());
|
|
}
|
|
}
|
|
Positioner pos = getContext().getDevicePool().getByName(name, Positioner.class);
|
|
if (pos != null) {
|
|
addPositioner(pos, modelFixed, -1, new Object[]{name, preActions.get(name), pos.getUnit()});
|
|
}
|
|
}
|
|
for (int i = 0; i < positioners.size(); i++) {
|
|
String name = positioners.get(i);
|
|
Positioner pos = getContext().getDevicePool().getByName(name, Positioner.class);
|
|
if (pos != null) {
|
|
addPositioner(pos, modelScanned, -1, new Object[]{name, start.get(i), stop.get(i), steps.get(i) + 1, 0, pos.getUnit()});
|
|
}
|
|
}
|
|
|
|
setDevices(textSensors, (List<String>) config.get("SENSORS"));
|
|
setDevices(textSnapshots, (List<String>) config.get("SNAPS"));
|
|
setDevices(textDiagnostics, (List<String>) config.get("DIAGS"));
|
|
setDevices(textMonitors, (List<String>) config.get("MONITORS"));
|
|
|
|
spinnerLatency.setValue(config.get("SETTLING_TIME"));
|
|
spinnerPasses.setValue(config.get("PASSES"));
|
|
checkZigzag.setSelected((Boolean) config.get("ZIGZAG"));
|
|
}
|
|
updateControls();
|
|
}
|
|
|
|
void clear() {
|
|
currentFile = null;
|
|
for (JComboBox combo : scientaCombos){
|
|
combo.setSelectedIndex(0);
|
|
}
|
|
|
|
for (JTextField text : Arr.append( Arr.append(scientaFloatFields, scientaIntFields), scientaRangeFields)) {
|
|
text.setText("");
|
|
}
|
|
|
|
modelFixed.setRowCount(0);
|
|
modelScanned.setRowCount(0);
|
|
|
|
String[] DEFAULT_SENSORS = new String[]{"scienta.dataMatrix"};
|
|
//String[] DEFAULT_SNAPS = new String[]{"temp_cryostat", "temp_sample1", "temp_headmech", "temp_sample2",
|
|
// "temp_boot1", "temp_shield", "temp_boot2", "temp_cryopump",
|
|
// "acmi", "tcmp", "exit_slit", "fe_vert_width", "fe_horiz_width"};
|
|
//String[] DEFAULT_DIAGS = new String[]{"x", "y", "z", "phi", "theta", "tilt"};
|
|
String[] DEFAULT_DIAGS = getContext().getDevicePool().getAllNamesOrderedByName(Motor.class);
|
|
String[] DEFAULT_SNAPS = Arr.remove(getContext().getDevicePool().getAllNamesOrderedByName(ReadonlyProcessVariable.class), DEFAULT_DIAGS);
|
|
String[] DEFAULT_MONITORS = new String[]{"current"};
|
|
|
|
setDevices(textSensors, Arr.toList(DEFAULT_SENSORS));
|
|
setDevices(textSnapshots, Arr.toList(DEFAULT_SNAPS));
|
|
setDevices(textDiagnostics, Arr.toList(DEFAULT_DIAGS));
|
|
setDevices(textMonitors, Arr.toList(DEFAULT_MONITORS));
|
|
initInactive();
|
|
updateControls();
|
|
}
|
|
|
|
public List<String> getDevices(JTextArea text) {
|
|
return Arr.toList(text.getText().split("\n"));
|
|
}
|
|
|
|
public void setDevices(JTextArea text, List<String> devices) {
|
|
text.setText(String.join("\n", devices));
|
|
}
|
|
|
|
void initInactive() {
|
|
modelInactive.setRowCount(0);
|
|
Positioner[] positioners = getContext().getDevicePool().getAllDevicesOrderedByName(Positioner.class);
|
|
for (Positioner pos : positioners) {
|
|
modelInactive.addRow(new Object[]{pos.getName()});
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public void execute() throws Exception {
|
|
checkValues();
|
|
save();
|
|
if (currentFile == null) {
|
|
return;
|
|
}
|
|
|
|
HashMap args = new HashMap();
|
|
args.put("NAME", getScanName());
|
|
|
|
this.runAsync("templates/SIStem", args).handle((ret, ex) -> {
|
|
if (ex != null) {
|
|
}
|
|
try {
|
|
} catch (Exception e) {
|
|
Logger.getLogger(SIStem.class.getName()).log(Level.SEVERE, null, e);
|
|
}
|
|
return ret;
|
|
});
|
|
|
|
}
|
|
|
|
String getScanName() {
|
|
if (currentFile != null) {
|
|
return IO.getPrefix(currentFile);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
void updateControls() {
|
|
State state = getState();
|
|
try {
|
|
textFileId.setText(String.valueOf(getContext().getFileSequentialNumber()));
|
|
} catch (Exception ex) {
|
|
textFileId.setText("");
|
|
}
|
|
|
|
String fileName = getFileName();
|
|
if (fileName == null) {
|
|
textFile.setText("");
|
|
} else {
|
|
String home = getContext().getSetup().expandPath(getHomePath());
|
|
if (IO.isSubPath(fileName, home)) {
|
|
fileName = IO.getRelativePath(fileName, home);
|
|
}
|
|
textFile.setText(fileName);
|
|
}
|
|
|
|
buttonStart.setEnabled((state == State.Ready) && (currentFile != null));
|
|
buttonAddToQueue.setEnabled((state == State.Ready) && (currentFile != null));
|
|
buttonAbort.setEnabled(state.isProcessing());
|
|
buttonScienta.setEnabled(state.isInitialized());
|
|
|
|
}
|
|
|
|
void checkValues() {
|
|
for (int i = 0; i < modelFixed.getRowCount(); i++) {
|
|
if (Double.isNaN((Double) modelFixed.getValueAt(i, 1))) {
|
|
throw new IllegalArgumentException("Invalid value for " + modelFixed.getValueAt(i, 0));
|
|
}
|
|
}
|
|
for (int i = 0; i < modelScanned.getRowCount(); i++) {
|
|
if (Double.isNaN((Double) modelScanned.getValueAt(i, 1))) {
|
|
throw new IllegalArgumentException("Invalid start for " + modelFixed.getValueAt(i, 0));
|
|
}
|
|
if (Double.isNaN((Double) modelScanned.getValueAt(i, 2))) {
|
|
throw new IllegalArgumentException("Invalid stop for " + modelFixed.getValueAt(i, 0));
|
|
}
|
|
if (((Integer) modelScanned.getValueAt(i, 3)) < 1) {
|
|
throw new IllegalArgumentException("Invalid points for " + modelFixed.getValueAt(i, 0));
|
|
}
|
|
}
|
|
for (JTextArea text : new JTextArea[]{textSensors, textDiagnostics, textSnapshots, textMonitors}) {
|
|
for (String name : getDevices(text)) {
|
|
try {
|
|
eval(name + ".take()", true);
|
|
} catch (Exception ex) {
|
|
throw new IllegalArgumentException("Invalid device " + name + " in " + text.getName() + " table");
|
|
}
|
|
}
|
|
}
|
|
|
|
for (JTextField text :scientaFloatFields) {
|
|
if (!text.getText().isBlank()) {
|
|
try {
|
|
Double.valueOf(text.getText().trim());
|
|
} catch (Exception ex) {
|
|
throw new IllegalArgumentException("Invalid value in " + text.getName() );
|
|
}
|
|
}
|
|
}
|
|
for (JTextField text :scientaIntFields) {
|
|
if (!text.getText().isBlank()) {
|
|
try {
|
|
Integer.valueOf(text.getText().trim());
|
|
} catch (Exception ex) {
|
|
throw new IllegalArgumentException("Invalid value in " + text.getName() );
|
|
}
|
|
}
|
|
}
|
|
List<Boolean> defined = new ArrayList();
|
|
for (JTextField text :scientaRangeFields) {
|
|
if (!text.getText().isBlank()) {
|
|
try {
|
|
Integer.valueOf(text.getText().trim());
|
|
} catch (Exception ex) {
|
|
throw new IllegalArgumentException("Invalid value in " + text.getName() );
|
|
}
|
|
}
|
|
defined.add(text.getText().isBlank()?false:true);
|
|
}
|
|
if ((defined.get(0) != defined.get(1)) || (defined.get(2) != defined.get(3))){
|
|
throw new IllegalArgumentException("Invalid detector range");
|
|
}
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
|
private void initComponents() {
|
|
|
|
buttonScienta = new javax.swing.JButton();
|
|
jLabel2 = new javax.swing.JLabel();
|
|
textFileId = new javax.swing.JTextField();
|
|
buttonResetId = new javax.swing.JButton();
|
|
buttonStart = new javax.swing.JButton();
|
|
buttonAbort = new javax.swing.JButton();
|
|
jPanel2 = new javax.swing.JPanel();
|
|
jTabbedPane1 = new javax.swing.JTabbedPane();
|
|
jPanel4 = new javax.swing.JPanel();
|
|
jPanel6 = new javax.swing.JPanel();
|
|
jLabel14 = new javax.swing.JLabel();
|
|
textStepEnergy = new javax.swing.JTextField();
|
|
jLabel13 = new javax.swing.JLabel();
|
|
jLabel12 = new javax.swing.JLabel();
|
|
jLabel15 = new javax.swing.JLabel();
|
|
textHighEnergy = new javax.swing.JTextField();
|
|
textCenterEnergy = new javax.swing.JTextField();
|
|
textLowEnergy = new javax.swing.JTextField();
|
|
jPanel7 = new javax.swing.JPanel();
|
|
jLabel17 = new javax.swing.JLabel();
|
|
textStepThetaY = new javax.swing.JTextField();
|
|
jLabel18 = new javax.swing.JLabel();
|
|
jLabel19 = new javax.swing.JLabel();
|
|
jLabel20 = new javax.swing.JLabel();
|
|
textHighThetaY = new javax.swing.JTextField();
|
|
textCenterThetaY = new javax.swing.JTextField();
|
|
textLowThetaY = new javax.swing.JTextField();
|
|
jPanel9 = new javax.swing.JPanel();
|
|
jLabel26 = new javax.swing.JLabel();
|
|
textCenterThetaX = new javax.swing.JTextField();
|
|
jPanel10 = new javax.swing.JPanel();
|
|
jLabel11 = new javax.swing.JLabel();
|
|
jLabel6 = new javax.swing.JLabel();
|
|
jLabel5 = new javax.swing.JLabel();
|
|
comboPass = new javax.swing.JComboBox();
|
|
comboLens = new javax.swing.JComboBox();
|
|
jLabel7 = new javax.swing.JLabel();
|
|
comboAcquisition = new javax.swing.JComboBox();
|
|
comboEnergy = new javax.swing.JComboBox();
|
|
jPanel5 = new javax.swing.JPanel();
|
|
jLabel16 = new javax.swing.JLabel();
|
|
comboDetMode = new javax.swing.JComboBox();
|
|
jLabel9 = new javax.swing.JLabel();
|
|
jLabel25 = new javax.swing.JLabel();
|
|
textSlices = new javax.swing.JTextField();
|
|
textChannels = new javax.swing.JTextField();
|
|
jLabel27 = new javax.swing.JLabel();
|
|
textXChannelMin = new javax.swing.JTextField();
|
|
textXChannelMax = new javax.swing.JTextField();
|
|
jLabel10 = new javax.swing.JLabel();
|
|
textYChannelMin = new javax.swing.JTextField();
|
|
textYChannelMax = new javax.swing.JTextField();
|
|
jPanel11 = new javax.swing.JPanel();
|
|
checkZigzag = new javax.swing.JCheckBox();
|
|
jLabel4 = new javax.swing.JLabel();
|
|
spinnerLatency = new javax.swing.JSpinner();
|
|
jLabel1 = new javax.swing.JLabel();
|
|
spinnerPasses = new javax.swing.JSpinner();
|
|
jLabel8 = new javax.swing.JLabel();
|
|
jPanel1 = new javax.swing.JPanel();
|
|
jScrollPane1 = new javax.swing.JScrollPane();
|
|
tableInactive = new javax.swing.JTable();
|
|
jScrollPane2 = new javax.swing.JScrollPane();
|
|
tableFixed = new javax.swing.JTable();
|
|
jScrollPane3 = new javax.swing.JScrollPane();
|
|
tableScanned = new javax.swing.JTable();
|
|
jPanel3 = new javax.swing.JPanel();
|
|
jScrollPane4 = new javax.swing.JScrollPane();
|
|
textSensors = new javax.swing.JTextArea();
|
|
jScrollPane5 = new javax.swing.JScrollPane();
|
|
textSnapshots = new javax.swing.JTextArea();
|
|
jScrollPane6 = new javax.swing.JScrollPane();
|
|
textDiagnostics = new javax.swing.JTextArea();
|
|
jScrollPane7 = new javax.swing.JScrollPane();
|
|
textMonitors = new javax.swing.JTextArea();
|
|
buttonAddToQueue = new javax.swing.JButton();
|
|
jLabel3 = new javax.swing.JLabel();
|
|
textFile = new javax.swing.JTextField();
|
|
buttonOpen = new javax.swing.JButton();
|
|
buttonSave = new javax.swing.JButton();
|
|
buttonClear = new javax.swing.JButton();
|
|
|
|
buttonScienta.setText("Scienta Panel");
|
|
buttonScienta.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonScientaActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
jLabel2.setText("File ID:");
|
|
|
|
textFileId.setEditable(false);
|
|
textFileId.setHorizontalAlignment(javax.swing.JTextField.CENTER);
|
|
|
|
buttonResetId.setText("Reset");
|
|
buttonResetId.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonResetIdActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonStart.setText("Start");
|
|
buttonStart.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonStartActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonAbort.setText("Abort");
|
|
buttonAbort.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonAbortActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Parameters"));
|
|
|
|
jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Energy Range (eV)"));
|
|
|
|
jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel14.setText("High:");
|
|
|
|
textStepEnergy.setName("scienta.energyStepSize"); // NOI18N
|
|
|
|
jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel13.setText("Center:");
|
|
|
|
jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel12.setText("Low:");
|
|
|
|
jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel15.setText("Step:");
|
|
|
|
textHighEnergy.setName("scienta.highEnergy"); // NOI18N
|
|
|
|
textCenterEnergy.setName("scienta.centerEnergy"); // NOI18N
|
|
|
|
textLowEnergy.setName("scienta.lowEnergy"); // NOI18N
|
|
|
|
javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
|
|
jPanel6.setLayout(jPanel6Layout);
|
|
jPanel6Layout.setHorizontalGroup(
|
|
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel6Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jLabel14)
|
|
.addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING)
|
|
.addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(textLowEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(textCenterEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(textHighEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
|
|
.addComponent(jLabel15)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textStepEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addContainerGap())
|
|
);
|
|
|
|
jPanel6Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {textCenterEnergy, textHighEnergy, textLowEnergy, textStepEnergy});
|
|
|
|
jPanel6Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel12, jLabel13, jLabel14, jLabel15});
|
|
|
|
jPanel6Layout.setVerticalGroup(
|
|
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel6Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textLowEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel12))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textCenterEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel13))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textHighEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel14))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textStepEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel15))
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
);
|
|
|
|
jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("ThetaY "));
|
|
|
|
jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel17.setText("High:");
|
|
|
|
textStepThetaY.setName("scienta.thetaYStepSize"); // NOI18N
|
|
|
|
jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel18.setText("Center:");
|
|
|
|
jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel19.setText("Low:");
|
|
|
|
jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel20.setText("Step:");
|
|
|
|
textHighThetaY.setName("scienta.highThetaY"); // NOI18N
|
|
|
|
textCenterThetaY.setName("scienta.centerThetaY"); // NOI18N
|
|
|
|
textLowThetaY.setName("scienta.lowThetaY"); // NOI18N
|
|
|
|
javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
|
|
jPanel7.setLayout(jPanel7Layout);
|
|
jPanel7Layout.setHorizontalGroup(
|
|
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel7Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jLabel17)
|
|
.addComponent(jLabel19, javax.swing.GroupLayout.Alignment.TRAILING)
|
|
.addComponent(jLabel18, javax.swing.GroupLayout.Alignment.TRAILING))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(textLowThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(textCenterThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(textHighThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
|
|
.addComponent(jLabel20)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textStepThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addContainerGap())
|
|
);
|
|
|
|
jPanel7Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel17, jLabel18, jLabel19, jLabel20});
|
|
|
|
jPanel7Layout.setVerticalGroup(
|
|
jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel7Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textLowThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel19))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textCenterThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel18))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textHighThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel17))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textStepThetaY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel20))
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
);
|
|
|
|
jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("ThetaX"));
|
|
|
|
jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel26.setText("Center:");
|
|
|
|
textCenterThetaX.setName("scienta.centerThetaX"); // NOI18N
|
|
|
|
javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
|
|
jPanel9.setLayout(jPanel9Layout);
|
|
jPanel9Layout.setHorizontalGroup(
|
|
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel9Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(jLabel26)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textCenterThetaX, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addContainerGap())
|
|
);
|
|
jPanel9Layout.setVerticalGroup(
|
|
jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel9Layout.createSequentialGroup()
|
|
.addGap(38, 38, 38)
|
|
.addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textCenterThetaX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel26))
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
);
|
|
|
|
jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel11.setText("Pass Energy:");
|
|
|
|
jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel6.setText("Acquisition:");
|
|
|
|
jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel5.setText("Energy Mode:");
|
|
|
|
comboPass.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));
|
|
comboPass.setToolTipText("");
|
|
comboPass.setName("scienta.passEnergyDev"); // NOI18N
|
|
|
|
comboLens.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));
|
|
comboLens.setName("scienta.lensModeDev"); // NOI18N
|
|
|
|
jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel7.setText("Lens Mode:");
|
|
|
|
comboAcquisition.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));
|
|
comboAcquisition.setName("scienta.acquisitionModeDev"); // NOI18N
|
|
|
|
comboEnergy.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));
|
|
comboEnergy.setName("scienta.energyModeDev"); // NOI18N
|
|
|
|
javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
|
|
jPanel10.setLayout(jPanel10Layout);
|
|
jPanel10Layout.setHorizontalGroup(
|
|
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel10Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
.addGroup(jPanel10Layout.createSequentialGroup()
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jLabel5)
|
|
.addComponent(jLabel6)
|
|
.addComponent(jLabel11))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(comboPass, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(comboAcquisition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(comboEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addGroup(jPanel10Layout.createSequentialGroup()
|
|
.addComponent(jLabel7)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(comboLens, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addContainerGap())
|
|
);
|
|
|
|
jPanel10Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {comboAcquisition, comboEnergy, comboLens, comboPass});
|
|
|
|
jPanel10Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel11, jLabel5, jLabel6, jLabel7});
|
|
|
|
jPanel10Layout.setVerticalGroup(
|
|
jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel10Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel11)
|
|
.addComponent(comboPass, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel6)
|
|
.addComponent(comboAcquisition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel5)
|
|
.addComponent(comboEnergy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel7)
|
|
.addComponent(comboLens, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addContainerGap())
|
|
);
|
|
|
|
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
|
|
jPanel4.setLayout(jPanel4Layout);
|
|
jPanel4Layout.setHorizontalGroup(
|
|
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGap(18, 18, Short.MAX_VALUE)
|
|
.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
);
|
|
jPanel4Layout.setVerticalGroup(
|
|
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel4Layout.createSequentialGroup()
|
|
.addGap(20, 20, 20)
|
|
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
|
.addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(jPanel9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
|
);
|
|
|
|
jTabbedPane1.addTab("Analyzer", jPanel4);
|
|
|
|
jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel16.setText("Mode:");
|
|
|
|
comboDetMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));
|
|
comboDetMode.setToolTipText("");
|
|
comboDetMode.setName("scienta.detectorModeDev"); // NOI18N
|
|
|
|
jLabel9.setText("X Channel Range:");
|
|
|
|
jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel25.setText("Slices:");
|
|
|
|
textSlices.setName("scienta.slices"); // NOI18N
|
|
|
|
textChannels.setName("scienta.channels"); // NOI18N
|
|
|
|
jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
|
jLabel27.setText("Channels:");
|
|
|
|
textXChannelMin.setName("x_channel_min"); // NOI18N
|
|
|
|
textXChannelMax.setName("x_channel_max"); // NOI18N
|
|
|
|
jLabel10.setText("Y Channel Range:");
|
|
|
|
textYChannelMin.setName("y_channel_min"); // NOI18N
|
|
|
|
textYChannelMax.setName("y_channel_max"); // NOI18N
|
|
|
|
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
|
|
jPanel5.setLayout(jPanel5Layout);
|
|
jPanel5Layout.setHorizontalGroup(
|
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addContainerGap(33, Short.MAX_VALUE)
|
|
.addComponent(jLabel16)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(comboDetMode, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 49, Short.MAX_VALUE)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addComponent(jLabel25)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textSlices, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addComponent(jLabel27)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textChannels, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addComponent(jLabel10)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textYChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textYChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addComponent(jLabel9)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textXChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textXChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addContainerGap(202, Short.MAX_VALUE))
|
|
);
|
|
jPanel5Layout.setVerticalGroup(
|
|
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel5Layout.createSequentialGroup()
|
|
.addGap(21, 21, 21)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel16)
|
|
.addComponent(comboDetMode, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel9)
|
|
.addComponent(textXChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(textXChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel10)
|
|
.addComponent(textYChannelMin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(textYChannelMax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textSlices, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel25))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(textChannels, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(jLabel27))
|
|
.addContainerGap(39, Short.MAX_VALUE))
|
|
);
|
|
|
|
jTabbedPane1.addTab("Detector", jPanel5);
|
|
|
|
jLabel4.setText("Settling Time:");
|
|
|
|
spinnerLatency.setModel(new javax.swing.SpinnerNumberModel(0.0d, 0.0d, 1000.0d, 1.0d));
|
|
|
|
jLabel1.setText("Passes:");
|
|
|
|
spinnerPasses.setModel(new javax.swing.SpinnerNumberModel(1, 1, 1000, 1));
|
|
|
|
jLabel8.setText("Zigzag:");
|
|
|
|
javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
|
|
jPanel11.setLayout(jPanel11Layout);
|
|
jPanel11Layout.setHorizontalGroup(
|
|
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel11Layout.createSequentialGroup()
|
|
.addContainerGap(242, Short.MAX_VALUE)
|
|
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jLabel8)
|
|
.addComponent(jLabel4)
|
|
.addComponent(jLabel1))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(spinnerPasses, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(checkZigzag)
|
|
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
|
|
.addContainerGap(268, Short.MAX_VALUE))
|
|
);
|
|
|
|
jPanel11Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {spinnerLatency, spinnerPasses});
|
|
|
|
jPanel11Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel4, jLabel8});
|
|
|
|
jPanel11Layout.setVerticalGroup(
|
|
jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel11Layout.createSequentialGroup()
|
|
.addGap(20, 20, 20)
|
|
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(checkZigzag)
|
|
.addComponent(jLabel8))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel4)
|
|
.addComponent(spinnerLatency, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(jLabel1)
|
|
.addComponent(spinnerPasses, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addContainerGap(77, Short.MAX_VALUE))
|
|
);
|
|
|
|
jTabbedPane1.addTab("Scan", jPanel11);
|
|
|
|
jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("Inactive"));
|
|
|
|
tableInactive.setModel(new javax.swing.table.DefaultTableModel(
|
|
new Object [][] {
|
|
|
|
},
|
|
new String [] {
|
|
"Name"
|
|
}
|
|
) {
|
|
Class[] types = new Class [] {
|
|
java.lang.String.class
|
|
};
|
|
boolean[] canEdit = new boolean [] {
|
|
false
|
|
};
|
|
|
|
public Class getColumnClass(int columnIndex) {
|
|
return types [columnIndex];
|
|
}
|
|
|
|
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
|
return canEdit [columnIndex];
|
|
}
|
|
});
|
|
tableInactive.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
|
jScrollPane1.setViewportView(tableInactive);
|
|
|
|
jScrollPane2.setBorder(javax.swing.BorderFactory.createTitledBorder("Fixed"));
|
|
|
|
tableFixed.setModel(new javax.swing.table.DefaultTableModel(
|
|
new Object [][] {
|
|
|
|
},
|
|
new String [] {
|
|
"Name", "Value", "Units"
|
|
}
|
|
) {
|
|
Class[] types = new Class [] {
|
|
java.lang.String.class, java.lang.Double.class, java.lang.String.class
|
|
};
|
|
boolean[] canEdit = new boolean [] {
|
|
false, true, false
|
|
};
|
|
|
|
public Class getColumnClass(int columnIndex) {
|
|
return types [columnIndex];
|
|
}
|
|
|
|
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
|
return canEdit [columnIndex];
|
|
}
|
|
});
|
|
tableFixed.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
|
jScrollPane2.setViewportView(tableFixed);
|
|
|
|
jScrollPane3.setBorder(javax.swing.BorderFactory.createTitledBorder("Scanned"));
|
|
|
|
tableScanned.setModel(new javax.swing.table.DefaultTableModel(
|
|
new Object [][] {
|
|
|
|
},
|
|
new String [] {
|
|
"Name", "Start", "Stop", "Points", "Step", "Units"
|
|
}
|
|
) {
|
|
Class[] types = new Class [] {
|
|
java.lang.String.class, java.lang.Double.class, java.lang.Double.class, java.lang.Integer.class, java.lang.Double.class, java.lang.String.class
|
|
};
|
|
boolean[] canEdit = new boolean [] {
|
|
false, true, true, true, false, false
|
|
};
|
|
|
|
public Class getColumnClass(int columnIndex) {
|
|
return types [columnIndex];
|
|
}
|
|
|
|
public boolean isCellEditable(int rowIndex, int columnIndex) {
|
|
return canEdit [columnIndex];
|
|
}
|
|
});
|
|
tableScanned.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
|
jScrollPane3.setViewportView(tableScanned);
|
|
|
|
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
|
|
jPanel1.setLayout(jPanel1Layout);
|
|
jPanel1Layout.setHorizontalGroup(
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
.addGap(0, 0, 0)
|
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 313, Short.MAX_VALUE))
|
|
);
|
|
jPanel1Layout.setVerticalGroup(
|
|
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel1Layout.createSequentialGroup()
|
|
.addGap(14, 14, 14)
|
|
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
|
.addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
|
|
.addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
|
|
.addContainerGap())
|
|
);
|
|
|
|
jTabbedPane1.addTab("Positioners", jPanel1);
|
|
|
|
jScrollPane4.setBorder(javax.swing.BorderFactory.createTitledBorder("Sensors"));
|
|
|
|
textSensors.setColumns(12);
|
|
textSensors.setRows(5);
|
|
textSensors.setName("sensors"); // NOI18N
|
|
jScrollPane4.setViewportView(textSensors);
|
|
|
|
jScrollPane5.setBorder(javax.swing.BorderFactory.createTitledBorder("Snapshots"));
|
|
|
|
textSnapshots.setColumns(12);
|
|
textSnapshots.setRows(5);
|
|
textSnapshots.setName("snapshots"); // NOI18N
|
|
jScrollPane5.setViewportView(textSnapshots);
|
|
|
|
jScrollPane6.setBorder(javax.swing.BorderFactory.createTitledBorder("Diagnostics"));
|
|
|
|
textDiagnostics.setColumns(12);
|
|
textDiagnostics.setRows(5);
|
|
textDiagnostics.setName("diagnostics"); // NOI18N
|
|
jScrollPane6.setViewportView(textDiagnostics);
|
|
|
|
jScrollPane7.setBorder(javax.swing.BorderFactory.createTitledBorder("Monitors"));
|
|
|
|
textMonitors.setColumns(12);
|
|
textMonitors.setRows(5);
|
|
textMonitors.setName("monitors"); // NOI18N
|
|
jScrollPane7.setViewportView(textMonitors);
|
|
|
|
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
|
|
jPanel3.setLayout(jPanel3Layout);
|
|
jPanel3Layout.setHorizontalGroup(
|
|
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel3Layout.createSequentialGroup()
|
|
.addGap(0, 0, 0)
|
|
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)
|
|
.addGap(0, 0, 0))
|
|
);
|
|
jPanel3Layout.setVerticalGroup(
|
|
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
|
|
.addGap(14, 14, 14)
|
|
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
|
.addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)
|
|
.addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jScrollPane7))
|
|
.addContainerGap())
|
|
);
|
|
|
|
jTabbedPane1.addTab("Records", jPanel3);
|
|
|
|
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
|
|
jPanel2.setLayout(jPanel2Layout);
|
|
jPanel2Layout.setHorizontalGroup(
|
|
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(jTabbedPane1)
|
|
.addContainerGap())
|
|
);
|
|
jPanel2Layout.setVerticalGroup(
|
|
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(jPanel2Layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addComponent(jTabbedPane1)
|
|
.addContainerGap())
|
|
);
|
|
|
|
buttonAddToQueue.setText("Queue");
|
|
buttonAddToQueue.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonAddToQueueActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
jLabel3.setText("File:");
|
|
|
|
textFile.setDisabledTextColor(javax.swing.UIManager.getDefaults().getColor("TextField.foreground"));
|
|
textFile.setEnabled(false);
|
|
|
|
buttonOpen.setText("Open");
|
|
buttonOpen.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonOpenActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonSave.setText("Save");
|
|
buttonSave.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonSaveActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
buttonClear.setText("Clear");
|
|
buttonClear.addActionListener(new java.awt.event.ActionListener() {
|
|
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
|
buttonClearActionPerformed(evt);
|
|
}
|
|
});
|
|
|
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
|
this.setLayout(layout);
|
|
layout.setHorizontalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addComponent(jPanel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addContainerGap()
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addComponent(buttonScienta)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(jLabel2)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textFileId, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonResetId))
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
.addGap(0, 0, Short.MAX_VALUE)
|
|
.addComponent(buttonStart)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
|
.addComponent(buttonAbort)
|
|
.addGap(0, 0, Short.MAX_VALUE)))
|
|
.addContainerGap())
|
|
.addGroup(layout.createSequentialGroup()
|
|
.addComponent(jLabel3)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(textFile)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonOpen)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonSave)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonAddToQueue)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(buttonClear))))
|
|
);
|
|
|
|
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonAbort, buttonAddToQueue, buttonResetId, buttonStart});
|
|
|
|
layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {buttonClear, buttonOpen, buttonSave});
|
|
|
|
layout.setVerticalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
.addGap(10, 10, 10)
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonOpen)
|
|
.addComponent(buttonSave)
|
|
.addComponent(jLabel3)
|
|
.addComponent(textFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
|
.addComponent(buttonClear)
|
|
.addComponent(buttonAddToQueue))
|
|
.addGap(18, 18, 18)
|
|
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addGap(18, 18, 18)
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonScienta)
|
|
.addComponent(buttonResetId)
|
|
.addComponent(jLabel2)
|
|
.addComponent(textFileId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
|
.addGap(18, 18, 18)
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(buttonStart)
|
|
.addComponent(buttonAbort))
|
|
.addContainerGap())
|
|
);
|
|
}// </editor-fold>//GEN-END:initComponents
|
|
|
|
private void buttonScientaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScientaActionPerformed
|
|
try {
|
|
this.showDevicePanel("scienta");
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonScientaActionPerformed
|
|
|
|
private void buttonResetIdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonResetIdActionPerformed
|
|
try {
|
|
this.getContext().setFileSequentialNumber(0);
|
|
updateControls();
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonResetIdActionPerformed
|
|
|
|
private void buttonStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonStartActionPerformed
|
|
try {
|
|
execute();
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonStartActionPerformed
|
|
|
|
private void buttonAbortActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAbortActionPerformed
|
|
try {
|
|
abort();
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonAbortActionPerformed
|
|
|
|
private void buttonOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonOpenActionPerformed
|
|
try {
|
|
open();
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonOpenActionPerformed
|
|
|
|
private void buttonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSaveActionPerformed
|
|
try {
|
|
checkValues();
|
|
JFileChooser chooser = new JFileChooser(getContext().getSetup().expandPath(getHomePath()));
|
|
FileNameExtensionFilter filter = new FileNameExtensionFilter(getDescription(), getExtensions());
|
|
chooser.setFileFilter(filter);
|
|
try {
|
|
if (currentFile != null) {
|
|
chooser.setSelectedFile(currentFile);
|
|
}
|
|
} catch (Exception ex) {
|
|
this.showException(ex);
|
|
}
|
|
int rVal = chooser.showSaveDialog(this);
|
|
if (rVal == JFileChooser.APPROVE_OPTION) {
|
|
String fileName = chooser.getSelectedFile().getAbsolutePath();
|
|
if (IO.getExtension(chooser.getSelectedFile().getAbsolutePath()).isEmpty()) {
|
|
fileName += "." + FILE_EXTENSION;
|
|
}
|
|
saveAs(fileName);
|
|
}
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonSaveActionPerformed
|
|
|
|
private void buttonAddToQueueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAddToQueueActionPerformed
|
|
try {
|
|
QueueProcessor tq = null;
|
|
List<QueueProcessor> queues = getView().getQueues();
|
|
if (queues.size() == 0) {
|
|
tq = getView().openProcessor(QueueProcessor.class, null);
|
|
} else {
|
|
tq = queues.get(0);
|
|
}
|
|
getView().getDocumentsTab().setSelectedComponent(tq);
|
|
tq.addNewFile(currentFile.getPath());
|
|
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonAddToQueueActionPerformed
|
|
|
|
private void buttonClearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonClearActionPerformed
|
|
try {
|
|
clear();
|
|
} catch (Exception ex) {
|
|
showException(ex);
|
|
}
|
|
}//GEN-LAST:event_buttonClearActionPerformed
|
|
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
private javax.swing.JButton buttonAbort;
|
|
private javax.swing.JButton buttonAddToQueue;
|
|
private javax.swing.JButton buttonClear;
|
|
private javax.swing.JButton buttonOpen;
|
|
private javax.swing.JButton buttonResetId;
|
|
private javax.swing.JButton buttonSave;
|
|
private javax.swing.JButton buttonScienta;
|
|
private javax.swing.JButton buttonStart;
|
|
private javax.swing.JCheckBox checkZigzag;
|
|
private javax.swing.JComboBox comboAcquisition;
|
|
private javax.swing.JComboBox comboDetMode;
|
|
private javax.swing.JComboBox comboEnergy;
|
|
private javax.swing.JComboBox comboLens;
|
|
private javax.swing.JComboBox comboPass;
|
|
private javax.swing.JLabel jLabel1;
|
|
private javax.swing.JLabel jLabel10;
|
|
private javax.swing.JLabel jLabel11;
|
|
private javax.swing.JLabel jLabel12;
|
|
private javax.swing.JLabel jLabel13;
|
|
private javax.swing.JLabel jLabel14;
|
|
private javax.swing.JLabel jLabel15;
|
|
private javax.swing.JLabel jLabel16;
|
|
private javax.swing.JLabel jLabel17;
|
|
private javax.swing.JLabel jLabel18;
|
|
private javax.swing.JLabel jLabel19;
|
|
private javax.swing.JLabel jLabel2;
|
|
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;
|
|
private javax.swing.JLabel jLabel27;
|
|
private javax.swing.JLabel jLabel3;
|
|
private javax.swing.JLabel jLabel4;
|
|
private javax.swing.JLabel jLabel5;
|
|
private javax.swing.JLabel jLabel6;
|
|
private javax.swing.JLabel jLabel7;
|
|
private javax.swing.JLabel jLabel8;
|
|
private javax.swing.JLabel jLabel9;
|
|
private javax.swing.JPanel jPanel1;
|
|
private javax.swing.JPanel jPanel10;
|
|
private javax.swing.JPanel jPanel11;
|
|
private javax.swing.JPanel jPanel2;
|
|
private javax.swing.JPanel jPanel3;
|
|
private javax.swing.JPanel jPanel4;
|
|
private javax.swing.JPanel jPanel5;
|
|
private javax.swing.JPanel jPanel6;
|
|
private javax.swing.JPanel jPanel7;
|
|
private javax.swing.JPanel jPanel8;
|
|
private javax.swing.JPanel jPanel9;
|
|
private javax.swing.JScrollPane jScrollPane1;
|
|
private javax.swing.JScrollPane jScrollPane2;
|
|
private javax.swing.JScrollPane jScrollPane3;
|
|
private javax.swing.JScrollPane jScrollPane4;
|
|
private javax.swing.JScrollPane jScrollPane5;
|
|
private javax.swing.JScrollPane jScrollPane6;
|
|
private javax.swing.JScrollPane jScrollPane7;
|
|
private javax.swing.JTabbedPane jTabbedPane1;
|
|
private javax.swing.JSpinner spinnerLatency;
|
|
private javax.swing.JSpinner spinnerPasses;
|
|
private javax.swing.JTable tableFixed;
|
|
private javax.swing.JTable tableInactive;
|
|
private javax.swing.JTable tableScanned;
|
|
private javax.swing.JTextField textCenterEnergy;
|
|
private javax.swing.JTextField textCenterThetaX;
|
|
private javax.swing.JTextField textCenterThetaY;
|
|
private javax.swing.JTextField textCenterThetaY1;
|
|
private javax.swing.JTextField textChannels;
|
|
private javax.swing.JTextArea textDiagnostics;
|
|
private javax.swing.JTextField textFile;
|
|
private javax.swing.JTextField textFileId;
|
|
private javax.swing.JTextField textHighEnergy;
|
|
private javax.swing.JTextField textHighThetaY;
|
|
private javax.swing.JTextField textHighThetaY1;
|
|
private javax.swing.JTextField textLowEnergy;
|
|
private javax.swing.JTextField textLowThetaY;
|
|
private javax.swing.JTextField textLowThetaY1;
|
|
private javax.swing.JTextArea textMonitors;
|
|
private javax.swing.JTextArea textSensors;
|
|
private javax.swing.JTextField textSlices;
|
|
private javax.swing.JTextArea textSnapshots;
|
|
private javax.swing.JTextField textStepEnergy;
|
|
private javax.swing.JTextField textStepThetaY;
|
|
private javax.swing.JTextField textStepThetaY1;
|
|
private javax.swing.JTextField textXChannelMax;
|
|
private javax.swing.JTextField textXChannelMin;
|
|
private javax.swing.JTextField textYChannelMax;
|
|
private javax.swing.JTextField textYChannelMin;
|
|
// End of variables declaration//GEN-END:variables
|
|
}
|
|
|