net.refractions.udig.project.command.factory
Class SelectionCommandFactory

java.lang.Object
  extended by net.refractions.udig.project.command.SelectionCommandFactory
      extended by net.refractions.udig.project.command.factory.SelectionCommandFactory

public class SelectionCommandFactory
extends SelectionCommandFactory

A factory which can be used to create all the standard selection commands. API use

Since:
0.3
Author:
jeichar

Constructor Summary
protected SelectionCommandFactory()
           
 
Method Summary
 UndoableMapCommand createBBoxSelectionCommand(Envelope boundingBox)
          Creates a new BBoxSelectionCommand.
 UndoableMapCommand createBBoxSelectionCommand(Envelope bbox, int modifiers)
          Creates a new BBoxSelectionCommand
 MapCommand createCompositeCommand(java.util.List<? extends MapCommand> commands)
          Create a CompositeCommand
 UndoableMapCommand createFIDSelectCommand(ILayer layer, java.lang.String fid)
          Create a MapCommand that sets the layer selection to be a fidfilter.
 UndoableMapCommand createNoSelectCommand()
          Creates a NoSelectCommand
 UndoableMapCommand createSelectCommand(ILayer layer, Filter filter)
          Create a MapCommand that sets the layer selection to be the filter.
 UndoableMapCommand createUndoableCompositeCommand(java.util.List<? extends UndoableMapCommand> commands)
          Create a CompositeCommand
static SelectionCommandFactory getInstance()
          Creates a new SelectionCommandFactory object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectionCommandFactory

protected SelectionCommandFactory()
Method Detail

getInstance

public static SelectionCommandFactory getInstance()
Creates a new SelectionCommandFactory object

Returns:
a new SelectionCommandFactory object

createBBoxSelectionCommand

public UndoableMapCommand createBBoxSelectionCommand(Envelope bbox,
                                                     int modifiers)
Creates a new BBoxSelectionCommand

Overrides:
createBBoxSelectionCommand in class SelectionCommandFactory
Parameters:
bbox - A bounding used as the filter, all features intersecting the bbox will be considered selected
modifiers - Options include: BBoxSelectionCommand.ADD, BBoxSelectionCommand.NONE, BBoxSelectionCommand.SUBTRACT
Returns:
A new BBoxSelectionCommand. The command should be sent to the SelectionManagerto be executed.
See Also:
Envelope, MapCommand

createBBoxSelectionCommand

public UndoableMapCommand createBBoxSelectionCommand(Envelope boundingBox)
Creates a new BBoxSelectionCommand. Same as createBBoxSelectionCommand(bbox, BBoxSelectionCommand.NONE)

Overrides:
createBBoxSelectionCommand in class SelectionCommandFactory
Parameters:
bbox - A bounding used as the filter, all features intersecting the bbox will be considered selected
Returns:
A new BBoxSelectionCommand. The command should be sent to the SelectionManagerto be executed.
See Also:
Envelope, MapCommand

createNoSelectCommand

public UndoableMapCommand createNoSelectCommand()
Creates a NoSelectCommand

Overrides:
createNoSelectCommand in class SelectionCommandFactory
Returns:
a NoSelectCommandobject. The command should be sent to the SelectionManagerto be executed.
See Also:
MapCommand

createFIDSelectCommand

public UndoableMapCommand createFIDSelectCommand(ILayer layer,
                                                 java.lang.String fid)
Create a MapCommand that sets the layer selection to be a fidfilter.

Overrides:
createFIDSelectCommand in class SelectionCommandFactory
Returns:
a FIDSelectCommand
See Also:
MapCommand

createSelectCommand

public UndoableMapCommand createSelectCommand(ILayer layer,
                                              Filter filter)
Create a MapCommand that sets the layer selection to be the filter.

Overrides:
createSelectCommand in class SelectionCommandFactory
Returns:
a SelectCommand
See Also:
MapCommand

createCompositeCommand

public MapCommand createCompositeCommand(java.util.List<? extends MapCommand> commands)
Create a CompositeCommand

Overrides:
createCompositeCommand in class SelectionCommandFactory
Parameters:
commands - the commands to be executed as a single command
Returns:
a CompositeCommand
See Also:
MapCommand

createUndoableCompositeCommand

public UndoableMapCommand createUndoableCompositeCommand(java.util.List<? extends UndoableMapCommand> commands)
Create a CompositeCommand

Overrides:
createUndoableCompositeCommand in class SelectionCommandFactory
Parameters:
commands - the commands to be executed as a single command
Returns:
a CompositeCommand
See Also:
MapCommand