com.esri.arcgis.controls
Interface ICommandPool

All Superinterfaces:
Serializable
All Known Subinterfaces:
ICommandPool2
All Known Implementing Classes:
CommandPool

public interface ICommandPool
extends Serializable

Provides access to the contents of the command pool.

Superseded By

ICommandPool2

Description

The ICommandPool interface is used to access the collection of commands used by the ToolbarControl or a ToolbarMenu or ToolbarPalette, or the commands shared between several ToolbarControl's. The ToolbarControl manages its CommandPool itself in order to maintain its command items. If a ToolbarMenu or ToolbarPalette are added to a ToolbarControl they will automatically share the same CommandPool as the ToolbarControl. If a ToolbarMenu or ToolbarPalette are used standalone they will mange their own CommandPool.

Remarks

Use the CommandPool to determine if a particular Command Exists, and to then retrieve its UsageCount, UID and Created properties. The Created property indicates whether the ICommand::OnCreate method has been called. Alternatively, iterate the contents of the CommandPool by using the Count and Command properties or the FindByUID method.

Product Availability

Available with ArcGIS Engine.


Method Summary
 boolean created(ICommand command)
          Indicates if the commands OnCreate method has been called.
 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.
 ICommand getCommand(int index)
          The command at the given index.
 int getCount()
          The number of commands in the command pool.
 IUID getUID(ICommand command)
          The UID of the given command.
 int getUsageCount(ICommand command)
          The number of items using the given command.
 

Method Detail

getCount

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

Description

Returns the number of commands in the CommandPool.

Product Availability

Available with ArcGIS Engine.

Returns:
The pVal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getUsageCount

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

Product Availability

Available with ArcGIS Engine.

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

exists

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

Description

Indicates whether the specified command exists in the CommandPool.

Product Availability

Available with ArcGIS Engine.

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

findByUID

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

Description

Searches the CommandPool for the specified UID, and returns the matching Command. Returns Nothing if the UID cannot be found. For commands that implement ICommandSubType, the IUID::SubType must be specified, otherwise Nothing will be returned.

Product Availability

Available with ArcGIS Engine.

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

getUID

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

Product Availability

Available with ArcGIS Engine.

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

getCommand

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

Product Availability

Available with ArcGIS Engine.

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

created

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

Description

Indicates if the specified command's ICommand::OnCreate method has been called.

Product Availability

Available with ArcGIS Engine.

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