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

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

public class AddMissingGeomsCommand
extends AbstractCommand

Adds any geometries containing the given point which are not already on the edit blackboard.

Since:
1.1.0
Author:
chorner

Constructor Summary
AddMissingGeomsCommand(EditToolHandler handler, MapMouseEvent e, java.lang.Class[] acceptableClasses, short filterType, boolean onlyAdd)
           
 
Method Summary
 Filter createBBoxFilter(Envelope boundingBox, ILayer layer, short filterType)
          Creates A geometry filter for the given layer.
 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

AddMissingGeomsCommand

public AddMissingGeomsCommand(EditToolHandler handler,
                              MapMouseEvent e,
                              java.lang.Class[] acceptableClasses,
                              short filterType,
                              boolean onlyAdd)
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

createBBoxFilter

public Filter createBBoxFilter(Envelope boundingBox,
                               ILayer layer,
                               short filterType)
Creates A geometry filter for the given layer.

Parameters:
boundingBox - in the same crs as the viewport model.
Returns:
a Geometry filter in the correct CRS or null if an exception occurs.