org.scijava.tool
Class AbstractTool

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.tool.AbstractTool
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, HasPluginInfo, RichPlugin, SciJavaPlugin, SingletonPlugin, Prioritized, Tool
Direct Known Subclasses:
DummyTool

public abstract class AbstractTool
extends AbstractRichPlugin
implements Tool

Abstract base class for ImageJ tools.

Author:
Curtis Rueden, Grant Harris

Constructor Summary
AbstractTool()
           
 
Method Summary
 void activate()
          Informs the tool that it is now active.
 void configure()
          Occurs when the user right clicks this tool's icon.
 void deactivate()
          Informs the tool that it is no longer active.
 MouseCursor getCursor()
          The tool's mouse pointer.
 String getDescription()
          Returns the text the tool provides when mouse hovers over tool
 boolean isActiveInAppFrame()
          When true, tool receives events when the main ImageJ application frame is active.
 boolean isAlwaysActive()
          When true, tool has no button but rather is active all the time.
 void onKeyDown(KyPressedEvent evt)
          Occurs when a key on the keyboard is pressed while the tool is active.
 void onKeyUp(KyReleasedEvent evt)
          Occurs when a key on the keyboard is released while the tool is active.
 void onMouseClick(MsClickedEvent evt)
          Occurs when a mouse button is double clicked while the tool is active.
 void onMouseDown(MsPressedEvent evt)
          Occurs when a mouse button is pressed while the tool is active.
 void onMouseDrag(MsDraggedEvent evt)
          Occurs when the mouse is dragged while the tool is active.
 void onMouseMove(MsMovedEvent evt)
          Occurs when the mouse is moved while the tool is active.
 void onMouseUp(MsReleasedEvent evt)
          Occurs when a mouse button is released while the tool is active.
 void onMouseWheel(MsWheelEvent evt)
          Occurs when the mouse wheel is moved while the tool is active.
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority, toString
 
Methods inherited from class org.scijava.AbstractContextual
context, getContext, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 

Constructor Detail

AbstractTool

public AbstractTool()
Method Detail

isAlwaysActive

public boolean isAlwaysActive()
Description copied from interface: Tool
When true, tool has no button but rather is active all the time.

Specified by:
isAlwaysActive in interface Tool

isActiveInAppFrame

public boolean isActiveInAppFrame()
Description copied from interface: Tool
When true, tool receives events when the main ImageJ application frame is active. When false, tool only receives events when a display window is active.

Specified by:
isActiveInAppFrame in interface Tool

getCursor

public MouseCursor getCursor()
Description copied from interface: Tool
The tool's mouse pointer.

Specified by:
getCursor in interface Tool

activate

public void activate()
Description copied from interface: Tool
Informs the tool that it is now active.

Specified by:
activate in interface Tool

deactivate

public void deactivate()
Description copied from interface: Tool
Informs the tool that it is no longer active.

Specified by:
deactivate in interface Tool

onKeyDown

public void onKeyDown(KyPressedEvent evt)
Description copied from interface: Tool
Occurs when a key on the keyboard is pressed while the tool is active.

Specified by:
onKeyDown in interface Tool

onKeyUp

public void onKeyUp(KyReleasedEvent evt)
Description copied from interface: Tool
Occurs when a key on the keyboard is released while the tool is active.

Specified by:
onKeyUp in interface Tool

onMouseDown

public void onMouseDown(MsPressedEvent evt)
Description copied from interface: Tool
Occurs when a mouse button is pressed while the tool is active.

Specified by:
onMouseDown in interface Tool

onMouseUp

public void onMouseUp(MsReleasedEvent evt)
Description copied from interface: Tool
Occurs when a mouse button is released while the tool is active.

Specified by:
onMouseUp in interface Tool

onMouseClick

public void onMouseClick(MsClickedEvent evt)
Description copied from interface: Tool
Occurs when a mouse button is double clicked while the tool is active.

Specified by:
onMouseClick in interface Tool

onMouseMove

public void onMouseMove(MsMovedEvent evt)
Description copied from interface: Tool
Occurs when the mouse is moved while the tool is active.

Specified by:
onMouseMove in interface Tool

onMouseDrag

public void onMouseDrag(MsDraggedEvent evt)
Description copied from interface: Tool
Occurs when the mouse is dragged while the tool is active.

Specified by:
onMouseDrag in interface Tool

onMouseWheel

public void onMouseWheel(MsWheelEvent evt)
Description copied from interface: Tool
Occurs when the mouse wheel is moved while the tool is active.

Specified by:
onMouseWheel in interface Tool

configure

public void configure()
Description copied from interface: Tool
Occurs when the user right clicks this tool's icon.

Specified by:
configure in interface Tool

getDescription

public String getDescription()
Description copied from interface: Tool
Returns the text the tool provides when mouse hovers over tool

Specified by:
getDescription in interface Tool


Copyright © 2009–2014 SciJava. All rights reserved.