com.esri.arcgis.controls
Interface IToolbarItem2

All Superinterfaces:
IToolbarItem, Serializable
All Known Implementing Classes:
IToolbarItem2Proxy, ToolbarItem

public interface IToolbarItem2
extends IToolbarItem, Serializable

Provides access to members that control ToolbarControl items.

Description

A ToolbarItem represents a Command, Tool, ToolControl, MultiItem, Menu or Palette on the ToolbarControl.

Product Availability

Available with ArcGIS Engine.


Method Summary
 Object getItemObject()
          The Command, Tool, ToolControl, ToolbarMenu, ToolbarPalette or MultiItem used by the item.
 IMultiItem getMultiItem()
          If the item is a multi-item, this property is a MultiItem object.
 IToolbarPalette getPalette()
          If the item is a palette, this property is a ToolbarPalette object.
 int getType()
          The type of item
 
Methods inherited from interface com.esri.arcgis.controls.IToolbarItem
getCommand, getCustomProperty, getGroupSpacing, getMenu, getStyle, getUID, isGroup, setCustomProperty, setGroup, setGroupSpacing, setStyle
 

Method Detail

getPalette

IToolbarPalette getPalette()
                           throws IOException,
                                  AutomationException
If the item is a palette, this property is a ToolbarPalette object.

Description

Returns the IToolbarPalette used by the item if the item represents a palette. If the item does not use a palette Nothing is returned.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to a com.esri.arcgis.controls.IToolbarPalette
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMultiItem

IMultiItem getMultiItem()
                        throws IOException,
                               AutomationException
If the item is a multi-item, this property is a MultiItem object.

Description

Returns the IMultiItem object used by the item if the item represents a multi-item. If the item does not use a multi-item Nothing is returned.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to a com.esri.arcgis.systemUI.IMultiItem
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

int getType()
            throws IOException,
                   AutomationException
The type of item

Description

Returns the type of object returned by ItemObject.

Product Availability

Available with ArcGIS Engine.

Returns:
A com.esri.arcgis.controls.esriToolbarItemType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItemObject

Object getItemObject()
                     throws IOException,
                            AutomationException
The Command, Tool, ToolControl, ToolbarMenu, ToolbarPalette or MultiItem used by the item.

Description

Returns the ICommand, ITool, IToolControl, IMultiItem, IToolbarMenu2 or IToolbarPalette object from the ToolbarItem. Use the Type property to determine the type of object to be returned before using the ItemObject property.

Product Availability

Available with ArcGIS Engine.

Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.