com.esri.arcgis.catalog
Class GxSelection

java.lang.Object
  extended by com.esri.arcgis.catalog.GxSelection
All Implemented Interfaces:
IGxSelection, IConnectionPointContainer, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class GxSelection
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGxSelection, IConnectionPointContainer

GxObject that represents the catalog's selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
GxSelection()
          Constructs a GxSelection using ArcGIS Engine.
GxSelection(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GxSelection theGxSelection = (GxSelection) obj;
 
Method Summary
 void addIGxSelectionEventsListener(IGxSelectionEvents theListener)
          addIGxSelectionEventsListener.
 void clear(Object initiator)
          Unselects all objects.
 void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
          enumConnectionPoints
 boolean equals(Object o)
          Compare this object with another
 void findConnectionPoint(GUID riid, IConnectionPoint[] ppCP)
          findConnectionPoint
static String getClsid()
          getClsid.
 int getCount()
          The number of selected objects.
 IGxObject getFirstObject()
          The first object in the selection.
 IGxObject getLocation()
          The location of the selection.
 IEnumGxObject getSelectedObjects()
          The objects in the selection.
 int hashCode()
          the hashcode for this object
 boolean isDelayEvents()
          Delays or resumes selection event firing.
 boolean isSelected(IGxObject object)
          Checks if an object is selected.
 void removeIGxSelectionEventsListener(IGxSelectionEvents theListener)
          removeIGxSelectionEventsListener.
 void select(IGxObject object, boolean appendToExistingSelection, Object initiator)
          Selects an object, optionally appending it to the existing selection.
 void setDelayEvents(boolean delayEvents)
          Delays or resumes selection event firing.
 void setLocation(IGxObject location, Object pInitiator)
          Clears the selection and sets a new location.
 void unselect(IGxObject object, Object initiator)
          Unselects an object.
 
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

GxSelection

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

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

GxSelection

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

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

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

addIGxSelectionEventsListener

public void addIGxSelectionEventsListener(IGxSelectionEvents theListener)
                                   throws IOException
addIGxSelectionEventsListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.catalog.IGxSelectionEvents interface.
Throws:
IOException - If there are communications problems.

removeIGxSelectionEventsListener

public void removeIGxSelectionEventsListener(IGxSelectionEvents theListener)
                                      throws IOException
removeIGxSelectionEventsListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.catalog.IGxSelectionEvents interface.
Throws:
IOException - If there are communications problems.

getLocation

public IGxObject getLocation()
                      throws IOException,
                             AutomationException
The location of the selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getLocation in interface IGxSelection
Returns:
A reference to a com.esri.arcgis.catalog.IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setLocation

public void setLocation(IGxObject location,
                        Object pInitiator)
                 throws IOException,
                        AutomationException
Clears the selection and sets a new location.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setLocation in interface IGxSelection
Parameters:
location - A reference to a com.esri.arcgis.catalog.IGxObject (in)
pInitiator - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCount

public int getCount()
             throws IOException,
                    AutomationException
The number of selected objects.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCount in interface IGxSelection
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFirstObject

public IGxObject getFirstObject()
                         throws IOException,
                                AutomationException
The first object in the selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getFirstObject in interface IGxSelection
Returns:
A reference to a com.esri.arcgis.catalog.IGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDelayEvents

public void setDelayEvents(boolean delayEvents)
                    throws IOException,
                           AutomationException
Delays or resumes selection event firing. If the selection changed while events were being delayed, a single event is fired when events are resumed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

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

isDelayEvents

public boolean isDelayEvents()
                      throws IOException,
                             AutomationException
Delays or resumes selection event firing. If the selection changed while events were being delayed, a single event is fired when events are resumed.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isDelayEvents in interface IGxSelection
Returns:
The delayEvents
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

select

public void select(IGxObject object,
                   boolean appendToExistingSelection,
                   Object initiator)
            throws IOException,
                   AutomationException
Selects an object, optionally appending it to the existing selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
select in interface IGxSelection
Parameters:
object - A reference to a com.esri.arcgis.catalog.IGxObject (in)
appendToExistingSelection - The appendToExistingSelection (in)
initiator - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unselect

public void unselect(IGxObject object,
                     Object initiator)
              throws IOException,
                     AutomationException
Unselects an object.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
unselect in interface IGxSelection
Parameters:
object - A reference to a com.esri.arcgis.catalog.IGxObject (in)
initiator - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSelected

public boolean isSelected(IGxObject object)
                   throws IOException,
                          AutomationException
Checks if an object is selected.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
isSelected in interface IGxSelection
Parameters:
object - A reference to a com.esri.arcgis.catalog.IGxObject (in)
Returns:
The isSelected
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clear

public void clear(Object initiator)
           throws IOException,
                  AutomationException
Unselects all objects.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
clear in interface IGxSelection
Parameters:
initiator - A reference to another Object (IUnknown) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSelectedObjects

public IEnumGxObject getSelectedObjects()
                                 throws IOException,
                                        AutomationException
The objects in the selection.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getSelectedObjects in interface IGxSelection
Returns:
A reference to a com.esri.arcgis.catalog.IEnumGxObject
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

enumConnectionPoints

public void enumConnectionPoints(IEnumConnectionPoints[] ppEnum)
                          throws IOException,
                                 AutomationException
enumConnectionPoints

Description

IConnectionPointContainer 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:
enumConnectionPoints in interface IConnectionPointContainer
Parameters:
ppEnum - A reference to a com.esri.arcgis.display.IEnumConnectionPoints (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findConnectionPoint

public void findConnectionPoint(GUID riid,
                                IConnectionPoint[] ppCP)
                         throws IOException,
                                AutomationException
findConnectionPoint

Description

IConnectionPointContainer 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:
findConnectionPoint in interface IConnectionPointContainer
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
ppCP - A reference to a com.esri.arcgis.display.IConnectionPoint (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.