com.esri.arcgis.carto
Class SelectionEnvironment

java.lang.Object
  extended by com.esri.arcgis.carto.SelectionEnvironment
All Implemented Interfaces:
ISelectionEnvironment, ISelectionEnvironmentLayer, ISelectionEnvironmentStorage, ISelectionEnvironmentThreshold, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, Externalizable, Serializable

public class SelectionEnvironment
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISelectionEnvironment, ISelectionEnvironmentThreshold, ISelectionEnvironmentStorage, ISelectionEnvironmentLayer, IPersistStream, IPersist, Externalizable

Defines the feature selection environment.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
SelectionEnvironment()
          Constructs a SelectionEnvironment using ArcGIS Engine.
SelectionEnvironment(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SelectionEnvironment theSelectionEnvironment = (SelectionEnvironment) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 double getAreaSearchDistance()
          Distance used for selecting areas by proximity.
 int getAreaSelectionMethod()
          Selection method used for areas.
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 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 getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 int getWarningThreshold()
          Threshold (number of records), above which selection warnings may be shown.
 int hashCode()
          the hashcode for this object
 boolean isClearInvisibleLayers()
          Indicates if invisible layers have their selections cleared when a new selection is made.
 void isDirty()
          isDirty
 boolean isSaveSelections()
          Indicates if objects save their selections.
 boolean isShowSelectionWarning()
          Indicates if warnings are displayed when the record count exceeds the selection warning threshold.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void setAreaSearchDistance(double distance)
          Distance used for selecting areas by proximity.
 void setAreaSelectionMethod(int method)
          Selection method used for areas.
 void setClearInvisibleLayers(boolean clearInvisible)
          Indicates if invisible layers have their selections cleared when a new selection is made.
 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 setSaveSelections(boolean saveSel)
          Indicates if objects save their selections.
 void setSearchTolerance(int tolerance)
          Search tolerance in device units.
 void setShowSelectionWarning(boolean showWarning)
          Indicates if warnings are displayed when the record count exceeds the selection warning threshold.
 void setWarningThreshold(int threshold)
          Threshold (number of records), above which selection warnings may be shown.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

SelectionEnvironment

public SelectionEnvironment()
                     throws IOException,
                            UnknownHostException
Constructs a SelectionEnvironment using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

SelectionEnvironment

public SelectionEnvironment(Object obj)
                     throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SelectionEnvironment theSelectionEnvironment = (SelectionEnvironment) obj;

Construct a SelectionEnvironment using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to SelectionEnvironment.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getPointSelectionMethod

public 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

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

setPointSelectionMethod

public 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

Specified by:
setPointSelectionMethod in interface ISelectionEnvironment
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

public 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

Specified by:
getPointSearchDistance in interface ISelectionEnvironment
Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointSearchDistance

public 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

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

getLinearSelectionMethod

public 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

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

setLinearSelectionMethod

public 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

Specified by:
setLinearSelectionMethod in interface ISelectionEnvironment
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

public 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

Specified by:
getLinearSearchDistance in interface ISelectionEnvironment
Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLinearSearchDistance

public 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

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

getAreaSelectionMethod

public 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

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

setAreaSelectionMethod

public 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

Specified by:
setAreaSelectionMethod in interface ISelectionEnvironment
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

public 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

Specified by:
getAreaSearchDistance in interface ISelectionEnvironment
Returns:
The distance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAreaSearchDistance

public 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

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

getCombinationMethod

public 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

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

setCombinationMethod

public 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

Specified by:
setCombinationMethod in interface ISelectionEnvironment
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

public 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

Specified by:
getSearchTolerance in interface ISelectionEnvironment
Returns:
The tolerance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSearchTolerance

public 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

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

getDefaultColor

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDefaultColor in interface ISelectionEnvironment
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

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

Product Availability

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

Specified by:
setDefaultColorByRef in interface ISelectionEnvironment
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.

isShowSelectionWarning

public boolean isShowSelectionWarning()
                               throws IOException,
                                      AutomationException
Indicates if warnings are displayed when the record count exceeds the selection warning threshold.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isShowSelectionWarning in interface ISelectionEnvironmentThreshold
Returns:
The showWarning
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setShowSelectionWarning

public void setShowSelectionWarning(boolean showWarning)
                             throws IOException,
                                    AutomationException
Indicates if warnings are displayed when the record count exceeds the selection warning threshold.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setShowSelectionWarning in interface ISelectionEnvironmentThreshold
Parameters:
showWarning - The showWarning (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWarningThreshold

public int getWarningThreshold()
                        throws IOException,
                               AutomationException
Threshold (number of records), above which selection warnings may be shown.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getWarningThreshold in interface ISelectionEnvironmentThreshold
Returns:
The threshold
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWarningThreshold

public void setWarningThreshold(int threshold)
                         throws IOException,
                                AutomationException
Threshold (number of records), above which selection warnings may be shown.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setWarningThreshold in interface ISelectionEnvironmentThreshold
Parameters:
threshold - The threshold (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSaveSelections

public boolean isSaveSelections()
                         throws IOException,
                                AutomationException
Indicates if objects save their selections.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isSaveSelections in interface ISelectionEnvironmentStorage
Returns:
The saveSel
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSaveSelections

public void setSaveSelections(boolean saveSel)
                       throws IOException,
                              AutomationException
Indicates if objects save their selections.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSaveSelections in interface ISelectionEnvironmentStorage
Parameters:
saveSel - The saveSel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isClearInvisibleLayers

public boolean isClearInvisibleLayers()
                               throws IOException,
                                      AutomationException
Indicates if invisible layers have their selections cleared when a new selection is made.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isClearInvisibleLayers in interface ISelectionEnvironmentLayer
Returns:
The clearInvisible
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setClearInvisibleLayers

public void setClearInvisibleLayers(boolean clearInvisible)
                             throws IOException,
                                    AutomationException
Indicates if invisible layers have their selections cleared when a new selection is made.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setClearInvisibleLayers in interface ISelectionEnvironmentLayer
Parameters:
clearInvisible - The clearInvisible (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException