com.esri.arcgis.carto
Class RulerSnap

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

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

Snap to ruler agent.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
RulerSnap()
          Constructs a RulerSnap using ArcGIS Engine.
RulerSnap(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
RulerSnap theRulerSnap = (RulerSnap) 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

RulerSnap

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

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

RulerSnap

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

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

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.