com.esri.arcgis.carto
Class MarginSnap

java.lang.Object
  extended by com.esri.arcgis.carto.MarginSnap
All Implemented Interfaces:
IGraphicSnap, IPageLayoutSnap, com.esri.arcgis.interop.RemoteObjRef, IPersist, Serializable

public class MarginSnap
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IPageLayoutSnap, IGraphicSnap, IPersist

Snap to margins agent.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
MarginSnap()
          Constructs a MarginSnap using ArcGIS Engine.
MarginSnap(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MarginSnap theMarginSnap = (MarginSnap) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 String getName()
          The name of the snap agent.
 int hashCode()
          the hashcode for this object
 void setPageLayout(IPageLayout rhs1)
          The PageLayout that this snap agent is associated with.
 boolean snapX(IGeometry shape, double tolerance)
          Indicates if the point is snapped in the horizontal direction.
 boolean snapY(IGeometry shape, double tolerance)
          Indicates if the point is snapped in the vertical direction.
 
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

MarginSnap

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

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

MarginSnap

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

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

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

setPageLayout

public void setPageLayout(IPageLayout rhs1)
                   throws IOException,
                          AutomationException
The PageLayout that this snap agent is associated with.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setPageLayout in interface IPageLayoutSnap
Parameters:
rhs1 - A reference to a com.esri.arcgis.carto.IPageLayout (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the snap agent.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface IGraphicSnap
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

snapX

public boolean snapX(IGeometry shape,
                     double tolerance)
              throws IOException,
                     AutomationException
Indicates if the point is snapped in the horizontal direction.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
snapX in interface IGraphicSnap
Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
tolerance - The tolerance (in)
Returns:
The snapped
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

snapY

public boolean snapY(IGeometry shape,
                     double tolerance)
              throws IOException,
                     AutomationException
Indicates if the point is snapped in the vertical direction.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
snapY in interface IGraphicSnap
Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
tolerance - The tolerance (in)
Returns:
The snapped
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist 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:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.