|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IDataObjectHelper
Provides access to members for OLE drag and drop.
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.
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. |
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 |
---|
void setInternalObjectByRef(Object ppObject) throws IOException, AutomationException
ppObject
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getInternalObject() throws IOException, AutomationException
The internal DataObject implements the IDataObject interface. The DataObject gets populated before any OleDrop events (IMapControlEvents2::OnOleDrop or the IPageLayoutControlEvents::OnOleDrop) are triggered.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getData(int format) throws IOException, AutomationException
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.
format
- The format (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean getFormat(int format) throws IOException, AutomationException
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.
format
- The format (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean canGetFiles() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getFiles() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean canGetNames() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumName getNames() throws IOException, AutomationException
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.
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 |