com.esri.arcgis.controls
Interface ICommandPool2

All Superinterfaces:
ICommandPool, Serializable
All Known Implementing Classes:
CommandPool

public interface ICommandPool2
extends ICommandPool, Serializable

Provides access to the contents of the command pool.

Product Availability

Available with ArcGIS Engine.


Method Summary
 boolean translateAcceleratorKey(int keyCode)
          Translates the specified keyCode, if a corresponding accelerator exists.
 
Methods inherited from interface com.esri.arcgis.controls.ICommandPool
created, exists, findByUID, getCommand, getCount, getUID, getUsageCount
 

Method Detail

translateAcceleratorKey

boolean translateAcceleratorKey(int keyCode)
                                throws IOException,
                                       AutomationException
Translates the specified keyCode, if a corresponding accelerator exists.

Description

Returns whether the specified keyCode is a supported accelerator (shortcut) or access key, defined in an ICommand::Caption property of a Command in the CommandPool. To translate an accelerator key, the ICommand::OnClick method must be called.

For example, a 'Close' command with the caption "&Close\tAlt+F4" has the 'ALT+F4' key combination as its shortcut key, and the 'C' key as its access key.

When using the TranslateAcceleratorKey pass the keyCode of the none system key only. For example, if the accelerator is "Ctrl+K", pass the keyCode for "K" to TranslateAcceleratorKey. The system will automatically check for the system key "Ctrl".

Product Availability

Available with ArcGIS Engine.

Parameters:
keyCode - The keyCode (in)
Returns:
The bHandled
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.