|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSimpleTool
net.refractions.udig.tools.edit.AbstractEditTool
public abstract class AbstractEditTool
Super class for edit tools. This class delegates to the EditToolHandler which must be initialized by the subclass during construction.
Field Summary | |
---|---|
protected EditToolHandler |
handler
|
Constructor Summary | |
---|---|
AbstractEditTool()
|
Method Summary | |
---|---|
protected abstract java.lang.String |
getExtensionID()
Returns the ID of the tool as declared in the plugin.xml. |
EditToolHandler |
getHandler()
|
protected abstract void |
initAcceptBehaviours(java.util.List<Behaviour> acceptBehaviours)
Initializes the list of Behaviours to run when the current edit has been accepted. |
protected abstract void |
initActivators(java.util.Set<Activator> activators)
Initializes the list of Activators that are ran when the tool is activated and deactivated. |
protected abstract void |
initCancelBehaviours(java.util.List<Behaviour> cancelBehaviours)
Initializes the behaviours that are ran when a cancel signal is received (the ESC key). |
protected abstract void |
initEnablementBehaviours(java.util.List<EnablementBehaviour> enablementBehaviours)
Initializes the list of EnablementBehaviour s that are ran to determine if the tool is enabled given an
event. |
protected abstract void |
initEventBehaviours(EditToolConfigurationHelper helper)
Initializes the Event Behaviours that are run when an event occurs. |
protected void |
onMouseDoubleClicked(MapMouseEvent e)
|
protected void |
onMouseDragged(MapMouseEvent e)
|
protected void |
onMouseEntered(MapMouseEvent e)
|
protected void |
onMouseExited(MapMouseEvent e)
|
protected void |
onMouseHovered(MapMouseEvent e)
|
protected void |
onMouseMoved(MapMouseEvent e)
|
protected void |
onMousePressed(MapMouseEvent e)
|
protected void |
onMouseReleased(MapMouseEvent e)
|
protected void |
onMouseWheelMoved(MapMouseWheelEvent e)
|
void |
setActive(boolean active)
|
void |
setContext(IToolContext context)
|
void |
setHandler(EditToolHandler handler)
|
void |
testinitAcceptBehaviours(java.util.List<Behaviour> acceptBehaviours)
Called only by unit tests. |
void |
testinitActivators(java.util.Set<Activator> activators)
Called only by unit tests. |
void |
testinitCancelBehaviours(java.util.List<Behaviour> cancelBehaviours)
Called only by unit tests. |
void |
testinitEventBehaviours(EditToolConfigurationHelper helper)
Called only by unit tests. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EditToolHandler handler
Constructor Detail |
---|
public AbstractEditTool()
Method Detail |
---|
protected abstract void initActivators(java.util.Set<Activator> activators)
activators
- an empty list.protected abstract void initAcceptBehaviours(java.util.List<Behaviour> acceptBehaviours)
acceptBehaviours
- an empty listprotected abstract void initCancelBehaviours(java.util.List<Behaviour> cancelBehaviours)
cancelBehaviours
- an empty listprotected abstract void initEventBehaviours(EditToolConfigurationHelper helper)
helper
- a helper for constructing the complicated structure of EventBehaviours.EditToolConfigurationHelper
protected abstract void initEnablementBehaviours(java.util.List<EnablementBehaviour> enablementBehaviours)
EnablementBehaviour
s that are ran to determine if the tool is enabled given an
event. For example if the mouse cursor is outside the valid bounds of a CRS for a layer an EnablementBehaviour might
signal that editing is illegal and provide a message for the user indicating why.
enablementBehaviours
- an empty listpublic void testinitActivators(java.util.Set<Activator> activators)
public void testinitAcceptBehaviours(java.util.List<Behaviour> acceptBehaviours)
public void testinitCancelBehaviours(java.util.List<Behaviour> cancelBehaviours)
public void testinitEventBehaviours(EditToolConfigurationHelper helper)
protected abstract java.lang.String getExtensionID()
public void setContext(IToolContext context)
public void setActive(boolean active)
protected void onMouseDoubleClicked(MapMouseEvent e)
protected void onMouseDragged(MapMouseEvent e)
protected void onMouseEntered(MapMouseEvent e)
protected void onMouseExited(MapMouseEvent e)
protected void onMouseMoved(MapMouseEvent e)
protected void onMousePressed(MapMouseEvent e)
protected void onMouseReleased(MapMouseEvent e)
protected void onMouseWheelMoved(MapMouseWheelEvent e)
protected void onMouseHovered(MapMouseEvent e)
public EditToolHandler getHandler()
public void setHandler(EditToolHandler handler)
handler
- The handler to set.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |