net.refractions.udig.tools.edit.commands
Class MoveVertexCommand

java.lang.Object
  extended by AbstractCommand
      extended by net.refractions.udig.tools.edit.commands.MoveVertexCommand

public class MoveVertexCommand
extends AbstractCommand

Moves Vertex in the EditBlackboard

Since:
1.1.0
Author:
jones

Constructor Summary
MoveVertexCommand(EditBlackboard bb, Point src, Point dest)
           
 
Method Summary
 java.lang.String getName()
           
 void rollback(IProgressMonitor monitor)
           
 void run(IProgressMonitor monitor)
           
 void setRedoUndoOnly(boolean redoUndoOnly)
          This determines whether the first time the method is ran whether it will do anything.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoveVertexCommand

public MoveVertexCommand(EditBlackboard bb,
                         Point src,
                         Point dest)
Parameters:
bb - blackboard to manipulate
src - point to move
dest - where to move point.
coords - the coords to move from the src point location. If null all points will be moved.
Method Detail

run

public void run(IProgressMonitor monitor)
         throws java.lang.Exception
Throws:
java.lang.Exception

getName

public java.lang.String getName()

rollback

public void rollback(IProgressMonitor monitor)
              throws java.lang.Exception
Throws:
java.lang.Exception

setRedoUndoOnly

public void setRedoUndoOnly(boolean redoUndoOnly)
This determines whether the first time the method is ran whether it will do anything.

In the case of the MoveVertex behaviour the vertices are moved little by little, pixel by pixel often. So undoing and redoing all that would be pointless. For those cases this command has a RedoUndoOnly parameter so that when the command is sent to the map it does nothing. But once undo is called redo will still work. If this is false then it will operate normally.

Parameters:
redoUndoOnly -