com.esri.arcgis.controls
Class ICommandHookProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.controls.ICommandHookProxy
All Implemented Interfaces:
ICommandHook, Externalizable, Serializable

public class ICommandHookProxy
extends com.esri.arcgis.interop.Dispatch
implements ICommandHook, Serializable

Provides access to members that work with HookHelper. Custom control or application needs to implement ICommandHook to be recognized by HookHelper.

Description

Implement the ICommandHook interface in custom controls and applications if you want them to work with HookHelper objects. The HookHelper is designed to help developers write custom commands that will work with the ArcGIS Engine MapControl, PageLayoutControl, ToolbarControl and the ArcMap application as well as custom applications.

Product Availability

Available with ArcGIS Engine.

See Also:
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
  ICommandHookProxy()
           
  ICommandHookProxy(Object obj)
           
protected ICommandHookProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IActiveView getActiveView()
          Active view of control or application.
 IOperationStack getOperationStack()
          Operation stack of control or application used for undo/redo operation.
 IPageLayout getPageLayout()
          Page layout of control or application.
 void removeListener(String iidStr, Object theListener)
           
 
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

ICommandHookProxy

public ICommandHookProxy()

ICommandHookProxy

public ICommandHookProxy(Object obj)
                  throws IOException
Throws:
IOException

ICommandHookProxy

protected ICommandHookProxy(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

getActiveView

public IActiveView getActiveView()
                          throws IOException,
                                 AutomationException
Active view of control or application.

Description

The IActiveView object used by the custom control or application.

The HookHelper is often used in custom commands and the IHookHelper::ActiveView can return the IActiveView of the hook by using this property.

Product Availability

Available with ArcGIS Engine.

Specified by:
getActiveView in interface ICommandHook
Returns:
A reference to a com.esri.arcgis.carto.IActiveView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPageLayout

public IPageLayout getPageLayout()
                          throws IOException,
                                 AutomationException
Page layout of control or application. Return NULL if not supporting page layout.

Description

The IPageLayout object used by the custom control or application.

The HookHelper is often used in custom commands and the IHookHelper::PageLayout can return the IPageLayout of the hook by using this property.

Product Availability

Available with ArcGIS Engine.

Specified by:
getPageLayout in interface ICommandHook
Returns:
A reference to a com.esri.arcgis.carto.IPageLayout
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOperationStack

public IOperationStack getOperationStack()
                                  throws IOException,
                                         AutomationException
Operation stack of control or application used for undo/redo operation. Return NULL if control or application does not have its own operation stack.

Description

The IOperationStack object used by the custom control or application.

The HookHelper is often used in custom commands and the IHookHelper::OperationStack can return the IOperationStack of the hook by using this property. If the command has been added to a ToolbarControl the property will always return the IToolbarControl::OperationStack.

Product Availability

Available with ArcGIS Engine.

Specified by:
getOperationStack in interface ICommandHook
Returns:
A reference to a com.esri.arcgis.systemUI.IOperationStack
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.