com.esri.arcgis.carto
Interface ISelectionEnvironment

All Superinterfaces:
Serializable
All Known Implementing Classes:
SelectionEnvironment

public interface ISelectionEnvironment
extends Serializable

Provides access to members that control the selection environment.

Remarks

ISelectionEnvironment controls the way the selection is created and displayed. The application's selection environment is available via IMxApplication::SelectionEnvironment.

AreaSelectionMethod, LinearSelectionMethod and PointSelectionMethod define the spatial relations used to select interactively the different kinds of features. This is similar to the options found in the Selection Options dialog in ArcMap for the interactive selection but it can be set differently depending on the feature's geometry type.

Also a different search distance can be set for each type using the AreaSearchDistance, LinearSearchDistance and PointSearchDistance. These distance are used when searching by proximity for instance when using the IMap::SelectByShape method.

The CombinationMethod property defines how the selection performed will combine with an existing selection.

The DefaultColor property allows you to replace the default light blue of selected object with your favorite color.

The SearchTolerance property defines a global search tolerance to use for selection operations as exemplified in the IAnchorPoint example.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
com.esri.arcgis.carto.IMxApplication

Method Summary
 double getAreaSearchDistance()
          Distance used for selecting areas by proximity.
 int getAreaSelectionMethod()
          Selection method used for areas.
 int getCombinationMethod()
          Combination method for the selection results.
 IColor getDefaultColor()
          Default selection color.
 double getLinearSearchDistance()
          Distance used for selecting lines by proximity.
 int getLinearSelectionMethod()
          Selection method used for lines.
 double getPointSearchDistance()
          Distance used for selecting points by proximity.
 int getPointSelectionMethod()
          Selection method used for points.
 int getSearchTolerance()
          Search tolerance in device units.
 void setAreaSearchDistance(double distance)
          Distance used for selecting areas by proximity.
 void setAreaSelectionMethod(int method)
          Selection method used for areas.
 void setCombinationMethod(int method)
          Combination method for the selection results.
 void setDefaultColorByRef(IColor color)
          Default selection color.
 void setLinearSearchDistance(double distance)
          Distance used for selecting lines by proximity.
 void setLinearSelectionMethod(int method)
          Selection method used for lines.
 void setPointSearchDistance(double distance)
          Distance used for selecting points by proximity.
 void setPointSelectionMethod(int method)
          Selection method used for points.
 void setSearchTolerance(int tolerance)
          Search tolerance in device units.
 

Method Detail

getPointSelectionMethod

int getPointSelectionMethod()
                            throws IOException,
                                   AutomationException
Selection method used for points.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointSelectionMethod

void setPointSelectionMethod(int method)
                             throws IOException,
                                    AutomationException
Selection method used for points.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
method - A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointSearchDistance

double getPointSearchDistance()
                              throws IOException,
                                     AutomationException
Distance used for selecting points by proximity.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointSearchDistance

void setPointSearchDistance(double distance)
                            throws IOException,
                                   AutomationException
Distance used for selecting points by proximity.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distance - The distance (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLinearSelectionMethod

int getLinearSelectionMethod()
                             throws IOException,
                                    AutomationException
Selection method used for lines.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLinearSelectionMethod

void setLinearSelectionMethod(int method)
                              throws IOException,
                                     AutomationException
Selection method used for lines.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
method - A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLinearSearchDistance

double getLinearSearchDistance()
                               throws IOException,
                                      AutomationException
Distance used for selecting lines by proximity.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLinearSearchDistance

void setLinearSearchDistance(double distance)
                             throws IOException,
                                    AutomationException
Distance used for selecting lines by proximity.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distance - The distance (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAreaSelectionMethod

int getAreaSelectionMethod()
                           throws IOException,
                                  AutomationException
Selection method used for areas.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAreaSelectionMethod

void setAreaSelectionMethod(int method)
                            throws IOException,
                                   AutomationException
Selection method used for areas.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
method - A com.esri.arcgis.geodatabase.esriSpatialRelEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAreaSearchDistance

double getAreaSearchDistance()
                             throws IOException,
                                    AutomationException
Distance used for selecting areas by proximity.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAreaSearchDistance

void setAreaSearchDistance(double distance)
                           throws IOException,
                                  AutomationException
Distance used for selecting areas by proximity.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distance - The distance (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCombinationMethod

int getCombinationMethod()
                         throws IOException,
                                AutomationException
Combination method for the selection results.

Remarks

The combination method defines how the selection performed will combine with an existing selection. It is the programmatic equivalent of the pulldown menus found in the selection dialogs in ArcMap.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.carto.esriSelectionResultEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setCombinationMethod

void setCombinationMethod(int method)
                          throws IOException,
                                 AutomationException
Combination method for the selection results.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
method - A com.esri.arcgis.carto.esriSelectionResultEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSearchTolerance

int getSearchTolerance()
                       throws IOException,
                              AutomationException
Search tolerance in device units.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The tolerance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSearchTolerance

void setSearchTolerance(int tolerance)
                        throws IOException,
                               AutomationException
Search tolerance in device units.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
tolerance - The tolerance (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultColor

IColor getDefaultColor()
                       throws IOException,
                              AutomationException
Default selection color.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDefaultColorByRef

void setDefaultColorByRef(IColor color)
                          throws IOException,
                                 AutomationException
Default selection color.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
color - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.