|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.refractions.udig.tools.edit.behaviour.MoveVertexBehaviour
public class MoveVertexBehaviour
Mode that moves Vertices
Requirements:
MouseTracker.getDragStarted()
is over selected
vertex (if not all vertices are selected)MouseTracker.getDragStarted()
must be within the
geometry.
Action:
VertexSelectorBehaviour
to location in
net.refractions.udig.project.ui.render.displayAdapter.MapMouseEvent
Nested Class Summary | |
---|---|
class |
MoveVertexBehaviour.PositionTracker
|
Constructor Summary | |
---|---|
MoveVertexBehaviour()
|
Method Summary | |
---|---|
protected void |
doMove(int deltaX,
int deltaY,
EditToolHandler handler,
EditBlackboard editBlackboard2,
Selection selectionToMove)
|
UndoableMapCommand |
getCommand(EditToolHandler handler,
MapMouseEvent e,
EventType eventType)
The action to be performed by this EventBehaviour. |
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. |
protected Selection |
getPointsToMove(EditToolHandler handler,
EditBlackboard blackboard)
Returns the points that will be moved. |
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. |
protected boolean |
isSnappingValid()
Returns true if snapping should be used. |
boolean |
isValid(EditToolHandler handler,
MapMouseEvent e,
EventType eventType)
Called to determine whether this EventBehaviour is applicable and should be run. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoveVertexBehaviour()
Method Detail |
---|
public boolean isValid(EditToolHandler handler, MapMouseEvent e, EventType eventType)
EventBehaviour
isValid
in interface EventBehaviour
handler
- handler that calls this Behavioure
- mouse event that just occurred.eventType
- the type of event that just occurred
public UndoableMapCommand getCommand(EditToolHandler handler, MapMouseEvent e, EventType eventType)
EventBehaviour
getCommand
in interface EventBehaviour
handler
- handler that calls this Behavioure
- Event that occurred.eventType
- The type of event that has occurred
protected void doMove(int deltaX, int deltaY, EditToolHandler handler, EditBlackboard editBlackboard2, Selection selectionToMove)
protected boolean isSnappingValid()
protected Selection getPointsToMove(EditToolHandler handler, EditBlackboard blackboard)
handler
-
public void handleError(EditToolHandler handler, java.lang.Throwable error, UndoableMapCommand command)
EventBehaviour
This method should
handleError
in interface EventBehaviour
handler
- handler that calls this Behaviourerror
- Error that occurredcommand
- Command retrieved from getCommandMethod. May be null if exception occurred while
executing getCommand();public java.lang.Object getKey(EditToolHandler handler)
LockingBehaviour
EditToolHandler
has as its lock this object may unlock the EditToolHandler and is also permitted
to run.
getKey
in interface LockingBehaviour
handler
- handler that is calling getKey.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |