public class DefaultToolService extends AbstractSingletonService<Tool> implements ToolService
| Constructor and Description |
|---|
DefaultToolService() |
| Modifier and Type | Method and Description |
|---|---|
Tool |
getActiveTool() |
List<Tool> |
getAlwaysActiveTools() |
Class<Tool> |
getPluginType()
Gets the type of plugins managed by this service.
|
<T extends Tool> |
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.
|
protected void |
onEvent(KyPressedEvent event) |
protected void |
onEvent(KyReleasedEvent event) |
protected void |
onEvent(MsClickedEvent event) |
protected void |
onEvent(MsDraggedEvent event) |
protected void |
onEvent(MsMovedEvent event) |
protected void |
onEvent(MsPressedEvent event) |
protected void |
onEvent(MsReleasedEvent event) |
protected void |
onEvent(MsWheelEvent event) |
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) |
create, filterInstances, getInstance, getInstances, initializegetPlugins, getPluginServicedispose, getContext, registerEventHandlers, setContext, toStringcompareTo, getInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInstance, getInstancescreate, getPlugins, getPluginServiceinitialize, registerEventHandlerscontext, getContext, setContextgetPriority, setPrioritycompareTogetInfo, setInfodisposepublic Tool getTool(String name)
getTool in interface ToolServicepublic <T extends Tool> T getTool(Class<T> toolClass)
ToolServicegetTool in interface ToolServiceT - the tool's typetoolClass - the class of the tool to fetchpublic List<Tool> getTools()
getTools in interface ToolServicepublic List<Tool> getAlwaysActiveTools()
getAlwaysActiveTools in interface ToolServicepublic Tool getActiveTool()
getActiveTool in interface ToolServicepublic void setActiveTool(Tool activeTool)
setActiveTool in interface ToolServicepublic boolean isSeparatorNeeded(Tool tool1, Tool tool2)
ToolServiceisSeparatorNeeded in interface ToolServicepublic void reportRectangle(double x,
double y,
double w,
double h)
ToolServicereportRectangle in interface ToolServicepublic void reportRectangle(RealCoords p1, RealCoords p2)
ToolServicereportRectangle in interface ToolServicepublic void reportLine(double x1,
double y1,
double x2,
double y2)
ToolServicereportLine in interface ToolServicepublic void reportLine(RealCoords p1, RealCoords p2)
ToolServicereportLine in interface ToolServicepublic void reportPoint(double x,
double y)
ToolServicereportPoint in interface ToolServicepublic void reportPoint(RealCoords p)
ToolServicereportPoint in interface ToolServicepublic Class<Tool> getPluginType()
PTServicegetPluginType in interface PTService<Tool>protected void onEvent(KyPressedEvent event)
protected void onEvent(KyReleasedEvent event)
protected void onEvent(MsPressedEvent event)
protected void onEvent(MsReleasedEvent event)
protected void onEvent(MsClickedEvent event)
protected void onEvent(MsMovedEvent event)
protected void onEvent(MsDraggedEvent event)
protected void onEvent(MsWheelEvent event)
Copyright © 2009–2016 SciJava. All rights reserved.