com.esri.arcgis.geometry
Class ILineProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.geometry.IGeometryProxy
          extended bycom.esri.arcgis.geometry.ICurveProxy
              extended bycom.esri.arcgis.geometry.ILineProxy
All Implemented Interfaces:
java.io.Externalizable, ICurve, IGeometry, ILine, java.io.Serializable
Direct Known Subclasses:
ILine2Proxy

public class ILineProxy
extends ICurveProxy
implements ILine, java.io.Serializable

Provides access to members that identify a straight line segment and defines its properties.

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
  ILineProxy()
          For internal use only
  ILineProxy(java.lang.Object obj)
           
protected ILineProxy(java.lang.Object obj, java.lang.String iid)
           
  ILineProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected ILineProxy(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.
 double getAngle()
          The angle between this line and the positive x-axis.
 void putCoords(IPoint from, IPoint to)
          Sets this line's endpoints to be 'from' and 'to'.
 void queryCoords(IPoint from, IPoint to)
          Copies the endpoints of this line to 'from' and 'to'.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 
Methods inherited from class com.esri.arcgis.geometry.ICurveProxy
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
 
Methods inherited from class com.esri.arcgis.geometry.IGeometryProxy
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 
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
 
Methods inherited from interface com.esri.arcgis.geometry.ICurve
getFromPoint, getLength, getSubcurve, getToPoint, isClosed, queryFromPoint, queryNormal, queryPoint, queryPointAndDistance, queryTangent, queryToPoint, reverseOrientation, setFromPoint, setToPoint
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Field Detail

targetClass

public static final java.lang.Class targetClass
Constructor Detail

ILineProxy

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

ILineProxy

public ILineProxy()
For internal use only


ILineProxy

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

ILineProxy

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

ILineProxy

protected ILineProxy(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 ICurveProxy
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 ICurveProxy
Throws:
java.io.IOException

putCoords

public void putCoords(IPoint from,
                      IPoint to)
               throws java.io.IOException,
                      AutomationException
Description copied from interface: ILine
Sets this line's endpoints to be 'from' and 'to'.

Supported Platforms

Windows, Solaris, Linux

Description

The PutCoords method sets the From Point and To Point for a line object. If the From Point and To Point are identical, it creates a zero Length line with the same start and endpoint.

Remarks

 

Line PutCoords Example

Specified by:
putCoords in interface ILine
Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
to - 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.

queryCoords

public void queryCoords(IPoint from,
                        IPoint to)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: ILine
Copies the endpoints of this line to 'from' and 'to'.

Supported Platforms

Windows, Solaris, Linux

Description

Queries the From and To Points of the Line.  These are the only parameters necessary to create a well-defined line.

Remarks

 

Line QueryCoords Example

Specified by:
queryCoords in interface ILine
Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
to - 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.

getAngle

public double getAngle()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: ILine
The angle between this line and the positive x-axis.

Supported Platforms

Windows, Solaris, Linux

Remarks


The following Visual Basic example gets the angle of a line and converts it to degrees :

dAngleDegree = (180 * pLine.Angle) / Pi

Where Pi = 4 * Atn(1)

Line Angle Example

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