diff --git a/plugins/Microscope.form b/plugins/Microscope.form index 6a19664..f951867 100644 --- a/plugins/Microscope.form +++ b/plugins/Microscope.form @@ -45,13 +45,13 @@ - + - + diff --git a/plugins/Microscope.java b/plugins/Microscope.java index 8f9cada..d57c6cf 100644 --- a/plugins/Microscope.java +++ b/plugins/Microscope.java @@ -7,11 +7,10 @@ import ch.psi.pshell.imaging.Overlays; import ch.psi.pshell.imaging.Pen; import ch.psi.pshell.imaging.Renderer; import ch.psi.pshell.imaging.RendererListener; -import ch.psi.pshell.imaging.Source; import ch.psi.pshell.ui.Panel; import ch.psi.utils.State; import java.awt.Color; -import java.awt.Point; +import java.nio.file.Paths; import java.util.logging.Level; /** @@ -25,7 +24,7 @@ public class Microscope extends Panel { //Overridable callbacks @Override public void onInitialize(int runCount) { - + renderer.setPersistenceFile(Paths.get(getController().getSetup().getContextPath(), "BeamMarker.bin")); } @Override @@ -119,13 +118,13 @@ public class Microscope extends Panel { .addGap(5, 5, 5)) .addGroup(layout.createSequentialGroup() .addComponent(motorPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addGap(18, 18, 18) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(motorPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(processVariablePanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(processVariablePanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 97, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE) .addComponent(buttonDefineBeam) .addGap(26, 26, 26)) ); @@ -149,7 +148,7 @@ public class Microscope extends Panel { beam.setPen(pen); beam.setSolid(false); beam.setMovable(true); - renderer.addOverlay(beam); + renderer.setMarker(beam); } } catch (Exception ex) { getLogger().log(Level.WARNING, null, ex);