|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LockingBehaviour
An extension interface allowing an EventBehaviour to Lock the tool handler.
Certain types of events need to be able to "lock" the tool handler so that it is the only event getting events until it "unlocks" the tool handler.
Example:
The Polygon tool has a BoxSelection behaviour that accepts drag events and draws a rectangle until the mouse is released (at that point it selects the vertices that are with the box).
The Polygon tool also has a move geometry behaviour that moves the geometry when the mouse
is dragged over an EditGeom
.
Given these two behaviours the following case can occur: The mouse is pressed (not over a geometry) and the BoxSelection behaviour starts drawing the selection box. The mouse drags over a Geometry and the MoveGeometry behaviour starts as well.
One solution is to put both behaviours in a MutualExclusiveEventBehavior
so that if the BoxSelection
behaviour is running then the MoveGeometryBehaviour won't. However if the MoveGeometryBehaviour
starts then the BoxSelection behaviour may as well.
Method Summary | |
---|---|
java.lang.Object |
getKey(EditToolHandler handler)
If the object returned by getKey() is the same as the object that the EditToolHandler
has as its lock this object may unlock the EditToolHandler and is also permitted
to run. |
Methods inherited from interface net.refractions.udig.tools.edit.EventBehaviour |
---|
getCommand, handleError, isValid |
Method Detail |
---|
java.lang.Object getKey(EditToolHandler handler)
EditToolHandler
has as its lock this object may unlock the EditToolHandler and is also permitted
to run.
handler
- handler that is calling getKey.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |