com.esri.arcgis.framework
Class IAcceleratorTableProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.framework.IAcceleratorTableProxy
All Implemented Interfaces:
IAcceleratorTable, Externalizable, Serializable

public class IAcceleratorTableProxy
extends com.esri.arcgis.interop.Dispatch
implements IAcceleratorTable, Serializable

Provides access to members that modify the accelerator table.

Description

An AcceleratorTable is an object that contains a list of accelerator keys and the command identifiers associated with them.

Remarks

Use the IDocument::Accelerators property to get access to the AcceleratorTable.

Product Availability

Available with ArcGIS Desktop.

See Also:
IDocument.getAccelerators(), 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
  IAcceleratorTableProxy()
           
  IAcceleratorTableProxy(Object obj)
           
protected IAcceleratorTableProxy(Object obj, String iid)
           
 
Method Summary
 boolean add(Object iD, int key, boolean bCtrl, boolean bAlt, boolean bShift)
          Adds a new accelerator to the accelerator table.
 void addListener(String iidStr, Object theListener, Object theSource)
           
 IArray find(Object iD)
          Finds the accelerator object/s currently associated with the specified command ID.
 IAccelerator findByKey(int key, boolean bCtrl, boolean bAlt, boolean bShift)
          Finds the accelerator object associated with the specified key combination.
 int getCount()
          The count of accelerator items in the table.
 IAccelerator getItem(int index)
          The accelerator object at the specified index.
 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

IAcceleratorTableProxy

public IAcceleratorTableProxy()

IAcceleratorTableProxy

public IAcceleratorTableProxy(Object obj)
                       throws IOException
Throws:
IOException

IAcceleratorTableProxy

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

getCount

public int getCount()
             throws IOException,
                    AutomationException
The count of accelerator items in the table.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
getCount in interface IAcceleratorTable
Returns:
The count
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItem

public IAccelerator getItem(int index)
                     throws IOException,
                            AutomationException
The accelerator object at the specified index.

Product Availability

Available with ArcGIS Desktop.

Specified by:
getItem in interface IAcceleratorTable
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.framework.IAccelerator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

add

public boolean add(Object iD,
                   int key,
                   boolean bCtrl,
                   boolean bAlt,
                   boolean bShift)
            throws IOException,
                   AutomationException
Adds a new accelerator to the accelerator table.

Description

ID specifies the unique identifier of the command that this accelerator activates. For built-in commands, use the UID. For VBA macros and UIControls, use a string representing the full name of the command.


Key specifies the keycode used for this accelerator. Use the Visual Basic Key Code constants for the value of Key.


bCtrl Use True if the Ctrl key is one of the keys used in the accelerator; otherwise use False.


bAlt Use True if the Alt key is one of the keys used in the accelerator; otherwise use False.


bShift Use True if the Shift key is one of the keys used in the accelerator; otherwise use False.

Remarks

In VBA, you can use the builtin ArcID module to find the unique identifier for a particular command.

In the following example, the keyboard accelerator CTRL+A is assigned to the built-in ArcMap Add Data command. You would get m_app from the hook in ICommand::OnCreate() .

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
add in interface IAcceleratorTable
Parameters:
iD - A Variant (in)
key - The key (in)
bCtrl - The bCtrl (in, optional, pass false if not required)
bAlt - The bAlt (in, optional, pass false if not required)
bShift - The bShift (in, optional, pass false if not required)
Returns:
The bSucceeded
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IAccelerator

find

public IArray find(Object iD)
            throws IOException,
                   AutomationException
Finds the accelerator object/s currently associated with the specified command ID.

Description


ID specifies the unique identifier of a command. For built-in commands, use the UID. For VBA macros and UIControls, use a string representing the full name of the command.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
find in interface IAcceleratorTable
Parameters:
iD - A Variant (in)
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findByKey

public IAccelerator findByKey(int key,
                              boolean bCtrl,
                              boolean bAlt,
                              boolean bShift)
                       throws IOException,
                              AutomationException
Finds the accelerator object associated with the specified key combination.

Description


Key The keycode used for this accelerator.


bCtrl True if the Ctrl key is one of the keys used in the accelerator; otherwise False.


bAlt True if the Alt key is one of the keys used in the accelerator; otherwise False.


bShift True if the Shift key is one of the keys used in the accelerator; otherwise False.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
findByKey in interface IAcceleratorTable
Parameters:
key - The key (in)
bCtrl - The bCtrl (in, optional, pass false if not required)
bAlt - The bAlt (in, optional, pass false if not required)
bShift - The bShift (in, optional, pass false if not required)
Returns:
A reference to a com.esri.arcgis.framework.IAccelerator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IAccelerator