|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.framework.AcceleratorTable
public class AcceleratorTable
Accelerator Table Object.
An Accelerator is a mapping between a particular keyboard combination and a command. When you press the combination of keys on the keyboard, the command is executed. For example, Ctrl-C is a well-known accelerator for copying something in Windows. Some commands in the application already have accelerators assigned to them but you can also assign additional accelerators to these commands.
The AcceleratorTable is an object with a list of accelerator keys and the command identifiers associated with them. You can get a reference to the AcceleratorTable of a document using the IDocument.Accelerators property.
IAccelerator
,
Serialized FormConstructor Summary | |
---|---|
AcceleratorTable(Object obj)
Construct a AcceleratorTable using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
boolean |
add(Object iD,
int key,
boolean bCtrl,
boolean bAlt,
boolean bShift)
Adds a new accelerator to the accelerator table. |
boolean |
equals(Object o)
Compare this object with another |
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. |
void |
getClassID(GUID[] pClassID)
getClassID |
int |
getCount()
The count of accelerator items in the table. |
IAccelerator |
getItem(int index)
The accelerator object at the specified index. |
void |
getSizeMax(_ULARGE_INTEGER[] pcbSize)
getSizeMax |
int |
hashCode()
the hashcode for this object |
void |
isDirty()
isDirty |
void |
load(IStream pstm)
load |
void |
readExternal(ObjectInput in)
|
void |
save(IStream pstm,
int fClearDirty)
save |
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public AcceleratorTable(Object obj) throws IOException
obj
to AcceleratorTable
. *
AcceleratorTable o = (AcceleratorTable)obj; // will not work
AcceleratorTable o = new AcceleratorTable(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
AcceleratorTable theAcceleratorTable = (AcceleratorTable) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int getCount() throws IOException, AutomationException
getCount
in interface IAcceleratorTable
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IAccelerator getItem(int index) throws IOException, AutomationException
getItem
in interface IAcceleratorTable
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public boolean add(Object iD, int key, boolean bCtrl, boolean bAlt, boolean bShift) throws IOException, AutomationException
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.
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() .
add
in interface IAcceleratorTable
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAccelerator
public IArray find(Object iD) throws IOException, AutomationException
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.
find
in interface IAcceleratorTable
iD
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IAccelerator findByKey(int key, boolean bCtrl, boolean bAlt, boolean bShift) throws IOException, AutomationException
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.
findByKey
in interface IAcceleratorTable
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)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IAccelerator
public void getClassID(GUID[] pClassID) throws IOException, AutomationException
IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.
getClassID
in interface IPersist
pClassID
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void isDirty() throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
isDirty
in interface IPersistStream
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void load(IStream pstm) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
load
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void save(IStream pstm, int fClearDirty) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
save
in interface IPersistStream
pstm
- A reference to a com.esri.arcgis.system.IStream (in)fClearDirty
- The fClearDirty (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void getSizeMax(_ULARGE_INTEGER[] pcbSize) throws IOException, AutomationException
IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.
getSizeMax
in interface IPersistStream
pcbSize
- A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |