com.esri.arcgis.systemUI
Interface IItemDef

All Superinterfaces:
Serializable
All Known Implementing Classes:
IItemDefProxy

public interface IItemDef
extends Serializable

Provides access to members that define an item on a commandbar.

When To Use

The IItemDef interface is used to define a command item that's on a toolbar or menu. This interface specifies the identifier (CLSID or ProgID) of the command and its subtype if there is one. It also determines whether this item begins a group on the toolbar or menu. Use the IItemDef interface with the GetItemInfo method on either the IToolbarDef or the IMenuDef interface to define the items on the toolbar or menu.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
com.esri.arcgis.systemUI.IMenuBarDef, IToolBarDef.getItemInfo(int, com.esri.arcgis.systemUI.IItemDef)

Method Summary
 void setGroup(boolean rhs1)
          Indicates if the defined item should start a group on the menu or toolbar.
 void setID(String rhs1)
          The CLSID or PROGID of the item being defined.
 void setSubType(int rhs1)
          The subtype of the item being defined.
 

Method Detail

setID

void setID(String rhs1)
           throws IOException,
                  AutomationException
The CLSID or PROGID of the item being defined.

Remarks

The IDproperty is a string representing either the CLSID or ProgID of the coclass for a command or menu. COM coclasses are identified by a globally unique identifier (GUID). The GUID for a coclass is called class ID (CLSID). A ProgID is a text alias for a CLSID; the ProgID is a string composed of the project name and the class name of the coclass.


To find the CLSID, ProgID, and subtype of a built-in command or menu in ArcMap or ArcCatalog, refer to the following technical documents:
ArcObjects Developer Help > Technical Documents > ArcMap: Names and IDs of commands and commandbars
ArcObjects Developer Help > Technical Documents > ArcCatalog: Names and IDs of commands and commandbars

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

setGroup

void setGroup(boolean rhs1)
              throws IOException,
                     AutomationException
Indicates if the defined item should start a group on the menu or toolbar.

Remarks

Use True for Group if the item is to be the first item in a group on the toolbar or menu; a separator bar will be placed to the left of the item. Use False, the default, for Group if the item does not start a group.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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

setSubType

void setSubType(int rhs1)
                throws IOException,
                       AutomationException
The subtype of the item being defined.

Remarks

Some commands are subtyped (i.e. they implement ICommandSubtype). If a class implements both ICommand and ICommandSubtype, then there is more than one command defined in that single class. Each individual command has an identifier known as a subtype. This command class has only one GUID, so in order to get access to each individual command in that class, you need to use the subtypes. That is why IItemDef has both an ID property and a SubType property. You only need to use the SubType property if you are working with a subtyped command.

If the command you want to use is a subtyped command, use the SubType property to specify which subtype of the command you want.

To find the CLSID, ProgID, and subtype of a built-in command in ArcMap or ArcCatalog, refer to the following technical documents:

ArcObjects Developer Help > Technical Documents > ArcMap: Names and IDs of commands and commandbars

ArcObjects Developer Help > Technical Documents > ArcCatalog: Names and IDs of commands and commandbars

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

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