com.esri.arcgis.systemUI
Class IMultiItemProxy

java.lang.Object
  extended bycom.esri.arcgis.interop.Dispatch
      extended bycom.esri.arcgis.systemUI.IMultiItemProxy
All Implemented Interfaces:
java.io.Externalizable, IMultiItem, java.io.Serializable

public class IMultiItemProxy
extends Dispatch
implements IMultiItem, java.io.Serializable

Provides access to members that define a multiItem.

Product Availability

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

See Also:
Serialized Form

Field Summary
static java.lang.Class targetClass
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF
 
Constructor Summary
  IMultiItemProxy()
          For internal use only
  IMultiItemProxy(java.lang.Object obj)
           
protected IMultiItemProxy(java.lang.Object obj, java.lang.String iid)
           
  IMultiItemProxy(java.lang.String CLSID, java.lang.String host, AuthInfo authInfo)
           
protected IMultiItemProxy(java.lang.String CLSID, java.lang.String iid, java.lang.String host, AuthInfo authInfo)
           
 
Method Summary
 void addListener(java.lang.String iidStr, java.lang.Object theListener, java.lang.Object theSource)
          Adds a Java object to be a listener for a specific kind of event generated by the COM object.
 java.lang.String getCaption()
          The caption of the multiItem.
 int getHelpContextID()
          The help context ID associated with this multiItem.
 java.lang.String getHelpFile()
          The name of the help file associated with this multiItem.
 int getItemBitmap(int index)
          The bitmap for the item at the specified index.
 java.lang.String getItemCaption(int index)
          The caption of the item at the specified index.
 java.lang.String getMessage()
          The status bar message for all items on the multiItem.
 java.lang.String getName()
          The name of the multiItem.
 boolean isItemChecked(int index)
          Indicates if item at the specified index is checked.
 boolean isItemEnabled(int index)
          Indicates if the item at the specified index is enabled.
 void onItemClick(int index)
          Occurs when the item at the specified index is clicked.
 int onPopup(java.lang.Object hook)
          Occurs when the menu that contains the multiItem is about to be displayed.
 void removeListener(java.lang.String iidStr, java.lang.Object theListener)
          Removes a Java object as a listener to events generated by a COM object.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, hashCode, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, readExternal, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

targetClass

public static final java.lang.Class targetClass
Constructor Detail

IMultiItemProxy

public IMultiItemProxy(java.lang.String CLSID,
                       java.lang.String host,
                       AuthInfo authInfo)
                throws java.net.UnknownHostException,
                       java.io.IOException

IMultiItemProxy

public IMultiItemProxy()
For internal use only


IMultiItemProxy

public IMultiItemProxy(java.lang.Object obj)
                throws java.io.IOException

IMultiItemProxy

protected IMultiItemProxy(java.lang.Object obj,
                          java.lang.String iid)
                   throws java.io.IOException

IMultiItemProxy

protected IMultiItemProxy(java.lang.String CLSID,
                          java.lang.String iid,
                          java.lang.String host,
                          AuthInfo authInfo)
                   throws java.io.IOException
Method Detail

addListener

public void addListener(java.lang.String iidStr,
                        java.lang.Object theListener,
                        java.lang.Object theSource)
                 throws java.io.IOException
Description copied from class: Dispatch
Adds a Java object to be a listener for a specific kind of event generated by the COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
addListener in class Dispatch
Parameters:
iidStr - the ID of the outgoing interface, implemented by the listener
theListener - the object to be informed of the events
theSource - the proxy class that represents the COM class that is the source of the events
Throws:
java.io.IOException

removeListener

public void removeListener(java.lang.String iidStr,
                           java.lang.Object theListener)
                    throws java.io.IOException
Description copied from class: Dispatch
Removes a Java object as a listener to events generated by a COM object. when you wish to invoke method on the COM object using IDispatch (not using custom marshalling).

Overrides:
removeListener in class Dispatch
Parameters:
iidStr - the ID of the outgoing interface, implemented by the listener
theListener - the object that no longer wishes to be informed of the events
Throws:
java.io.IOException

getName

public java.lang.String getName()
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IMultiItem
The name of the multiItem.

Supported Platforms

Windows, Solaris, Linux

Remarks

The Name property of a multiItem is a programmatic identifying name string. By convention, a multiItem's name should include its category name. The format of the Name string should be <Category>_<Caption>.

When implementing IMultiItem to create a custom multiItem, use the Name property to set the internal name of this multiItem.

Specified by:
getName in interface IMultiItem
Returns:
The name
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCaption

public java.lang.String getCaption()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IMultiItem
The caption of the multiItem.

Supported Platforms

Windows, Solaris, Linux

Remarks

When implementing IMultiItem to create a custom multiItem, use the Caption property to set the caption of the multiItem.

Specified by:
getCaption in interface IMultiItem
Returns:
The name
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessage

public java.lang.String getMessage()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IMultiItem
The status bar message for all items on the multiItem.

Supported Platforms

Windows, Solaris, Linux

Remarks

When implementing IMultiItem to create a custom multiItem, use the Message property to set the message string that appears in the statusbar of the application when the mouse passes over any of the items in this multiItem.

This assigns the same message to all of the items in the MultiItem. If you want a separate message for each item, then you should use the IMultiItem.ItemMessage property.

Specified by:
getMessage in interface IMultiItem
Returns:
The message
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getHelpFile

public java.lang.String getHelpFile()
                             throws java.io.IOException,
                                    AutomationException
Description copied from interface: IMultiItem
The name of the help file associated with this multiItem.

Supported Platforms

Windows, Solaris, Linux

Description

The HelpFile property is used to specify the name of the help file that contains the context sensitive help topic for your custom MulitItem.

This assigns the same HelpFile to all of the items in the MulitItem. If you want each item to have a separate HelpFile then you should use the IMultiItemEx.ItemHelpFile property instead.

Remarks

If you set both the HelpFile and HelpContextID properties, then an end-user of your multiItem can use the "What's This?" command in ArcMap or ArcCatalog to get help on your commands. Note, if you want your What's This help to look and behave the same as the standard ArcGIS commands, then you should create a WinHelp file instead of a HTMLHelp file.

If you have a WinHelp file (*.hlp), set IMultiItemHelpFile to the name of the help file containing the topic that describes the multiItem and set IMultiItem_HelpContextID to the topic ID's mapped numeric value. The topic ID is the so-called # footnote in the RTF file you include in your WinHelp file. You can use Help Workshop to add this numeric value by opening the HPJ file, clicking Map and then clicking Add (to add the mapping for an individual topic). See the help topic "To enable a program to display an individual Help topic" in the Help Workshop's help file.

If you have an HTMLHelp file (*.chm) the procedure is similar; specifiy the
.chm file as IMultiItem_HelpFile and the mapped numeric value as
IMultiItem_HelpContextID. Popup topics are problematic with HTMLHelp, but the help topic will display in a default or user-defined window.

As part of your deployment strategy register the name of the WinHelp file (*.hlp) as a new string value in:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/Help

Or if you're working with a HTMLHelp file (*.chm) register its name as a new string value in:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/HTMLHelp.

Specified by:
getHelpFile in interface IMultiItem
Returns:
The helpFile
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getHelpContextID

public int getHelpContextID()
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IMultiItem
The help context ID associated with this multiItem.

Supported Platforms

Windows, Solaris, Linux

Description

The HelpContextID property is used to specify the mapped numeric value of the topic ID of the context sensitive help topic for your custom MulitItem. Specify the name of your help file in the HelpFile property.

This assigns the same HelpContextID to all of the items in the MulitItem. If you want each item to have a separate HelpContextID then you should use the IMultiItemEx.ItemHelpContextID property instead.

Remarks

If you set both the HelpFile and HelpContextID properties, then an end-user of your multiItem can use the "What's This?" command in ArcMap or ArcCatalog to get help on your commands. Note, if you want your What's This help to look and behave the same as the standard ArcGIS commands, then you should create a WinHelp file instead of a HTMLHelp file.

If you have a WinHelp file (*.hlp), set IMultiItemHelpFile to the name of the help file containing the topic that describes the multiItem and set IMultiItem_HelpContextID to the topic ID's mapped numeric value. The topic ID is the so-called # footnote in the RTF file you include in your WinHelp file. You can use Help Workshop to add this numeric value by opening the HPJ file, clicking Map and then clicking Add (to add the mapping for an individual topic). See the help topic "To enable a program to display an individual Help topic" in the Help Workshop's help file.

If you have an HTMLHelp file (*.chm) the procedure is similar; specifiy the
.chm file as IMultiItem_HelpFile and the mapped numeric value as
IMultiItem_HelpContextID. Popup topics are problematic with HTMLHelp, but the help topic will display in a default or user-defined window.

As part of your deployment strategy register the name of the WinHelp file (*.hlp) as a new string value in:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/Help

Or if you're working with a HTMLHelp file (*.chm) register its name as a new string value in:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/HTMLHelp.

Specified by:
getHelpContextID in interface IMultiItem
Returns:
The iD
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

onPopup

public int onPopup(java.lang.Object hook)
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IMultiItem
Occurs when the menu that contains the multiItem is about to be displayed.

Supported Platforms

Windows, Solaris, Linux

Description

hook is a reference to an IApplication object.

Remarks

The OnPopup method occurs just before the menu containing the MultiItem is displayed. OnPopup provides a hook to the application object that instantiated the MultiItem and is also used to set the number of items in the MultiItem.

When implementing IMultiItem to create a custom multiItem, use the OnPopup method to get a hook to the application. Also, write code to determine how many items will make up this multiItem and return that number using IMultiItem_OnPopup. 

Specified by:
onPopup in interface IMultiItem
Parameters:
hook - A reference to another Automation Object (IDispatch) (in)
Returns:
The itemCount
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItemCaption

public java.lang.String getItemCaption(int index)
                                throws java.io.IOException,
                                       AutomationException
Description copied from interface: IMultiItem
The caption of the item at the specified index.

Supported Platforms

Windows, Solaris, Linux

Description

Index specifies the index of the current item on the multiItem.

Remarks

When implementing IMultiItem to create a custom multiItem, write code in the ItemCaption property to set the caption for each item in the multiItem.

Specified by:
getItemCaption in interface IMultiItem
Parameters:
index - The index (in)
Returns:
The itemName
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getItemBitmap

public int getItemBitmap(int index)
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IMultiItem
The bitmap for the item at the specified index.

Supported Platforms

Windows, Solaris, Linux

Description

Index specifies the index of the current item on the multiItem.

Remarks

When implementing IMultiItem to create a custom multiItem, use the ItemBitmap property to set the bitmaps to be used as the icons on the items in this multiItem.

You must use a Bitmap file (.bmp) for the ItemBitmap property; Icon files (.ico) are not supported. Bitmap files should be 16 X 16 pixels. The color of the upper left pixel of the bitmap is treated as the transparent color. For example, if the upper left pixel of the bitmap is red, then all of the red pixels in the bitmap will be converted to transparent.

Specified by:
getItemBitmap in interface IMultiItem
Parameters:
index - The index (in)
Returns:
The bitmap (A COM typedef)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

onItemClick

public void onItemClick(int index)
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IMultiItem
Occurs when the item at the specified index is clicked.

Supported Platforms

Windows, Solaris, Linux

Description

Index specifies the index of the item in the multiItem that was clicked. An Index of -1 means that no item was clicked.

Remarks

When implementing IMultiItem to create a custom multiItem, write code in the OnItemClick method to perform the action when an item in the multiItem is clicked. The index number of the clicked item is passed into this function. If no item was clicked, -1 is passed into this function.

Specified by:
onItemClick in interface IMultiItem
Parameters:
index - The index (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isItemChecked

public boolean isItemChecked(int index)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IMultiItem
Indicates if item at the specified index is checked.

Supported Platforms

Windows, Solaris, Linux

Description

Index specifies the index of the current item on the multiItem.

Remarks

The Checked property indicates the state of the items in the multiItem. If the bitmap of an item appears depressed on the menu, the item is checked. Commands and items that serve as a toggle will be checked when that toggle is on.
A system event is periodically called to set the state of the commands and items on commandbars and menus indicating which ones are checked.

Specified by:
isItemChecked in interface IMultiItem
Parameters:
index - The index (in)
Returns:
The bChecked
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

isItemEnabled

public boolean isItemEnabled(int index)
                      throws java.io.IOException,
                             AutomationException
Description copied from interface: IMultiItem
Indicates if the item at the specified index is enabled.

Supported Platforms

Windows, Solaris, Linux

Description

Index specifies the index of the current item on the multiItem.

Remarks

When implementing IMultiItem to create a custom multiItem, add some logic to the ItemEnabled property to specify in what state the application should be in for each item in the multiItem to be enabled.

Specified by:
isItemEnabled in interface IMultiItem
Parameters:
index - The index (in)
Returns:
The bEnabled
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.