This commit is contained in:
gobbo_a
2025-08-13 10:42:02 +02:00
parent 57a34c30d4
commit 8c69a5e83a
29 changed files with 526 additions and 130 deletions

View File

@@ -6,6 +6,8 @@ import ch.psi.pshell.core.Context;
import ch.psi.pshell.plot.LinePlot;
import ch.psi.pshell.plot.LinePlotSeries;
import ch.psi.pshell.ui.Panel;
import ch.psi.pshell.ui.App;
import ch.psi.pshell.ui.AppListener;
import ch.psi.utils.State;
import ch.psi.utils.swing.SwingUtils;
import java.awt.Color;
@@ -28,6 +30,20 @@ public class BunchLength extends Panel {
plot12.setStyle(LinePlot.Style.Normal);
plot21.setStyle(LinePlot.Style.ErrorY);
plot22.setStyle(LinePlot.Style.Normal);
App.getInstance().addListener(new AppListener() {
public boolean canExit(Object source) {
if (getState()==State.Ready){
ArrayList parameters = new ArrayList();
parameters.add(spinnerStation.getValue());
try {
run("Tools/BunchLengthRestore", parameters);
} catch (Exception ex) {
showException(ex);
}
}
return true;
}
});
}
//Overridable callbacks