com.esri.arcgis.systemUI
Interface IDataObjectHelper

All Superinterfaces:
Serializable
All Known Implementing Classes:
DataObjectHelper

public interface IDataObjectHelper
extends Serializable

Provides access to members for OLE drag and drop.

Description

Provides helper methods and properties for retrieving data from an IDataObject interface. IDataObject is a windows standard interface used for dragging and droping data. This is available directly through the InternalObject property.

Remarks

Typically used when dropping data onto the PageLayoutControl and MapControl from other applications.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux


Method Summary
 boolean canGetFiles()
          Indicates if files are available in the DataObject.
 boolean canGetNames()
          Indicates if ESRI names are available in the DataObject.
 Object getData(int format)
          If specified DataObject format can be retrieved, returns the data as safe array of bytes.
 Object getFiles()
          If the DataObject format supports files, returns a safe array of strings representing filenames.
 boolean getFormat(int format)
          Indicates if the DataObject supports the specified format.
 Object getInternalObject()
          Provides access to the internal IDataObject pointer.
 IEnumName getNames()
          If the DataObject format supports ESRI names, returns an enumerator of names.
 void setInternalObjectByRef(Object ppObject)
          Provides access to the internal IDataObject pointer.
 

Method Detail

setInternalObjectByRef

void setInternalObjectByRef(Object ppObject)
                            throws IOException,
                                   AutomationException
Provides access to the internal IDataObject pointer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getInternalObject

Object getInternalObject()
                         throws IOException,
                                AutomationException
Provides access to the internal IDataObject pointer.

Description

The internal DataObject implements the IDataObject interface. The DataObject gets populated before any OleDrop events (IMapControlEvents2::OnOleDrop or the IPageLayoutControlEvents::OnOleDrop) are triggered.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getData

Object getData(int format)
               throws IOException,
                      AutomationException
If specified DataObject format can be retrieved, returns the data as safe array of bytes.

Description

Returns a safe array of bytes from the DataObject, given the specified format. This safe arrray is not processed in anyway. Typically used when dropping data onto the PageLayoutControl and MapControl from other applications.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFormat

boolean getFormat(int format)
                  throws IOException,
                         AutomationException
Indicates if the DataObject supports the specified format.

Description

GetFormat returns the DataObject format code. The format code corresponds to a clipboard format that is unqiue to the system and is registered with the windows api function RegisterClipboardFormat. Other standard drag and drop formats are available. For example, 1 is used for text, 2 for a bitmap and 15 is used for a file list.

Use to test if the format of data in the DataObject matches the specified format. Typically used when dropping data onto the PageLayoutControl and MapControl from other applications.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

canGetFiles

boolean canGetFiles()
                    throws IOException,
                           AutomationException
Indicates if files are available in the DataObject.

Description

Indicates whether a safe array of filenames can be aquired from the DataObject. Iterate through the array to retrieve a list of filenames. This is typically used when dropping data from Windows Explorer onto the PageLayoutControl or MapControl.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFiles

Object getFiles()
                throws IOException,
                       AutomationException
If the DataObject format supports files, returns a safe array of strings representing filenames.

Description

Use this method when CanGetFiles returns true. Iterate through the safe array to retrieve a list of filenames. This is typically used when data is being dropped onto the PageLayoutControl or MapControl from Windows Explorer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

canGetNames

boolean canGetNames()
                    throws IOException,
                           AutomationException
Indicates if ESRI names are available in the DataObject.

Description

Indicates whether an IEnumName object can be aquired from the DataObject. Use the IEnumName object to enumerate over a set of IName objects. This is typically used when dropping data from ArcCatalog onto the PageLayoutControl or MapControl.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getNames

IEnumName getNames()
                   throws IOException,
                          AutomationException
If the DataObject format supports ESRI names, returns an enumerator of names.

Description

Use this method when CanGetNames returns true. Use the IEnumName object to enumerate over a set of IName objects. This is typically used when data is being dropped onto the PageLayoutControl or MapControl from ArcCatalog.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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