|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.arcgis.systemUI.DataObjectHelper
Helper class 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.
The DataObjectHelper can be used by the MapControl and PageLayoutControl to control drag-and-drop operations.
The NameFactory class (defined in esriSystem) performs a similar job for Name objects with non-ESRI controls, though the DataObjectHelper handles drag-and-drop for both Name objects and file names.
| Constructor Summary | |
DataObjectHelper()
Constructs a DataObjectHelper using ArcGIS Engine. |
|
DataObjectHelper(java.lang.Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. |
|
| Method Summary | |
boolean |
canGetFiles()
Indicates if files are available in the DataObject. |
boolean |
canGetNames()
Indicates if ESRI names are available in the DataObject. |
boolean |
equals(java.lang.Object o)
Compare this object with another |
IDataObjectHelper |
getAsIDataObjectHelper()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
ISupportErrorInfo |
getAsISupportErrorInfo()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
static java.lang.String |
getClsid()
|
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. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
Supported Platforms |
void |
setInternalObjectByRef(java.lang.Object ppObject)
Provides access to the internal IDataObject pointer. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DataObjectHelper()
throws java.io.IOException,
java.net.UnknownHostException
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems
public DataObjectHelper(java.lang.Object obj)
throws java.io.IOException
obj to DataObjectHelper. DataObjectHelper theDataObjectHelper = (DataObjectHelper) obj;
obj - an object returned from ArcGIS Engine or Server
java.io.IOException - if there are interop problems| Method Detail |
public static java.lang.String getClsid()
public IDataObjectHelper getAsIDataObjectHelper()
public ISupportErrorInfo getAsISupportErrorInfo()
public boolean equals(java.lang.Object o)
public int hashCode()
public void setInternalObjectByRef(java.lang.Object ppObject)
throws java.io.IOException,
AutomationException
IDataObjectHelper
setInternalObjectByRef in interface IDataObjectHelperppObject - A reference to another Object (IUnknown) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.Object getInternalObject()
throws java.io.IOException,
AutomationException
IDataObjectHelperThe internal DataObject implements the IDataObject interface. The DataObject gets populated before any OleDrop events (IMapControlEvents2::OnOleDrop or the IPageLayoutControlEvents::OnOleDrop) are triggered.
getInternalObject in interface IDataObjectHelperjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.Object getData(int format)
throws java.io.IOException,
AutomationException
IDataObjectHelperReturns 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.
getData in interface IDataObjectHelperformat - The format (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean getFormat(int format)
throws java.io.IOException,
AutomationException
IDataObjectHelperGetFormat 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.
getFormat in interface IDataObjectHelperformat - The format (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean canGetFiles()
throws java.io.IOException,
AutomationException
IDataObjectHelperIndicates 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.
canGetFiles in interface IDataObjectHelperAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.Object getFiles()
throws java.io.IOException,
AutomationException
IDataObjectHelperUse 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.
getFiles in interface IDataObjectHelperAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public boolean canGetNames()
throws java.io.IOException,
AutomationException
IDataObjectHelperIndicates 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.
canGetNames in interface IDataObjectHelperAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IEnumName getNames()
throws java.io.IOException,
AutomationException
IDataObjectHelperUse 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.
getNames in interface IDataObjectHelperAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void interfaceSupportsErrorInfo(GUID riid)
throws java.io.IOException,
AutomationException
ISupportErrorInfoIndicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo in interface ISupportErrorInforiid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||