|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventBehaviour
This is a Stategy object for the (@link net.refractions.udig.tools.edit.latest.EditToolHandler} behaviour. Each EventBehavior is valid in a particular context and will be run by the (@link net.refractions.udig.tools.edit.latest.EditToolHandler} if the isValid method returns true.
An example is a SelectGeometryBehaviour.
Context: EditState is MODIFYING, EventType is RELEASED, mouse button is button 1 and no keys are pressed.
Action: If mouse is over a feature add the Geometry to the EditBlackBoard and set the EditToolHandler's current Geometry and Shape.
Error handling: If exception occurs reset the EditBlackBoard and current Geometry and shape
Method Summary | |
---|---|
UndoableMapCommand |
getCommand(EditToolHandler handler,
MapMouseEvent e,
EventType eventType)
The action to be performed by this EventBehaviour. |
void |
handleError(EditToolHandler handler,
java.lang.Throwable error,
UndoableMapCommand command)
This method is called if an exception occurs during the execution of the run method. |
boolean |
isValid(EditToolHandler handler,
MapMouseEvent e,
EventType eventType)
Called to determine whether this EventBehaviour is applicable and should be run. |
Method Detail |
---|
boolean isValid(EditToolHandler handler, MapMouseEvent e, EventType eventType)
handler
- handler that calls this Behavioure
- mouse event that just occurred.eventType
- the type of event that just occurred
UndoableMapCommand getCommand(EditToolHandler handler, MapMouseEvent e, EventType eventType)
handler
- handler that calls this Behavioure
- Event that occurred.eventType
- The type of event that has occurred
void handleError(EditToolHandler handler, java.lang.Throwable error, UndoableMapCommand command)
This method should
handler
- handler that calls this Behaviourerror
- Error that occurredcommand
- Command retrieved from getCommandMethod. May be null if exception occurred while
executing getCommand();
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |