|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFeatureSelection
Provides access to members that control feature selection.
IFeatureSelection is a very useful interface to manage or perform selection on a layer or to modify the way the selection is displayed.
The following methods and properties are useful to manage the selection:
The CombinationMethod property is not used.
SelectionSet returns a SelectionSet corresponding to the current selection on the layer.
Clear will clear an existing selection.
Add adds one single feature to the selection.
SelectFeatures will perform a selection based on a query filter. If nothing is used as a query filter all the features will be selected. You can also specify a combination method. The justOne parameter tells the search to stop once it has found one feature.
Call SelectionChanged after modifying SelectionSet to fire update events on the layer.
The following methods and properties are useful to modify the way the selection is displayed:
SelectionSymbol will return or set the symbol used to display selected features on the layer.
SetSelectionSymbol is a boolean used to indicate if the SelectionSymbol is used or not to draw the selection. For feature layers, this is similar to using the "Show selected features...with this symbol" option in the layer properties.
SelectionColor is equivalent to using the "Show selected features...with this color" option in the layer properties.
If BufferDistance is set to a value greater than 0, a buffer will be drawn around the selected features. This is similar to using the Buffer Selection tool that can be added to the map with the Customize command found in the Tools menu.
Method Summary | |
---|---|
void |
add(IFeature feature)
Adds a feature to the selection set. |
void |
clear()
Clears the selection. |
double |
getBufferDistance()
Buffer distance used for the selection. |
int |
getCombinationMethod()
Combination method for the selection. |
IColor |
getSelectionColor()
Selection color. |
ISelectionSet |
getSelectionSet()
The selected set of features. |
ISymbol |
getSelectionSymbol()
Selection symbol. |
boolean |
isSetSelectionSymbol()
Indicates if the selected set of features is drawn using the SelectionSymbol. |
void |
selectFeatures(IQueryFilter filter,
int method,
boolean justOne)
Selects features based upon the specifed criteria and combination method. |
void |
selectionChanged()
Fires the features layer update event. |
void |
setBufferDistance(double distance)
Buffer distance used for the selection. |
void |
setCombinationMethod(int method)
Combination method for the selection. |
void |
setSelectionColorByRef(IColor color)
Selection color. |
void |
setSelectionSetByRef(ISelectionSet selectionSet)
The selected set of features. |
void |
setSelectionSymbolByRef(ISymbol symbol)
Selection symbol. |
void |
setSetSelectionSymbol(boolean setSymbol)
Indicates if the selected set of features is drawn using the SelectionSymbol. |
Method Detail |
---|
ISelectionSet getSelectionSet() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSelectionSetByRef(ISelectionSet selectionSet) throws IOException, AutomationException
selectionSet
- A reference to a com.esri.arcgis.geodatabase.ISelectionSet (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getCombinationMethod() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setCombinationMethod(int method) throws IOException, AutomationException
method
- A com.esri.arcgis.carto.esriSelectionResultEnum constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.double getBufferDistance() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setBufferDistance(double distance) throws IOException, AutomationException
distance
- The distance (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isSetSelectionSymbol() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSetSelectionSymbol(boolean setSymbol) throws IOException, AutomationException
setSymbol
- The setSymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IColor getSelectionColor() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSelectionColorByRef(IColor color) throws IOException, AutomationException
color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.ISymbol getSelectionSymbol() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSelectionSymbolByRef(ISymbol symbol) throws IOException, AutomationException
symbol
- A reference to a com.esri.arcgis.display.ISymbol (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void add(IFeature feature) throws IOException, AutomationException
feature
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectFeatures(IQueryFilter filter, int method, boolean justOne) throws IOException, AutomationException
filter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)method
- A com.esri.arcgis.carto.esriSelectionResultEnum constant (in)justOne
- The justOne (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void clear() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void selectionChanged() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |