com.esri.arcgis.systemUI
Interface IDataObjectHelper

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DataObjectHelper, IDataObjectHelperProxy

public interface IDataObjectHelper
extends java.io.Serializable

Provides access to members for OLE drag and drop.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.


Method Summary
 boolean canGetFiles()
          Indicates if files are available in the DataObject.
 boolean canGetNames()
          Indicates if ESRI names are available in the DataObject.
 java.lang.Object getData(int format)
          If specified DataObject format can be retrieved, returns the data as safe array of bytes.
 java.lang.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.
 java.lang.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(java.lang.Object ppObject)
          Provides access to the internal IDataObject pointer.
 

Method Detail

setInternalObjectByRef

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

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

getInternalObject

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

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getData

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

Supported Platforms

Windows, Solaris, Linux

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.

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

getFormat

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

Supported Platforms

Windows, Solaris, Linux

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.

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

canGetFiles

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

Supported Platforms

Windows, Solaris, Linux

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.

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

getFiles

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

Supported Platforms

Windows, Solaris, Linux

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.

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

canGetNames

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

Supported Platforms

Windows, Solaris, Linux

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. 

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

getNames

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

Supported Platforms

Windows, Solaris, Linux

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.

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