com.esri.arcgis.geometry
Class IPointCollectionProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.geometry.IPointCollectionProxy
All Implemented Interfaces:
java.io.Externalizable, IPointCollection, java.io.Serializable
Direct Known Subclasses:
IPointCollection2Proxy

public class IPointCollectionProxy
extends Dispatch
implements IPointCollection, java.io.Serializable

Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.

Product Availability

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

See Also:
Serialized Form

Field Summary
static java.lang.Class targetClass
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF
 
Constructor Summary
  IPointCollectionProxy()
          For internal use only
  IPointCollectionProxy(java.lang.Object obj)
           
protected IPointCollectionProxy(java.lang.Object obj, java.lang.String iid)
           
  IPointCollectionProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected IPointCollectionProxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, AuthInfo authInfo)
           
 
Method Summary
 void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource)
          Adds a Java object to be a listener for a specific kind of event generated by the COM object.
 void addPoint(IPoint inPoint, java.lang.Object before, java.lang.Object after)
          Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.
 void addPointCollection(IPointCollection newPoints)
          Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.
 void addPoints(int count, IPoint newPoints)
          Adds copies of the input points as vertices to this Path, Ring, Polyline, or Polygon; or references to the input points to this Multipoint, TriangleFan, or TriangleStrip.
 IEnumVertex getEnumVertices()
          A new enumerator for this point collection.
 IPoint getPoint(int i)
          A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.
 int getPointCount()
          The number of points in the collection.
 void insertPointCollection(int index, IPointCollection newPoints)
          Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.
 void insertPoints(int index, int count, IPoint newPoints)
          Inserts copies of the input points as vertices into a Path, Ring, Polyline, or Polygon; or references to the input points into a Multipoint, TriangleFan, or TriangleStrip.
 void queryPoint(int index, IPoint point)
          Queries for a point in the PointCollection at given index.
 void queryPoints(int index, int count, IPoint points)
          Copies some points to an existing array of points.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 void removePoints(int index, int count)
          Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.
 void replacePointCollection(int index, int goingAway, IPointCollection newPoints)
          Replaces vertices/points within a PointCollection.
 void replacePoints(int index, int comingIn, int goingAway, IPoint newPoints)
          Replaces vertices/points within a PointCollection.
 void setPointCollection(IPointCollection newPoints)
          Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.
 void setPoints(int count, IPoint newPoints)
          Replaces all existing vertices of this Path, Ring, Polyline, or Polygon with copies of the input points; or all existing points of this Multipoint, TriangleFan, or TriangleStrip with references to the input points (for C++ and VB users only).
 void updatePoint(int i, IPoint p)
          Changes the ith vertex or point to be a copy of the input point.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, hashCode, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, readExternal, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

targetClass

public static final java.lang.Class targetClass
Constructor Detail

IPointCollectionProxy

public IPointCollectionProxy(java.lang.String CLSID,
                             java.lang.String host,
                             AuthInfo authInfo)
                      throws java.net.UnknownHostException,
                             java.io.IOException

IPointCollectionProxy

public IPointCollectionProxy()
For internal use only


IPointCollectionProxy

public IPointCollectionProxy(java.lang.Object obj)
                      throws java.io.IOException

IPointCollectionProxy

protected IPointCollectionProxy(java.lang.Object obj,
                                java.lang.String iid)
                         throws java.io.IOException

IPointCollectionProxy

protected IPointCollectionProxy(java.lang.String CLSID,
                                java.lang.String iid,
                                java.lang.String host,
                                AuthInfo authInfo)
                         throws java.io.IOException
Method Detail

addListener

public void addListener(java.lang.String iidStr,
                        java.lang.Object theListener,
                        java.lang.Object theSource)
                 throws java.io.IOException
Description copied from class: Dispatch
Adds a Java object to be a listener for a specific kind of event generated by the COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
addListener in class Dispatch
Parameters:
iidStr - the ID of the outgoing interface, implemented by the listener
theListener - the object to be informed of the events
theSource - the proxy class that represents the COM class that is the source of the events
Throws:
java.io.IOException

removeListener

public void removeListener(java.lang.String iidStr,
                           java.lang.Object theListener)
                    throws java.io.IOException
Description copied from class: Dispatch
Removes a Java object as a listener to events generated by a COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
removeListener in class Dispatch
Parameters:
iidStr - the ID of the outgoing interface, implemented by the listener
theListener - the object that no longer wishes to be informed of the events
Throws:
java.io.IOException

getPointCount

public int getPointCount()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IPointCollection
The number of points in the collection.

Supported Platforms

Windows, Solaris, Linux

Description

Returns the number of Points in the PointCollection.  The last Point in the PointCollection has an index equal to PointCount - 1.

Specified by:
getPointCount in interface IPointCollection
Returns:
The cPoints
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getPoint

public IPoint getPoint(int i)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPointCollection
A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.

Supported Platforms

Windows, Solaris, Linux

Description

Gets the ith Point from the PointCollection.  The first Point in the PointCollection has index 0, and the last Point has index equal to PointCount - 1.  (Alternatively, the last Point in the PointCollection can be referenced using index -1.).

Remarks

Note: Since a copy of the point is returned by Point (get_Point) for path, ring, polyline and polygon the IPointCollection::UpdatePoint method must be used to update points on those geometry types.

Specified by:
getPoint in interface IPointCollection
Parameters:
i - The i (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

addPoint

public void addPoint(IPoint inPoint,
                     java.lang.Object before,
                     java.lang.Object after)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IPointCollection
Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.

Supported Platforms

Windows, Solaris, Linux

Description

Adds a Point to a PointCollection.  If before and after are omitted, the Point is added to the end of the PointCollection.  Additionally, by specifying either the before or after index, the Point can be added at a specific location in the PointCollection.

Specified by:
addPoint in interface IPointCollection
Parameters:
inPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
before - A Variant (in, optional, pass null if not required)
after - A Variant (in, optional, pass null if not required)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

updatePoint

public void updatePoint(int i,
                        IPoint p)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IPointCollection
Changes the ith vertex or point to be a copy of the input point.

Supported Platforms

Windows, Solaris, Linux

Description

Updates the ith Point with a copy of the input Point.  Update replaces the reference to the indexed point with a reference to the input Point.

Remarks

For efficiency UpdatePoint does not check if the spatial reference of the input point is equal to the spatial reference of the PointCollection. Please make sure that the spatial reference of the input point is equal to the spatial reference of the PointCollection before you pass the point in.

Note : You can also explicitly check the spatial reference by using IClone::IsEqual

Specified by:
updatePoint in interface IPointCollection
Parameters:
i - The i (in)
p - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

queryPoints

public void queryPoints(int index,
                        int count,
                        IPoint points)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IPointCollection
Copies some points to an existing array of points. This method is intended for internal use only.

Supported Platforms

Windows, Solaris, Linux

Description

Queries a specified number (Count) of Points starting at the given index into an array of Points.

Specified by:
queryPoints in interface IPointCollection
Parameters:
index - The index (in)
count - The count (in)
points - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

insertPoints

public void insertPoints(int index,
                         int count,
                         IPoint newPoints)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IPointCollection
Inserts copies of the input points as vertices into a Path, Ring, Polyline, or Polygon; or references to the input points into a Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.

Supported Platforms

Windows, Solaris, Linux

Description

Inserts a specified number (Count) of Points into the PointCollection at the given index from an array of Points.  The first Count points from the array are inserted.

Specified by:
insertPoints in interface IPointCollection
Parameters:
index - The index (in)
count - The count (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertPointCollection

public void insertPointCollection(int index,
                                  IPointCollection newPoints)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IPointCollection
Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.

Supported Platforms

Windows, Solaris, Linux

Description

Inserts a PointCollection of Points into the PointCollection at the specified index.  The resulting PointCollection does not retain information about the distinction between the old and new Point Collections.

Specified by:
insertPointCollection in interface IPointCollection
Parameters:
index - The index (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addPoints

public void addPoints(int count,
                      IPoint newPoints)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IPointCollection
Adds copies of the input points as vertices to this Path, Ring, Polyline, or Polygon; or references to the input points to this Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.

Supported Platforms

Windows, Solaris, Linux

Description

Adds the first specified number (Count) of Points to the PointCollection from an array of Points (with at least Count points).  The Points are all added to the end of the PointCollection in the same sequence as they are ordered in the array.

Specified by:
addPoints in interface IPointCollection
Parameters:
count - The count (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

addPointCollection

public void addPointCollection(IPointCollection newPoints)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IPointCollection
Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.

Supported Platforms

Windows, Solaris, Linux

Description

Adds a PointCollection of Points to the end of the PointCollection.  The resulting PointCollection does not retain the division between the old PointCollection and the additional PointCollection.

Specified by:
addPointCollection in interface IPointCollection
Parameters:
newPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPoints

public void setPoints(int count,
                      IPoint newPoints)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: IPointCollection
Replaces all existing vertices of this Path, Ring, Polyline, or Polygon with copies of the input points; or all existing points of this Multipoint, TriangleFan, or TriangleStrip with references to the input points (for C++ and VB users only).

Specified by:
setPoints in interface IPointCollection
Parameters:
count - The count (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointCollection

public void setPointCollection(IPointCollection newPoints)
                        throws java.io.IOException,
                               AutomationException
Description copied from interface: IPointCollection
Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.

Specified by:
setPointCollection in interface IPointCollection
Parameters:
newPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

removePoints

public void removePoints(int index,
                         int count)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IPointCollection
Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.

Supported Platforms

Windows, Solaris, Linux

Description

Removes a specified number (Count) of Points from a PointCollection starting at a given index.

Specified by:
removePoints in interface IPointCollection
Parameters:
index - The index (in)
count - The count (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getEnumVertices

public IEnumVertex getEnumVertices()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IPointCollection
A new enumerator for this point collection.

Supported Platforms

Windows, Solaris, Linux

Description

Returns an EnumVertex for the vertices in the PointCollection.  The EnumVertex allows the Points to be tranversed in a sequential order.

Specified by:
getEnumVertices in interface IPointCollection
Returns:
A reference to a com.esri.arcgis.geometry.IEnumVertex
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replacePoints

public void replacePoints(int index,
                          int comingIn,
                          int goingAway,
                          IPoint newPoints)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IPointCollection
Replaces vertices/points within a PointCollection.

Supported Platforms

Windows, Solaris, Linux

Description

Removes a specified number (goingAway) of Points from a PointCollection starting at a given index and replaces them (starting at the same index) with a specified number (comingIn) of Points from an array of Points.

 

If you are using attempting to use this method from a .NET enabled language, such as VB.NET, you may need to use the ReplacePoints method provided by the IGeometryBridge interface exposed on the GeometryEnvironment object.

Specified by:
replacePoints in interface IPointCollection
Parameters:
index - The index (in)
comingIn - The comingIn (in)
goingAway - The goingAway (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

replacePointCollection

public void replacePointCollection(int index,
                                   int goingAway,
                                   IPointCollection newPoints)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IPointCollection
Replaces vertices/points within a PointCollection.

Supported Platforms

Windows, Solaris, Linux

Description

Replaces a specified number (goingAway) of Points in the PointCollection begining at a given index with a PointCollection of Points (inserted at the given index).

Specified by:
replacePointCollection in interface IPointCollection
Parameters:
index - The index (in)
goingAway - The goingAway (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPointCollection (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

queryPoint

public void queryPoint(int index,
                       IPoint point)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPointCollection
Queries for a point in the PointCollection at given index.

Supported Platforms

Windows, Solaris, Linux

Description

Queries the ith Point from the PointCollection.  The first Point in the PointCollection has index 0, and the last Point has index equal to PointCount - 1.  (Alternatively, the last Point in the PointCollection can be referenced using index -1.).

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

Specified by:
queryPoint in interface IPointCollection
Parameters:
index - The index (in)
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.