| net.refractions.udig.tools.edit.EventBehaviour
All known Subclasses: net.refractions.udig.tools.edit.behaviour.StartEditingBehaviour, net.refractions.udig.tools.edit.behaviour.AcceptBehaviour, net.refractions.udig.tools.edit.behaviour.SelectHoleBehaviour, net.refractions.udig.tools.edit.behaviour.AcceptWhenOverFirstVertexBehaviour, net.refractions.udig.tools.edit.behaviour.StartHoleCuttingBehaviour, net.refractions.udig.tools.edit.OrderedCompositeEventBehavior, net.refractions.udig.tools.edit.behaviour.CursorControlBehaviour, net.refractions.udig.tools.edit.behaviour.ExtendLineBehaviour, net.refractions.udig.tools.edit.behaviour.SelectGeometryBehaviour, net.refractions.udig.tools.edit.behaviour.DoubleClickRunAcceptBehaviour, net.refractions.udig.tools.edit.behaviour.AddVertexWhileCreatingBehaviour, net.refractions.udig.tools.edit.behaviour.MoveVertexBehaviour, net.refractions.udig.tools.edit.behaviour.SetSnapSizeBehaviour, net.refractions.udig.tools.edit.behaviour.VertexSelectorBehaviour, net.refractions.udig.tools.edit.behaviour.ShapeCreationBehaviour, net.refractions.udig.tools.edit.behaviour.AddVertexOnEdgeBehaviour, net.refractions.udig.tools.edit.AdvancedFeaturesEventBehavior, net.refractions.udig.tools.edit.behaviour.RemoveVertexBehaviour, net.refractions.udig.tools.edit.MutualExclusiveEventBehavior, net.refractions.udig.tools.edit.behaviour.MouseDownVertexSelectorBehaviour, net.refractions.udig.tools.edit.behaviour.DrawCreateVertexSnapAreaBehaviour,
EventBehaviour | public interface EventBehaviour (Code) | | 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
author: jones since: 1.1.0 |
getCommand | public UndoableMapCommand getCommand(EditToolHandler handler, MapMouseEvent e, EventType eventType)(Code) | | The action to be performed by this EventBehaviour. This action takes place in the event thread so it must
perform VERY quickly.
Parameters: handler - handler that calls this Behaviour Parameters: e - Event that occurred. Parameters: eventType - The type of event that has occurred Command that will be executed in order to perform the behaviour |
handleError | public void handleError(EditToolHandler handler, Throwable error, UndoableMapCommand command)(Code) | | This method is called if an exception occurs during the execution of the run method.
This method should
- Rollback the changes made during the run method
- Log the error in the plugin's log
Parameters: handler - handler that calls this Behaviour Parameters: error - Error that occurred Parameters: command - Command retrieved from getCommandMethod. May be null if exception occurred whileexecuting getCommand(); |
isValid | public boolean isValid(EditToolHandler handler, MapMouseEvent e, EventType eventType)(Code) | | Called to determine whether this EventBehaviour is applicable and should be run.
Parameters: handler - handler that calls this Behaviour Parameters: e - mouse event that just occurred. Parameters: eventType - the type of event that just occurred true if this mode is applicable and should be run. |
|
|