com.esri.arcgis.display
Class AnchorPoint

java.lang.Object
  extended bycom.esri.arcgis.display.AnchorPoint
All Implemented Interfaces:
IAnchorPoint, Serializable

public class AnchorPoint
extends Object
implements IAnchorPoint

Anchor point class for rubberbanding objects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.

See Also:
Serialized Form

Constructor Summary
AnchorPoint()
          Constructs a AnchorPoint on the local host.
AnchorPoint(com.linar.jintegra.AuthInfo authInfo)
          See Security section in the J-Integra for COM documentation
AnchorPoint(Object obj)
          Construct a AnchorPoint using a reference to such an object returned from a COM server
AnchorPoint(String host)
          Construct a AnchorPoint on specified host.
AnchorPoint(String host, com.linar.jintegra.AuthInfo authInfo)
          See Security section in the J-Integra for COM documentation
 
Method Summary
static AnchorPoint bindUsingMoniker(String moniker)
          Bind to a running instance of this class using the supplied ObjRef moniker
 void draw(IDisplay display)
          Draw the anchor.
 boolean equals(Object o)
          Compare this object with another
static AnchorPoint getActiveObject()
          Get a reference to a running instance of this class on the current machine using native code.
 IAnchorPoint getAsIAnchorPoint()
          Access this class's com.esri.arcgis.display.IAnchorPoint interface
static String getClsid()
           
 int getCursor()
          Cursor displayed when mouse is over anchor.
 IPoint getPoint()
          Location of anchor point.
 Object getPropertyByName(String name)
          Get the value of a property dynamically at run-time, based on its name
 Object getPropertyByName(String name, Object rhs)
          Get the value of a property dynamically at run-time, based on its name and a parameter
 ISymbol getSymbol()
          Anchor point symbol.
 int hashCode()
          the hashcode for this object
 boolean hitTest(IPoint point, double tol)
          Check if mouse is over anchor.
 Object invokeMethodByName(String name)
           
 Object invokeMethodByName(String name, Object[] parameters)
          Invoke a method dynamically at run-time to pass primitive types (eg Integer to pass an int).
 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
 

Constructor Detail

AnchorPoint

public AnchorPoint()
            throws IOException,
                   UnknownHostException
Constructs a AnchorPoint on the local host.

Throws:
IOException - if there are problems communicating via DCOM
UnknownHostException - if the host can not be found

AnchorPoint

public AnchorPoint(String host)
            throws IOException,
                   UnknownHostException
Construct a AnchorPoint on specified host.

Parameters:
host - the host on which the object should be created
Throws:
IOException - if there are problems communicating via DCOM
UnknownHostException - if the host can not be found

AnchorPoint

public AnchorPoint(com.linar.jintegra.AuthInfo authInfo)
            throws IOException,
                   UnknownHostException
See Security section in the J-Integra for COM documentation


AnchorPoint

public AnchorPoint(String host,
                   com.linar.jintegra.AuthInfo authInfo)
            throws IOException,
                   UnknownHostException
See Security section in the J-Integra for COM documentation


AnchorPoint

public AnchorPoint(Object obj)
            throws IOException
Construct a AnchorPoint using a reference to such an object returned from a COM server

Parameters:
obj - an object returned from a COM server
Throws:
IOException - if there are problems communicating via DCOM
Method Detail

getClsid

public static String getClsid()

getAsIAnchorPoint

public IAnchorPoint getAsIAnchorPoint()
Access this class's com.esri.arcgis.display.IAnchorPoint interface


equals

public boolean equals(Object o)
Compare this object with another


hashCode

public int hashCode()
the hashcode for this object


getActiveObject

public static AnchorPoint getActiveObject()
                                   throws AutomationException,
                                          IOException
Get a reference to a running instance of this class on the current machine using native code. Uses native code (See GetActiveObject() in MS doc) and thus can only be used on MS Windows

Returns:
A reference to the running object.
Throws:
IOException - If there are communications problems.
AutomationException - If there was an error attaching to the instance.

bindUsingMoniker

public static AnchorPoint bindUsingMoniker(String moniker)
                                    throws AutomationException,
                                           IOException
Bind to a running instance of this class using the supplied ObjRef moniker

Parameters:
moniker - The ObjRef Moniker (Created using Windows CreateObjrefMoniker() and IMoniker->GetDisplayName).
Returns:
A reference to the running object.
Throws:
IOException - If there are communications problems.
AutomationException - If there was an error attaching to the instance.

getPropertyByName

public Object getPropertyByName(String name)
                         throws NoSuchFieldException,
                                IOException,
                                AutomationException
Get the value of a property dynamically at run-time, based on its name

Parameters:
name - The name of the property to get.
Returns:
The value of the property.
Throws:
NoSuchFieldException - If the property does not exit.
IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

getPropertyByName

public Object getPropertyByName(String name,
                                Object rhs)
                         throws NoSuchFieldException,
                                IOException,
                                AutomationException
Get the value of a property dynamically at run-time, based on its name and a parameter

Parameters:
name - The name of the property to get.
rhs - A parameter used when getting the proxy.
Returns:
The value of the property.
Throws:
NoSuchFieldException - If the property does not exit.
IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

invokeMethodByName

public Object invokeMethodByName(String name,
                                 Object[] parameters)
                          throws NoSuchMethodException,
                                 IOException,
                                 AutomationException
Invoke a method dynamically at run-time to pass primitive types (eg Integer to pass an int).

Parameters:
name - The name of the method to be invoked.
parameters - One element for each parameter. Use primitive type wrappers.
Returns:
The value returned by the method (null if none).
Throws:
NoSuchMethodException - If the method does not exit.
IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

invokeMethodByName

public Object invokeMethodByName(String name)
                          throws NoSuchMethodException,
                                 IOException,
                                 AutomationException
Throws:
NoSuchMethodException
IOException
AutomationException

setPoint

public void setPoint(IPoint point)
              throws IOException,
                     AutomationException
Description copied from interface: IAnchorPoint
Location of anchor point.

Supported Platforms

Windows, Solaris, Linux

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

getPoint

public IPoint getPoint()
                throws IOException,
                       AutomationException
Description copied from interface: IAnchorPoint
Location of anchor point.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPoint in interface IAnchorPoint
Returns:
An reference to a com.esri.arcgis.geometry.IPoint
Throws:
AutomationException - If the remote server throws an exception.
IOException - If there are communications problems.

setSymbolByRef

public void setSymbolByRef(ISymbol symbol)
                    throws IOException,
                           AutomationException
Description copied from interface: IAnchorPoint
Anchor point symbol.

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

getSymbol

public ISymbol getSymbol()
                  throws IOException,
                         AutomationException
Description copied from interface: IAnchorPoint
Anchor point symbol.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSymbol in interface IAnchorPoint
Returns:
An reference to a com.esri.arcgis.display.ISymbol
Throws:
IOException - If there are communications problems.
AutomationException - If the remote server throws an exception.

getCursor

public int getCursor()
              throws IOException,
                     AutomationException
Description copied from interface: IAnchorPoint
Cursor displayed when mouse is over anchor.

Supported Platforms

Windows, Solaris, Linux

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

hitTest

public boolean hitTest(IPoint point,
                       double tol)
                throws IOException,
                       AutomationException
Description copied from interface: IAnchorPoint
Check if mouse is over anchor.

Supported Platforms

Windows, Solaris, Linux

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

draw

public void draw(IDisplay display)
          throws IOException,
                 AutomationException
Description copied from interface: IAnchorPoint
Draw the anchor.

Supported Platforms

Windows, Solaris, Linux

Specified by:
draw in interface IAnchorPoint
Parameters:
display - An reference to a com.esri.arcgis.display.IDisplay (in)
Throws:
AutomationException - If the remote server throws an exception.
IOException - If there are communications problems.

moveTo

public void moveTo(IPoint pPoint,
                   IDisplay display)
            throws IOException,
                   AutomationException
Description copied from interface: IAnchorPoint
Move the anchor.

Supported Platforms

Windows, Solaris, Linux

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