|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ICommandSubType
Provides access to members that define a subtyped command.
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.
ICommand
Method Summary | |
---|---|
int |
getCount()
The number of commands defined with this CLSID. |
void |
setSubType(int subType)
The subtype of the command. |
Method Detail |
---|
void setSubType(int subType) throws IOException, AutomationException
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.
subType
- The subType (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getCount() throws IOException, AutomationException
Decide how many Command objects you will be providing in the class, and return this value from GetCount.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |