com.esri.arcgis.systemUI
Class IOperationProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.systemUI.IOperationProxy
All Implemented Interfaces:
IOperation, Externalizable, Serializable
Direct Known Subclasses:
IEditOperationProxy, IReferenceScaleOperationProxy, ISchematicOperationProxy

public class IOperationProxy
extends com.esri.arcgis.interop.Dispatch
implements IOperation, Serializable

Provides access to members that control Operations.

Description

IOperation is a interface that supports creating custom undo and redo operations in either ArcMap, ArcCatalog or standalone applications. An operation is an action, or group of actions, that may be undone or redone.

By creating a class that implements IOperation, you can use the Do method to execute some action, and then the Undo method to reset the action from the Do method. The Redo method follows this paradigm to support any specialized actions needed for managing the re-application of the Do method.

By implementing your actions within the IOperation interface, you will automatically add them to the application's OperationStack.

Remarks

Verify the other classes that already implement IOperation, to avoid rewriting functions that already exist.

Product Availability

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

See Also:
IOperationStack, Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IOperationProxy()
           
  IOperationProxy(Object obj)
           
protected IOperationProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void esri_do()
          Performs the operation.
 String getMenuString()
          The menu string.
 boolean isCanRedo()
          Indicates if the operation can be redone.
 boolean isCanUndo()
          Indicates if the operation can be undone.
 void redo()
          Redoes the operation.
 void removeListener(String iidStr, Object theListener)
           
 void undo()
          Undoes the operation.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IOperationProxy

public IOperationProxy()

IOperationProxy

public IOperationProxy(Object obj)
                throws IOException
Throws:
IOException

IOperationProxy

protected IOperationProxy(Object obj,
                          String iid)
                   throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getMenuString

public String getMenuString()
                     throws IOException,
                            AutomationException
The menu string.

Description

The MenuString associated with the Operation. This is used by the application framework to populate the Edit menu in ArcMap. For example, adding a layer to ArcMap adds the menu string of the Operation "Undo Add Layers(s)" to the Edit menu.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMenuString in interface IOperation
Returns:
The text
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanUndo

public boolean isCanUndo()
                  throws IOException,
                         AutomationException
Indicates if the operation can be undone.

Description

CanUndo indicates if the operation can be un-done. Use the property before using the Undo method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanUndo in interface IOperation
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanRedo

public boolean isCanRedo()
                  throws IOException,
                         AutomationException
Indicates if the operation can be redone.

Description

CanRedo indicates if the operation can be re-done. Use the property before using the Redo method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanRedo in interface IOperation
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_do

public void esri_do()
             throws IOException,
                    AutomationException
Performs the operation.

Product Availability

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

Specified by:
esri_do in interface IOperation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

undo

public void undo()
          throws IOException,
                 AutomationException
Undoes the operation.

Description

Undo the operation to reset the action from the Do method. Use the CanUndo property to determine whether the operation can be un-done.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
undo in interface IOperation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

redo

public void redo()
          throws IOException,
                 AutomationException
Redoes the operation.

Description

Redo the operation to redo the action from the Do method. Use the CanRedo property to determine whether the operation can be re-done.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
redo in interface IOperation
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.