com.esri.arcgis.framework
Class MouseCursor

java.lang.Object
  extended by com.esri.arcgis.framework.MouseCursor
All Implemented Interfaces:
IMouseCursor, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class MouseCursor
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMouseCursor

The the system mouse cursor.

Description

The MouseCursor is a reference to the system mouse cursor object. You can use MouseCursor to set the system mouse cursor to be one of the standard built-in cursors or a custom cursor. This is useful if you want to display a wait cursor while you code performs a large process.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
MouseCursor()
          Constructs a MouseCursor using ArcGIS Engine.
MouseCursor(Object obj)
          Construct a MouseCursor using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void setCursor(Object cursorID)
          Sets the application's cursor to cursor id or picture object specified by cursorID.
 
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

MouseCursor

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

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

MouseCursor

public MouseCursor(Object obj)
            throws IOException
Construct a MouseCursor using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MouseCursor.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems MouseCursor theMouseCursor = (MouseCursor) obj;
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

setCursor

public void setCursor(Object cursorID)
               throws IOException,
                      AutomationException
Sets the application's cursor to cursor id or picture object specified by cursorID. The cursor is automatically reset when the MouseCursor instance is released.

Description

The values for cursorID are:

Remarks

You can use one of the built-in cursors, or you can set the cursor to a custom cursor. You can use either cursor files (.cur) or icon files (.ico). The cursor is automatically reset when the MouseCursor instance is released. The instance is released when the calling procedure ends, when the variable that references the mouse cursor is set to nothing, or when something, such as the display of a message box, overrides Windows messaging.

The following example uses the built-in wait cursor. The cursor is automatically reset when this Sub procedure ends. You would get m_app from the hook in ICommand::OnCreate().

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
setCursor in interface IMouseCursor
Parameters:
cursorID - A Variant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.