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

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

public class SelectGeometryCommand
extends AbstractCommand

Searches a layer for an intersection between a mouse click and a feature and selects the features if found.

Since:
1.1.0
Author:
Jesse

Constructor Summary
SelectGeometryCommand(EditToolHandler handler, MapMouseEvent e, java.lang.Class[] acceptableClasses, short filterType, boolean permitClear, 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)
           
 void setCreateOnNoSelect(ShapeType toCreate)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectGeometryCommand

public SelectGeometryCommand(EditToolHandler handler,
                             MapMouseEvent e,
                             java.lang.Class[] acceptableClasses,
                             short filterType,
                             boolean permitClear,
                             boolean onlyAdd)
Method Detail

run

public void run(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.

getName

public java.lang.String getName()

rollback

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

setCreateOnNoSelect

public void setCreateOnNoSelect(ShapeType toCreate)