org.scijava.tool
Interface ToolService

All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, Prioritized, PTService<Tool>, RichPlugin, SciJavaPlugin, SciJavaService, Service, SingletonService<Tool>
All Known Implementing Classes:
DefaultToolService

public interface ToolService
extends SingletonService<Tool>, SciJavaService

Interface for service that tracks available tools.

Author:
Grant Harris, Curtis Rueden

Method Summary
 Tool getActiveTool()
           
 List<Tool> getAlwaysActiveTools()
           
<T extends Tool>
T
getTool(Class<T> toolClass)
          Get a tool given its class.
 Tool getTool(String name)
           
 List<Tool> getTools()
           
 boolean isSeparatorNeeded(Tool tool1, Tool tool2)
          Returns true if the two specified tools should have a separator between them on the tool bar.
 void reportLine(double x1, double y1, double x2, double y2)
          Publishes line length and angle in the status bar.
 void reportLine(RealCoords p1, RealCoords p2)
          Publishes line length and angle in the status bar.
 void reportPoint(double x, double y)
          Publishes point coordinates to the status bar.
 void reportPoint(RealCoords p)
          Publishes point coordinates to the status bar.
 void reportRectangle(double x, double y, double w, double h)
          Publishes rectangle dimensions in the status bar.
 void reportRectangle(RealCoords p1, RealCoords p2)
          Publishes rectangle dimensions in the status bar.
 void setActiveTool(Tool activeTool)
           
 
Methods inherited from interface org.scijava.plugin.SingletonService
getInstance, getInstances
 
Methods inherited from interface org.scijava.plugin.PTService
create, getPlugins, getPluginService, getPluginType
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
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
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Method Detail

getTool

Tool getTool(String name)

getTool

<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

getTools

List<Tool> getTools()

getAlwaysActiveTools

List<Tool> getAlwaysActiveTools()

getActiveTool

Tool getActiveTool()

setActiveTool

void setActiveTool(Tool activeTool)

isSeparatorNeeded

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

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

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

void reportPoint(RealCoords p)
Publishes point coordinates to the status bar.



Copyright © 2009–2015 SciJava. All rights reserved.