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

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

public class SnapToVertexCommand
extends AbstractCommand

This class manages the movement of a vertex. Once a vertex has been moved this command determines how much the vertex has moved from its original position so the incremental move can be undone. Additionally this command performs post-order snapping. It searches the layer below it for the closest vertex and snaps to that vertex.

Since:
1.1.0
Author:
jones

Constructor Summary
SnapToVertexCommand(Point lastPoint, Selection toMove, EditToolHandler handler, Point start, EditState stateAfterSnap, boolean doSnap)
           
 
Method Summary
 java.lang.String getName()
           
 void rollback(IProgressMonitor monitor)
           
 void run(IProgressMonitor monitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SnapToVertexCommand

public SnapToVertexCommand(Point lastPoint,
                           Selection toMove,
                           EditToolHandler handler,
                           Point start,
                           EditState stateAfterSnap,
                           boolean doSnap)
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