08 2025
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user