com.esri.arcgis.controls
Class CommandPool

java.lang.Object
  extended by com.esri.arcgis.controls.CommandPool
All Implemented Interfaces:
ICommandPool, ICommandPool2, ICommandPoolEdit, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, java.io.Serializable

public class CommandPool
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, ICommandPool, ICommandPool2, ICommandPoolEdit, ISupportErrorInfo

COM Class 'CommandPool'. Generated 3/19/2015 1:20:47 PM from 'C:\ArcGIS\COM\esriControls.olb'

Description 'A collection of commands used by the ToolbarControl.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.controls.ICommandPool2
IID, IIDf8a444d1_6287_4dad_9303_618629c7b1f7, xxDummy
 
Fields inherited from interface com.esri.arcgis.controls.ICommandPool
IID85490941_3a6a_47c4_8e42_7f6997534ddf
 
Fields inherited from interface com.esri.arcgis.controls.ICommandPoolEdit
IID, IIDcbb44409_c9b4_400b_be35_446516674392, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Constructor Summary
CommandPool()
          Constructs a CommandPool using ArcGIS Engine.
CommandPool(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
CommandPool theCommandPool = (CommandPool) obj;
 
Method Summary
 void addCommand(ICommand command, IUID pUID)
          Adds the specified command to the command pool.
 IArray addUID(IUID uID)
          Adds the given UID to the command pool and returns an array of command objects.
 void callOnCreate(ICommand pCommand)
          Calls the specified command OnCreate method if the Hook is set and OnCreate has not already been called.
 boolean created(ICommand command)
          Indicates if the commands OnCreate method has been called.
 boolean equals(java.lang.Object o)
          Compare this object with another
 boolean exists(ICommand command)
          Indicates if the given command exists in the command pool.
 ICommand findByUID(IUID uID)
          Searches the command pool for the given UID.
static java.lang.String getClsid()
          getClsid.
 ICommand getCommand(int index)
          The command at the given index.
 int getCount()
          The number of commands in the command pool.
 java.lang.Object getHook()
          The object that is passed as a hook to the OnCreate method on the command.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 IUID getUID(ICommand command)
          The UID of the given command.
 int getUsageCount(ICommand command)
          The number of items using the given command.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void release()
          Release a CommandPool.
 void remove(ICommand command)
          Decrements the usage count of the command.
 void removeAll()
          Removes all commands from the command pool, regardless of each commands usage count.
 void setHook(java.lang.Object pHook)
          Sets the object that is passed as a hook to the OnCreate method on the command.
 boolean translateAcceleratorKey(int keyCode)
          Translates the specified keyCode, if a corresponding accelerator exists.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandPool

public CommandPool()
            throws java.io.IOException,
                   java.net.UnknownHostException
Constructs a CommandPool using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

CommandPool

public CommandPool(java.lang.Object obj)
            throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
CommandPool theCommandPool = (CommandPool) obj;

Construct a CommandPool using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to CommandPool.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a CommandPool.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

getCount

public int getCount()
             throws java.io.IOException,
                    AutomationException
The number of commands in the command pool.

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

getUsageCount

public int getUsageCount(ICommand command)
                  throws java.io.IOException,
                         AutomationException
The number of items using the given command.

Specified by:
getUsageCount in interface ICommandPool
Parameters:
command - A reference to a com.esri.arcgis.systemUI.ICommand (in)
Returns:
The pVal
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exists

public boolean exists(ICommand command)
               throws java.io.IOException,
                      AutomationException
Indicates if the given command exists in the command pool.

Specified by:
exists in interface ICommandPool
Parameters:
command - A reference to a com.esri.arcgis.systemUI.ICommand (in)
Returns:
The res
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findByUID

public ICommand findByUID(IUID uID)
                   throws java.io.IOException,
                          AutomationException
Searches the command pool for the given UID. Returns matching command if the UID is found or nothing.

Specified by:
findByUID in interface ICommandPool
Parameters:
uID - A reference to a com.esri.arcgis.system.IUID (in)
Returns:
A reference to a com.esri.arcgis.systemUI.ICommand
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUID

public IUID getUID(ICommand command)
            throws java.io.IOException,
                   AutomationException
The UID of the given command. May return nothing.

Specified by:
getUID in interface ICommandPool
Parameters:
command - A reference to a com.esri.arcgis.systemUI.ICommand (in)
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCommand

public ICommand getCommand(int index)
                    throws java.io.IOException,
                           AutomationException
The command at the given index.

Specified by:
getCommand in interface ICommandPool
Parameters:
index - The index (in)
Returns:
A reference to a com.esri.arcgis.systemUI.ICommand
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

created

public boolean created(ICommand command)
                throws java.io.IOException,
                       AutomationException
Indicates if the commands OnCreate method has been called.

Specified by:
created in interface ICommandPool
Parameters:
command - A reference to a com.esri.arcgis.systemUI.ICommand (in)
Returns:
The pVal
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

translateAcceleratorKey

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

Specified by:
translateAcceleratorKey in interface ICommandPool2
Parameters:
keyCode - The keyCode (in)
Returns:
The bHandled
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addCommand

public void addCommand(ICommand command,
                       IUID pUID)
                throws java.io.IOException,
                       AutomationException
Adds the specified command to the command pool. If the command already exists its usage count incremented by 1.

Specified by:
addCommand in interface ICommandPoolEdit
Parameters:
command - A reference to a com.esri.arcgis.systemUI.ICommand (in)
pUID - A reference to a com.esri.arcgis.system.IUID (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addUID

public IArray addUID(IUID uID)
              throws java.io.IOException,
                     AutomationException
Adds the given UID to the command pool and returns an array of command objects.

Specified by:
addUID in interface ICommandPoolEdit
Parameters:
uID - A reference to a com.esri.arcgis.system.IUID (in)
Returns:
A reference to a com.esri.arcgis.system.IArray
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remove

public void remove(ICommand command)
            throws java.io.IOException,
                   AutomationException
Decrements the usage count of the command. If this reaches zero the command is removed from the command pool.

Specified by:
remove in interface ICommandPoolEdit
Parameters:
command - A reference to a com.esri.arcgis.systemUI.ICommand (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeAll

public void removeAll()
               throws java.io.IOException,
                      AutomationException
Removes all commands from the command pool, regardless of each commands usage count.

Specified by:
removeAll in interface ICommandPoolEdit
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

callOnCreate

public void callOnCreate(ICommand pCommand)
                  throws java.io.IOException,
                         AutomationException
Calls the specified command OnCreate method if the Hook is set and OnCreate has not already been called.

Specified by:
callOnCreate in interface ICommandPoolEdit
Parameters:
pCommand - A reference to a com.esri.arcgis.systemUI.ICommand (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHook

public void setHook(java.lang.Object pHook)
             throws java.io.IOException,
                    AutomationException
Sets the object that is passed as a hook to the OnCreate method on the command.

Specified by:
setHook in interface ICommandPoolEdit
Parameters:
pHook - A reference to another Automation Object (IDispatch) (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getHook

public java.lang.Object getHook()
                         throws java.io.IOException,
                                AutomationException
The object that is passed as a hook to the OnCreate method on the command.

Specified by:
getHook in interface ICommandPoolEdit
Returns:
A reference to another Automation Object (IDispatch)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.