Skip to content

Commit

Permalink
[Plugins] Restore the pgFocus plugin.
Browse files Browse the repository at this point in the history
Completely untested, as it appears to require components that I don't have
access too, but the conversion was straightforward so I doubt anything broke.
  • Loading branch information
Chris Weisiger committed Aug 27, 2015
1 parent 6e1c66f commit 8f22ada
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
1 change: 1 addition & 0 deletions plugins/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ nobase_mmplugin_DATA = \
MMTracker.jar \
MultiChannelShading.jar \
PatternOverlay.jar \
pgFocus.jar \
PixelCalibrator.jar \
Projector.jar \
Recall.jar \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<project name="pgFocus" default="jar">
<property name="plugin.path" value="Device_Control"/>

<import file="../javapluginbuild.xml"/>

<target name="copy-files" depends="mm.javabuild.copy-files">
Expand Down
40 changes: 23 additions & 17 deletions plugins/pgFocus/src/main/java/edu/umassmed/pgFocus/pgFocus.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package edu.umassmed.pgfocus;

import mmcorej.CMMCore;
import org.micromanager.MMPlugin;
import org.micromanager.MenuPlugin;
import org.micromanager.Studio;

import org.jfree.ui.RefineryUtilities;

import org.scijava.plugin.Plugin;
import org.scijava.plugin.SciJavaPlugin;

/**
*
* @author Karl Bellve
Expand All @@ -15,7 +18,8 @@
*
*/

public class pgFocus implements MMPlugin {
@Plugin(type = MenuPlugin.class)
public class pgFocus implements MenuPlugin, SciJavaPlugin {
public static final String menuName = "pgFocus";
public static final String tooltipDescription =
"Control the pgFocus open-source software and open hardware " +
Expand All @@ -25,10 +29,14 @@ public class pgFocus implements MMPlugin {
private Studio gui_;
private pgFocusFrame myFrame_;

@Override
public void setApp(Studio app) {
@Override
public void setContext(Studio app) {
gui_ = app;
setCore_(app.getCMMCore());
}

@Override
public void onPluginSelected() {
if (myFrame_ == null) {
try {
myFrame_ = new pgFocusFrame(gui_);
Expand All @@ -42,25 +50,23 @@ public void setApp(Studio app) {
myFrame_.setVisible(true);
}


@Override
public void dispose() {
if (myFrame_ != null)
myFrame_.safePrefs();
@Override
public String getName() {
return menuName;
}

@Override
public void show() {
// String ig = "pgFocus focus stabilization";
@Override
public String getSubMenu() {
return "Device Control";
}

@Override
public String getInfo () {
return "pgFocus Plugin";
public void dispose() {
if (myFrame_ != null)
myFrame_.safePrefs();
}

@Override
public String getDescription() {
@Override
public String getHelpText() {
return tooltipDescription;
}

Expand Down

0 comments on commit 8f22ada

Please sign in to comment.