- java.lang.Object
-
- ij.plugin.EventListener
-
- All Implemented Interfaces:
CommandListener
,RoiListener
,IJEventListener
,ImageListener
,PlugIn
public class EventListener extends java.lang.Object implements PlugIn, IJEventListener, ImageListener, RoiListener, CommandListener
This plugin implements the Plugins/Utilities/Monitor Events command. By implementing the IJEventListener, CommandListener, ImageListener and RoiListener interfaces, it is able to monitor foreground and background color changes, tool switches, Log window closings, command executions, image window openings, closings and updates, and ROI changes.
-
-
Field Summary
-
Fields inherited from interface ij.IJEventListener
BACKGROUND_COLOR_CHANGED, COLOR_PICKER_CLOSED, FOREGROUND_COLOR_CHANGED, LOG_WINDOW_CLOSED, TOOL_CHANGED
-
-
Constructor Summary
Constructors Constructor Description EventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
commandExecuting(java.lang.String command)
void
eventOccurred(int eventID)
void
imageClosed(ImagePlus imp)
void
imageOpened(ImagePlus imp)
void
imageSaved(ImagePlus imp)
void
imageUpdated(ImagePlus imp)
void
roiModified(ImagePlus img, int id)
void
run(java.lang.String arg)
This method is called when the plugin is loaded.
-
-
-
Method Detail
-
run
public void run(java.lang.String arg)
Description copied from interface:PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.
-
eventOccurred
public void eventOccurred(int eventID)
- Specified by:
eventOccurred
in interfaceIJEventListener
-
imageOpened
public void imageOpened(ImagePlus imp)
- Specified by:
imageOpened
in interfaceImageListener
-
imageClosed
public void imageClosed(ImagePlus imp)
- Specified by:
imageClosed
in interfaceImageListener
-
imageUpdated
public void imageUpdated(ImagePlus imp)
- Specified by:
imageUpdated
in interfaceImageListener
-
imageSaved
public void imageSaved(ImagePlus imp)
-
commandExecuting
public java.lang.String commandExecuting(java.lang.String command)
- Specified by:
commandExecuting
in interfaceCommandListener
-
roiModified
public void roiModified(ImagePlus img, int id)
- Specified by:
roiModified
in interfaceRoiListener
-
-