This commit is contained in:
gac-iss
2025-08-27 14:39:33 +02:00
parent d932909a42
commit 15a078458e
5 changed files with 18 additions and 38 deletions

28
pom.xml
View File

@@ -26,31 +26,17 @@
<name>Default Repository</name>
<layout>default</layout>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
<repository>
<id>freehep</id>
<name>freehep</name>
<url>http://java.freehep.org/maven2/</url>
</repository>
<repository>
<id>imagej</id>
<name>imagej</name>
<url>http://maven.imagej.net/content/repositories/public</url>
</repository>
</repository>
</repositories>
<name>Scienta</name>
<dependencies>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pshell</artifactId>
<version>1.19.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jcae</artifactId>
<version>2.9.7</version>
<artifactId>pshell-workbench</artifactId>
<version>2.0.0</version>
<scope>system</scope>
<systemPath>C:\Dev\pshell\lib\pshell-workbench-2.0.0-fat.jar</systemPath>
</dependency>
</dependencies>
<build>

View File

@@ -1,11 +1,9 @@
import ch.psi.jcae.ChannelException;
import ch.psi.pshell.device.AccessType;
import ch.psi.pshell.device.ArrayCalibration;
import ch.psi.pshell.device.CameraImageDescriptor;
import ch.psi.pshell.device.MatrixCalibration;
import ch.psi.pshell.device.Device;
import ch.psi.pshell.device.DeviceAdapter;
import ch.psi.pshell.device.DeviceListener;
import ch.psi.pshell.device.Readable.ReadableCalibratedArray;
import java.io.IOException;
@@ -13,9 +11,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import ch.psi.pshell.epics.*;
import ch.psi.utils.State;
import java.util.concurrent.ExecutionException;
import java.util.logging.Logger;
/**
* Implementation of Scienta spectrometer analyser.
@@ -72,7 +67,7 @@ public class Scienta extends AreaDetector {
totalDataPoints = new ChannelInteger(name + " total points", channelCtrl + ":TOTAL_DATA_POINTS_RBV", false);
totalDataPoints.setAccessType(AccessType.Read);
totalDataPoints.addListener(new DeviceAdapter() {
totalDataPoints.addListener(new DeviceListener() {
@Override
public void onValueChanged(Device device, Object value, Object former) {
try {
@@ -129,7 +124,7 @@ public class Scienta extends AreaDetector {
stats[4] = new Stats("Counts", 5);
addChildren(stats);
stepTime.addListener(new DeviceAdapter() {
stepTime.addListener(new DeviceListener() {
@Override
public void onValueChanged(Device device, Object value, Object former) {
int time_ms = (int) (((Double) value) * 1000);
@@ -149,7 +144,7 @@ public class Scienta extends AreaDetector {
}
});
frames.addListener(new DeviceAdapter() {
frames.addListener(new DeviceListener() {
@Override
public void onValueChanged(Device device, Object value, Object former) {
int num_frames = (Integer)value;

View File

@@ -1,13 +1,12 @@
import ch.psi.pshell.device.Device;
import ch.psi.pshell.device.DeviceAdapter;
import ch.psi.pshell.device.DeviceBase.DeviceInvalidParameterException;
import ch.psi.pshell.device.DeviceListener;
import ch.psi.pshell.plot.LinePlotSeries;
import ch.psi.pshell.plot.Plot;
import ch.psi.utils.State;
import ch.psi.utils.swing.SwingUtils;
import ch.psi.pshell.utils.State;
import ch.psi.pshell.swing.SwingUtils;
import java.awt.Component;
import java.io.IOException;
import java.util.logging.Level;
@@ -121,7 +120,7 @@ public final class ScientaPanel extends DevicePanel {
}
}
DeviceListener progressListener = new DeviceAdapter() {
DeviceListener progressListener = new DeviceListener() {
@Override
public void onValueChanged(final Device device, final Object value, final Object former) {
SwingUtilities.invokeLater(() -> {
@@ -131,7 +130,7 @@ public final class ScientaPanel extends DevicePanel {
}
};
DeviceListener spectrumListener = new DeviceAdapter() {
DeviceListener spectrumListener = new DeviceListener() {
@Override
public void onValueChanged(final Device device, final Object value, final Object former) {
SwingUtilities.invokeLater(() -> {

View File

@@ -1,5 +1,5 @@
import ch.psi.pshell.core.Context;
import ch.psi.utils.swing.StandardDialog;
import ch.psi.pshell.framework.Context;
import ch.psi.pshell.swing.StandardDialog;
import java.awt.Window;
import java.util.Map;
@@ -40,7 +40,7 @@ public class ScientaParametersDialog extends StandardDialog {
}
public void showDeviceData(){
parametersPanel.setDevice(Context.getInstance().getDevicePool().getByName("scienta", Scienta.class));
parametersPanel.setDevice(Context.getDevicePool().getByName("scienta", Scienta.class));
}
/**

View File

@@ -3,7 +3,7 @@ import ch.psi.pshell.device.DeviceBase.DeviceInvalidParameterException;
import ch.psi.pshell.plot.LinePlotSeries;
import ch.psi.pshell.swing.DevicePanel;
import ch.psi.pshell.swing.ValueSelection;
import ch.psi.utils.swing.SwingUtils;
import ch.psi.pshell.swing.SwingUtils;
import java.awt.Component;
import java.io.IOException;
import java.util.HashMap;