com.esri.arcgis.systemUI
Class IItemDefProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.systemUI.IItemDefProxy
All Implemented Interfaces:
IItemDef, Externalizable, Serializable

public class IItemDefProxy
extends com.esri.arcgis.interop.Dispatch
implements IItemDef, 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), 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
  IItemDefProxy()
           
  IItemDefProxy(Object obj)
           
protected IItemDefProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void removeListener(String iidStr, Object theListener)
           
 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.
 
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

IItemDefProxy

public IItemDefProxy()

IItemDefProxy

public IItemDefProxy(Object obj)
              throws IOException
Throws:
IOException

IItemDefProxy

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

setID

public 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

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

setGroup

public 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

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

setSubType

public 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

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