com.esri.arcgis.controls
Interface IHookActions

All Superinterfaces:
Serializable
All Known Implementing Classes:
GlobeHookHelper, HookHelper

public interface IHookActions
extends Serializable

Provides access to actions such as flashing, panning and zooming that help in the development of commands to work with controls, custom controls and applications.

Description

Use IHookActions to flash, label and navigate around geometry objects implementing IEnvelope, IPoint, IPolygon and IPolyline.

Product Availability

Available with ArcGIS Engine.


Method Summary
 void doAction(Object pUnknown, int action)
          Perform the action on the object.
 void doActionOnMultiple(IArray pArray, int action)
          Perform the action on the array of objects.
 void doActionWithName(Object pUnknown, String name, int action)
          Perform the action on the object using the name.
 void doActionWithNameOnMultiple(IArray pArray, IStringArray pNamesArray, int action)
          Perform the action on the array of objects using the array of names.
 boolean isActionSupported(Object pUnknown, int action)
          Indicates whether the specified action can be performed on the object.
 boolean isActionSupportedOnMultiple(IArray pArray, int action)
          Indicates whether the specified action can be performed on the array of objects.
 

Method Detail

isActionSupported

boolean isActionSupported(Object pUnknown,
                          int action)
                          throws IOException,
                                 AutomationException
Indicates whether the specified action can be performed on the object.

Product Availability

Available with ArcGIS Engine.

Parameters:
pUnknown - A reference to another Object (IUnknown) (in)
action - A com.esri.arcgis.controls.esriHookActions constant (in)
Returns:
The pIsEnable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isActionSupportedOnMultiple

boolean isActionSupportedOnMultiple(IArray pArray,
                                    int action)
                                    throws IOException,
                                           AutomationException
Indicates whether the specified action can be performed on the array of objects.

Product Availability

Available with ArcGIS Engine.

Parameters:
pArray - A reference to a com.esri.arcgis.system.IArray (in)
action - A com.esri.arcgis.controls.esriHookActions constant (in)
Returns:
The pIsEnable
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doAction

void doAction(Object pUnknown,
              int action)
              throws IOException,
                     AutomationException
Perform the action on the object.

Description

DoAction performs the specified Action on the specified object in the ActiveView. For example, pass esriHookActionsZoom to zoom to the extent of the specified object. Use the ActionSupported method before DoAction is ensure the specified Action is supported.

pUnknown must be an object implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry should not be empty.

Remarks

When passing DoAction an object implementing IPoint and esriHookActionsZoom, if the width of the specified geometry is zero, the display will be zoomed to 1/20th of the width of the full extent of the data. If the height of the current visible extent is less than 1/20th of the height of the full extent of the data, the current visible extent is used instead.

Product Availability

Available with ArcGIS Engine.

Parameters:
pUnknown - A reference to another Object (IUnknown) (in)
action - A com.esri.arcgis.controls.esriHookActions constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doActionWithName

void doActionWithName(Object pUnknown,
                      String name,
                      int action)
                      throws IOException,
                             AutomationException
Perform the action on the object using the name.

Description

DoActionWithName performs the specified Action on the specified object with the specified name string in the ActiveView. For example, pass esriHookActionsLabel to label the specified object with the specfied label. Use the ActionSupported method before DoActionWithName is ensure the specified Action is supported.

pUnknown must be an object implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry should not be empty.

Name is the string used by esriHookActionsLabel and esriHookActionsCallout actions.

Remarks

When passing DoActionWithName an object implementing IPoint and esriHookActionsZoom, if the width of the specified geometry is zero, the display will be zoomed to 1/20th of the width of the full extent of the data. If the height of the current visible extent is less than 1/20th of the height of the full extent of the data, the current visible extent is used instead.

Product Availability

Available with ArcGIS Engine.

Parameters:
pUnknown - A reference to another Object (IUnknown) (in)
name - The name (in)
action - A com.esri.arcgis.controls.esriHookActions constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doActionOnMultiple

void doActionOnMultiple(IArray pArray,
                        int action)
                        throws IOException,
                               AutomationException
Perform the action on the array of objects.

Description

DoActionOnMultiple performs the specified Action on the objects in the specified array in the ActiveView. For example, pass esriHookActionsZoom to zoom to the extent of the specified objects. Use the ActionSupportedOnMultiple method before DoActionOnMultiple is ensure the specified Action is supported.

pArray must contain objects implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry of each object should not be empty.

Product Availability

Available with ArcGIS Engine.

Parameters:
pArray - A reference to a com.esri.arcgis.system.IArray (in)
action - A com.esri.arcgis.controls.esriHookActions constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

doActionWithNameOnMultiple

void doActionWithNameOnMultiple(IArray pArray,
                                IStringArray pNamesArray,
                                int action)
                                throws IOException,
                                       AutomationException
Perform the action on the array of objects using the array of names.

Description

DoActionWithNameOnMultiple performs the specified Action on the objects in the specified array in the ActiveView. For example, pass esriHookActionsLabel to label the specified objects with the specfied labels. Use the ActionSupportedOnMultiple method before DoActionWithNameOnMultiple is ensure the specified Action is supported.

pArray must contain objects implementing IEnvelope, IPoint, IPolygon or IPolyline and the geometry of each object should not be empty.

pNamesArray is an array of strings used by esriHookActionsLabel and esriHookActionsCallout actions.

Ensure pArray and pNamesArray contain the same number of elements.

Product Availability

Available with ArcGIS Engine.

Parameters:
pArray - A reference to a com.esri.arcgis.system.IArray (in)
pNamesArray - A reference to a com.esri.arcgis.system.IStringArray (in)
action - A com.esri.arcgis.controls.esriHookActions constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.