public class DefaultToolService extends AbstractSingletonService<Tool> implements ToolService
SEPARATOR_DISTANCE
Constructor and Description |
---|
DefaultToolService() |
Modifier and Type | Method and Description |
---|---|
Tool |
getActiveTool() |
List<Tool> |
getAlwaysActiveTools() |
Tool |
getTool(String name) |
List<Tool> |
getTools() |
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 |
reportPoint(double x,
double y)
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 |
setActiveTool(Tool activeTool) |
getInstance, getInstances, objectService, onEvent, onEvent
pluginService
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPluginType, getTool, isSeparatorNeeded, reportLine, reportPoint, reportRectangle
create, filterInstances, getInstance, getInstances, initialize, objectService
getPlugins, getPluginService, pluginService
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public Tool getTool(String name)
getTool
in interface ToolService
public List<Tool> getTools()
getTools
in interface ToolService
public List<Tool> getAlwaysActiveTools()
getAlwaysActiveTools
in interface ToolService
public Tool getActiveTool()
getActiveTool
in interface ToolService
public void setActiveTool(Tool activeTool)
setActiveTool
in interface ToolService
public void reportRectangle(double x, double y, double w, double h)
ToolService
reportRectangle
in interface ToolService
public void reportLine(double x1, double y1, double x2, double y2)
ToolService
reportLine
in interface ToolService
public void reportPoint(double x, double y)
ToolService
reportPoint
in interface ToolService
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 © 2015–2022 SciJava. All rights reserved.