public interface ToolService extends SingletonService<Tool>, SciJavaService
Modifier and Type | Field and Description |
---|---|
static double |
SEPARATOR_DISTANCE |
Modifier and Type | Method and Description |
---|---|
Tool |
getActiveTool() |
List<Tool> |
getAlwaysActiveTools() |
default Class<Tool> |
getPluginType()
Gets the type of plugins managed by this service.
|
default <T extends Tool> |
getTool(Class<T> toolClass)
Get a tool given its class.
|
Tool |
getTool(String name) |
List<Tool> |
getTools() |
default 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.
|
default 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.
|
default 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.
|
default void |
reportRectangle(RealCoords p1,
RealCoords p2)
Publishes rectangle dimensions in the status bar.
|
void |
setActiveTool(Tool activeTool) |
create, filterInstances, getInstance, getInstances, initialize, objectService
getPlugins, getPluginService, pluginService
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
static final double SEPARATOR_DISTANCE
default <T extends Tool> T getTool(Class<T> toolClass)
T
- the tool's typetoolClass
- the class of the tool to fetchTool getActiveTool()
void setActiveTool(Tool activeTool)
default boolean isSeparatorNeeded(Tool tool1, Tool tool2)
void reportRectangle(double x, double y, double w, double h)
default void reportRectangle(RealCoords p1, RealCoords p2)
void reportLine(double x1, double y1, double x2, double y2)
default void reportLine(RealCoords p1, RealCoords p2)
void reportPoint(double x, double y)
default void reportPoint(RealCoords p)
Copyright © 2015–2022 SciJava. All rights reserved.