com.esri.arcgis.systemUI
Interface ICommandSubType

All Superinterfaces:
Serializable
All Known Implementing Classes:
ControlsInkEraserTool, ControlsInkHighlightTool, ControlsInkPenTool

public interface ICommandSubType
extends Serializable

Provides access to members that define a subtyped command.

When To Use

The ICommandSubType interface is used when you want to have more than one command in a single class. You would implement both ICommand and ICommandSubType in your class. With the ICommandSubType interface you would specify how many subtypes there are. Then, within the implementation each ICommand property you would set the property for each subtype instead of implementing the ICommand interface multiple times.

Product Availability

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

See Also:
ICommand

Method Summary
 int getCount()
          The number of commands defined with this CLSID.
 void setSubType(int subType)
          The subtype of the command.
 

Method Detail

setSubType

void setSubType(int subType)
                throws IOException,
                       AutomationException
The subtype of the command.

Remarks

A separate instance of the subtyped command is created for each command item required, and it's Subtype is set after instantiation. The subtype of any instance will remain throughout the instance's lifetime, but will vary from instance to instance. Save the value which is passed to SetSubType as a member variable, so that you can complete the members of ICommand appropriately.

Use a case statement in each property of ICommand to determine which subtype is being queried.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getCount

int getCount()
             throws IOException,
                    AutomationException
The number of commands defined with this CLSID.

Remarks

Decide how many Command objects you will be providing in the class, and return this value from GetCount.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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