com.esri.arcgis.display
Class AnchorPoint

java.lang.Object
  extended by com.esri.arcgis.display.AnchorPoint
All Implemented Interfaces:
IAnchorPoint, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class AnchorPoint
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IAnchorPoint

Anchor point class for rubberbanding objects.

Description

The anchor point represents a point that can be used when manipulating elements and features. When working with elements, anchor points can be considered a helper object, rather than an essential. You will first need to cocreate the anchor point and then manipulate it. This is useful when implementing your own tools and objects, for example, a custom rotation tool.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AnchorPoint()
          Constructs a AnchorPoint using ArcGIS Engine.
AnchorPoint(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AnchorPoint theAnchorPoint = (AnchorPoint) obj;
 
Method Summary
 void draw(IDisplay display)
          Draw the anchor.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int getCursor()
          Cursor displayed when mouse is over anchor.
 IPoint getPoint()
          Location of anchor point.
 ISymbol getSymbol()
          Anchor point symbol.
 int hashCode()
          the hashcode for this object
 boolean hitTest(IPoint point, double tol)
          Check if mouse is over anchor.
 void moveTo(IPoint pPoint, IDisplay display)
          Move the anchor.
 void setPoint(IPoint point)
          Location of anchor point.
 void setSymbolByRef(ISymbol symbol)
          Anchor point symbol.
 
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

AnchorPoint

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

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

AnchorPoint

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

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

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

setPoint

public void setPoint(IPoint point)
              throws IOException,
                     AutomationException
Location of anchor point.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPoint

public IPoint getPoint()
                throws IOException,
                       AutomationException
Location of anchor point.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPoint in interface IAnchorPoint
Returns:
A reference to a com.esri.arcgis.geometry.IPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSymbolByRef

public void setSymbolByRef(ISymbol symbol)
                    throws IOException,
                           AutomationException
Anchor point symbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSymbolByRef in interface IAnchorPoint
Parameters:
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSymbol

public ISymbol getSymbol()
                  throws IOException,
                         AutomationException
Anchor point symbol.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSymbol in interface IAnchorPoint
Returns:
A reference to a com.esri.arcgis.display.ISymbol
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCursor

public int getCursor()
              throws IOException,
                     AutomationException
Cursor displayed when mouse is over anchor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCursor in interface IAnchorPoint
Returns:
The cursor (A COM typedef)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTest

public boolean hitTest(IPoint point,
                       double tol)
                throws IOException,
                       AutomationException
Check if mouse is over anchor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
hitTest in interface IAnchorPoint
Parameters:
point - A reference to a com.esri.arcgis.geometry.IPoint (in)
tol - The tol (in)
Returns:
The hit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

draw

public void draw(IDisplay display)
          throws IOException,
                 AutomationException
Draw the anchor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
draw in interface IAnchorPoint
Parameters:
display - A reference to a com.esri.arcgis.display.IDisplay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveTo

public void moveTo(IPoint pPoint,
                   IDisplay display)
            throws IOException,
                   AutomationException
Move the anchor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
moveTo in interface IAnchorPoint
Parameters:
pPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
display - A reference to a com.esri.arcgis.display.IDisplay (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.