ScrenPanel6

This commit is contained in:
root
2020-02-07 11:43:37 +01:00
parent 7f88d445af
commit f957ab5cb8
63 changed files with 12762 additions and 382 deletions

View File

@@ -21,8 +21,10 @@ import java.awt.Dimension;
import java.awt.Window;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.DefaultComboBoxModel;
@@ -40,7 +42,7 @@ public class WireScan extends Panel {
boolean parked;
String currentScannner;
public WireScan() {
public WireScan() {
initComponents();
bpmCombos = new JComboBox[]{comboBpm1, comboBpm2, comboBpm3};
blmCombos = new JComboBox[]{comboBlm1, comboBlm2, comboBlm3};
@@ -94,11 +96,8 @@ public class WireScan extends Panel {
comboWireScanner.setSelectedItem(App.getArgumentValue("ws"));
}
comboWireScannerActionPerformed(null);
Device dev = new ChannelDouble (null, "SIN-TIMAST-TMA:Evt-15-Freq-I");
dev.setMonitored(true);
dev.initialize();
panelRepRate.setDevice(dev);
updatePanelRepRate();
} catch (Exception ex) {
showException(ex);
@@ -106,6 +105,17 @@ public class WireScan extends Panel {
}
void updatePanelRepRate() throws Exception{
if (panelRepRate.getDevice()!=null){
panelRepRate.getDevice().close();
}
int bunch = (Integer)spinnerBunch.getValue();
Device dev = new ChannelDouble (null, (bunch==2) ? "SIN-TIMAST-TMA:Bunch-2-Appl-Freq-RB" : "SIN-TIMAST-TMA:Bunch-1-Appl-Freq-RB");
dev.setMonitored(true);
dev.initialize();
panelRepRate.setDevice(dev);
}
@Override
public void onStart() {
super.onStart();
@@ -121,7 +131,7 @@ public class WireScan extends Panel {
super.onStop();
}
@Override
protected void onTimer(){
try{
@@ -602,6 +612,11 @@ public class WireScan extends Panel {
jLabel21.setText("Bunch:");
spinnerBunch.setModel(new javax.swing.SpinnerNumberModel(1, 1, 2, 1));
spinnerBunch.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
spinnerBunchStateChanged(evt);
}
});
jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
jLabel23.setText("Vel x (µm/s):");
@@ -1154,7 +1169,7 @@ ChannelDouble channelEndY;
}//GEN-LAST:event_buttonParkActionPerformed
//String caqtdm = "caqtdm -noMsg -stylefile sfop.qss -attach";
String caqtdm = "caqtdm -noMsg -stylefile sfop.qss";
String caqtdm = "startDM -noMsg -stylefile sfop.qss";
ch.psi.pshell.core.Plugin calibrationPlugin;
private void buttonCalibrationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonCalibrationActionPerformed
try {
@@ -1172,6 +1187,7 @@ ChannelDouble channelEndY;
private void buttonScannerPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonScannerPanelActionPerformed
try {
String cmd = caqtdm + " -macro 'SYS=" + comboWireScanner.getSelectedItem() + "' /sf/common/config/qt/S_DI_WSC_EXPERT.ui";
System.out.println(cmd);
Runtime.getRuntime().exec(new String[]{"bash", "-c", cmd.toString()});
} catch (Exception ex) {
showException(ex);
@@ -1232,6 +1248,14 @@ ChannelDouble channelEndY;
// TODO add your handling code here:
}//GEN-LAST:event_comboAdaptiveActionPerformed
private void spinnerBunchStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_spinnerBunchStateChanged
try {
updatePanelRepRate();
} catch (Exception ex) {
showException(ex);
}
}//GEN-LAST:event_spinnerBunchStateChanged
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton buttonAbort;
private javax.swing.JButton buttonCalibration;