com.esri.arcgis.systemUI
Class SystemMouseCursor

java.lang.Object
  extended by com.esri.arcgis.systemUI.SystemMouseCursor
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, ISystemMouseCursor, Serializable

public class SystemMouseCursor
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISystemMouseCursor

A helper object working with mouse cursor.

Description

The SystemMouseCursor object is primarily used when developing with the Java and C++ API. It provides some commonly used mouse cursors and provides access to the OLE_HANDLE of a mouse cursor.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
SystemMouseCursor()
          Constructs a SystemMouseCursor using ArcGIS Engine.
SystemMouseCursor(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SystemMouseCursor theSystemMouseCursor = (SystemMouseCursor) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int getCursor()
          Currently loaded mouse cursor.
 int hashCode()
          the hashcode for this object
 void load(int mouseCursorType)
          Loads system provided mouse cursor.
 void loadFromFile(String fileName)
          Loads mouse cursor from file.
 void setCursor(int mouseCursor)
          Currently loaded mouse cursor.
 
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

SystemMouseCursor

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

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

SystemMouseCursor

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

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

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

load

public void load(int mouseCursorType)
          throws IOException,
                 AutomationException
Loads system provided mouse cursor.

Description

Loads a pre-defined mouse cursor into the SystemMouseCursor. Use the Cursor property to get the handle to the newly loaded cursor.

Product Availability

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

Specified by:
load in interface ISystemMouseCursor
Parameters:
mouseCursorType - A com.esri.arcgis.systemUI.esriSystemMouseCursor constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadFromFile

public void loadFromFile(String fileName)
                  throws IOException,
                         AutomationException
Loads mouse cursor from file. If file name uses relative path, the path must be relative to current application executable.

Description

The LoadFromFile method creates a SystemMouseCursor based upon the data in the specified file. Files containing cursor data may be in either cursor (.cur) or animated cursor (.ani) format. If file name uses relative path, the path must be relative to current application executable. Use the Cursor property to get the handle to the newly loaded cursor.

Product Availability

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

Specified by:
loadFromFile in interface ISystemMouseCursor
Parameters:
fileName - The fileName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCursor

public int getCursor()
              throws IOException,
                     AutomationException
Currently loaded mouse cursor.

Description

The handle of the mouse cursor that is currently loaded into the SystemMouseCursor using the Load or LoadFromFile methods.

Product Availability

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

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

setCursor

public void setCursor(int mouseCursor)
               throws IOException,
                      AutomationException
Currently loaded mouse cursor.

Product Availability

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

Specified by:
setCursor in interface ISystemMouseCursor
Parameters:
mouseCursor - The mouseCursor (A COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.