Package org.scijava.tool
Interface ToolService
-
- All Superinterfaces:
Comparable<Prioritized>,Contextual,Disposable,HasPluginInfo,Identifiable,Initializable,Locatable,Logged,Prioritized,PTService<Tool>,RichPlugin,SciJavaPlugin,SciJavaService,Service,SingletonService<Tool>,Versioned
- All Known Implementing Classes:
DefaultToolService
public interface ToolService extends SingletonService<Tool>, SciJavaService
Interface for service that tracks available tools.- Author:
- Grant Harris, Curtis Rueden
-
-
Field Summary
Fields Modifier and Type Field Description static doubleSEPARATOR_DISTANCE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ToolgetActiveTool()List<Tool>getAlwaysActiveTools()default Class<Tool>getPluginType()Gets the type of plugins managed by this service.default <T extends Tool>
TgetTool(Class<T> toolClass)Get a tool given its class.ToolgetTool(String name)List<Tool>getTools()default booleanisSeparatorNeeded(Tool tool1, Tool tool2)Returns true if the two specified tools should have a separator between them on the tool bar.voidreportLine(double x1, double y1, double x2, double y2)Publishes line length and angle in the status bar.default voidreportLine(RealCoords p1, RealCoords p2)Publishes line length and angle in the status bar.voidreportPoint(double x, double y)Publishes point coordinates to the status bar.default voidreportPoint(RealCoords p)Publishes point coordinates to the status bar.voidreportRectangle(double x, double y, double w, double h)Publishes rectangle dimensions in the status bar.default voidreportRectangle(RealCoords p1, RealCoords p2)Publishes rectangle dimensions in the status bar.voidsetActiveTool(Tool activeTool)-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.PTService
getPlugins, getPluginService, pluginService
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
registerEventHandlers
-
Methods inherited from interface org.scijava.plugin.SingletonService
create, filterInstances, getInstance, getInstances, initialize, objectService
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Field Detail
-
SEPARATOR_DISTANCE
static final double SEPARATOR_DISTANCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTool
default <T extends Tool> T getTool(Class<T> toolClass)
Get a tool given its class.- Type Parameters:
T- the tool's type- Parameters:
toolClass- the class of the tool to fetch- Returns:
- the tool, or null if no such tool
-
getActiveTool
Tool getActiveTool()
-
setActiveTool
void setActiveTool(Tool activeTool)
-
isSeparatorNeeded
default boolean isSeparatorNeeded(Tool tool1, Tool tool2)
Returns true if the two specified tools should have a separator between them on the tool bar.
-
reportRectangle
void reportRectangle(double x, double y, double w, double h)Publishes rectangle dimensions in the status bar.
-
reportRectangle
default void reportRectangle(RealCoords p1, RealCoords p2)
Publishes rectangle dimensions in the status bar.
-
reportLine
void reportLine(double x1, double y1, double x2, double y2)Publishes line length and angle in the status bar.
-
reportLine
default void reportLine(RealCoords p1, RealCoords p2)
Publishes line length and angle in the status bar.
-
reportPoint
void reportPoint(double x, double y)Publishes point coordinates to the status bar.
-
reportPoint
default void reportPoint(RealCoords p)
Publishes point coordinates to the status bar.
-
-