diff --git a/pom.xml b/pom.xml index b290e13..f9e4e67 100644 --- a/pom.xml +++ b/pom.xml @@ -26,31 +26,17 @@ Default Repository default https://repo.maven.apache.org/maven2/ - - - - freehep - freehep - http://java.freehep.org/maven2/ - - - - imagej - imagej - http://maven.imagej.net/content/repositories/public - + Scienta - + + ${project.groupId} - pshell - 1.19.0 - - - ${project.groupId} - jcae - 2.9.7 + pshell-workbench + 2.0.0 + system + C:\Dev\pshell\lib\pshell-workbench-2.0.0-fat.jar diff --git a/src/main/java/Scienta.java b/src/main/java/Scienta.java index ebe1c27..c5a36b6 100644 --- a/src/main/java/Scienta.java +++ b/src/main/java/Scienta.java @@ -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; diff --git a/src/main/java/ScientaPanel.java b/src/main/java/ScientaPanel.java index 3adf8ed..5285c09 100644 --- a/src/main/java/ScientaPanel.java +++ b/src/main/java/ScientaPanel.java @@ -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(() -> { diff --git a/src/main/java/ScientaParametersDialog.java b/src/main/java/ScientaParametersDialog.java index 8ceab4e..223609d 100644 --- a/src/main/java/ScientaParametersDialog.java +++ b/src/main/java/ScientaParametersDialog.java @@ -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)); } /** diff --git a/src/main/java/ScientaParametersPanel.java b/src/main/java/ScientaParametersPanel.java index 48253fa..2516ab4 100644 --- a/src/main/java/ScientaParametersPanel.java +++ b/src/main/java/ScientaParametersPanel.java @@ -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;