public abstract class AbstractTool extends Object implements Tool
Constructor and Description |
---|
AbstractTool(InputSlot... activationSlots) |
Modifier and Type | Method and Description |
---|---|
void |
activate(ToolContext tc)
This method is called when the tool gets activated.
|
void |
addCurrentSlot(InputSlot slot)
add an inputslot to the list without a description
|
void |
deactivate(ToolContext tc)
this method is called when the tool was activate and the
AxisState of the activation slot changes to AxisState.RELEASED - to zero.
|
boolean |
equals(Object obj) |
String |
fullDescription() |
List<InputSlot> |
getActivationSlots()
If the result is empty, then the tool is always active.
|
List<InputSlot> |
getCurrentSlots()
This method will only be called for active tools.
|
String |
getDescription()
Gives an overall description of this Tool.
|
String |
getDescription(InputSlot slot)
Gives a description of the meaning of the given InputSlot.
|
int |
hashCode() |
void |
perform(ToolContext tc)
This method is called when the tool is activated and any
AxisState or TransformationMatrix of the current slots changes.
|
void |
removeCurrentSlot(InputSlot slot) |
void |
setDescription(String description) |
public AbstractTool(InputSlot... activationSlots)
public List<InputSlot> getActivationSlots()
Tool
InputSlot
s must be associated to
AxisState
s, otherwise the Tool will never become active.
AxisState.RELEASED
.
Tool
s down the path.
The result must remain constant.getActivationSlots
in interface Tool
public List<InputSlot> getCurrentSlots()
Tool
activate(..)
or perform(..)
.getCurrentSlots
in interface Tool
public void addCurrentSlot(InputSlot slot)
slot
- public void removeCurrentSlot(InputSlot slot)
public void activate(ToolContext tc)
Tool
public void perform(ToolContext tc)
Tool
public void deactivate(ToolContext tc)
Tool
deactivate
in interface Tool
tc
- The current tool contextpublic String fullDescription()
public String getDescription(InputSlot slot)
Tool
getDescription
in interface Tool
slot
- to describepublic String getDescription()
Tool
getDescription
in interface Tool
public void setDescription(String description)