com.esri.arcgis.carto
Class MapSelection

java.lang.Object
  extended by com.esri.arcgis.carto.MapSelection
All Implemented Interfaces:
ISelection, IEnumFeature, IEnumFeatureSetup, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class MapSelection
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IEnumFeature, IEnumFeatureSetup, ISelection

Maintains the map's feature selection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
MapSelection(Object obj)
          Construct a MapSelection using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean canClear()
          Indicates if the selection can be cleared.
 boolean canCopy()
          Indicates if the selection can be copied.
 boolean canCut()
          Indicates if the selection can be cut.
 boolean canPaste()
          Indicates if paste is supported.
 boolean canSelectAll()
          Indicates if there's something to select.
 void clear()
          Clears all items in the selection.
 void copy()
          Copy the selected items to the clipboard.
 void cut()
          Cut the selected items to the clipboard.
 void draw(IDisplay display, ITrackCancel cancelTracker)
          Draw the selected items.
 boolean equals(Object o)
          Compare this object with another
 int hashCode()
          the hashcode for this object
 boolean isAllFields()
          Indicates if returned features will contain all fields.
 boolean isRecycling()
          Indicates if returned features recycle.
 IFeature next()
          Retrieves the next Feature in the enumeration sequence.
 void paste()
          Paste clipboard contents.
 void reset()
          Resets the enumeration sequence to the beginning.
 void selectAll()
          Selects all items.
 void setAllFields(boolean allFields)
          Indicates if returned features will contain all fields.
 void setRecycling(boolean recyling)
          Indicates if returned features recycle.
 
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

MapSelection

public MapSelection(Object obj)
             throws IOException
Construct a MapSelection using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MapSelection.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
MapSelection o = (MapSelection)obj; // will not work

MapSelection o = new MapSelection(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems MapSelection theMapSelection = (MapSelection) obj;
Method Detail

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

next

public IFeature next()
              throws IOException,
                     AutomationException
Retrieves the next Feature in the enumeration sequence.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
next in interface IEnumFeature
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeature
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws IOException,
                  AutomationException
Resets the enumeration sequence to the beginning.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isRecycling

public boolean isRecycling()
                    throws IOException,
                           AutomationException
Indicates if returned features recycle.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isRecycling in interface IEnumFeatureSetup
Returns:
The recyling
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setRecycling

public void setRecycling(boolean recyling)
                  throws IOException,
                         AutomationException
Indicates if returned features recycle.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isAllFields

public boolean isAllFields()
                    throws IOException,
                           AutomationException
Indicates if returned features will contain all fields.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isAllFields in interface IEnumFeatureSetup
Returns:
The allFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAllFields

public void setAllFields(boolean allFields)
                  throws IOException,
                         AutomationException
Indicates if returned features will contain all fields.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

canCut

public boolean canCut()
               throws IOException,
                      AutomationException
Indicates if the selection can be cut.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canCut in interface ISelection
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canCopy

public boolean canCopy()
                throws IOException,
                       AutomationException
Indicates if the selection can be copied.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canCopy in interface ISelection
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canPaste

public boolean canPaste()
                 throws IOException,
                        AutomationException
Indicates if paste is supported.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canPaste in interface ISelection
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canClear

public boolean canClear()
                 throws IOException,
                        AutomationException
Indicates if the selection can be cleared.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canClear in interface ISelection
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canSelectAll

public boolean canSelectAll()
                     throws IOException,
                            AutomationException
Indicates if there's something to select.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canSelectAll in interface ISelection
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

cut

public void cut()
         throws IOException,
                AutomationException
Cut the selected items to the clipboard.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

copy

public void copy()
          throws IOException,
                 AutomationException
Copy the selected items to the clipboard.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

paste

public void paste()
           throws IOException,
                  AutomationException
Paste clipboard contents.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

clear

public void clear()
           throws IOException,
                  AutomationException
Clears all items in the selection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

selectAll

public void selectAll()
               throws IOException,
                      AutomationException
Selects all items.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

draw

public void draw(IDisplay display,
                 ITrackCancel cancelTracker)
          throws IOException,
                 AutomationException
Draw the selected items.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
draw in interface ISelection
Parameters:
display - A reference to a com.esri.arcgis.display.IDisplay (in)
cancelTracker - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.