|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.systemUI.DataObjectHelper
public class 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(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. DataObjectHelper theDataObjectHelper = (DataObjectHelper) obj; |
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(Object o)
Compare this object with another |
static String |
getClsid()
getClsid. |
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. |
int |
hashCode()
the hashcode for this object |
void |
interfaceSupportsErrorInfo(GUID riid)
interfaceSupportsErrorInfo |
void |
setInternalObjectByRef(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 |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public DataObjectHelper() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic DataObjectHelper(Object obj) throws IOException
DataObjectHelper theDataObjectHelper = (DataObjectHelper) obj;
obj
to DataObjectHelper
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void setInternalObjectByRef(Object ppObject) throws IOException, AutomationException
setInternalObjectByRef
in interface IDataObjectHelper
ppObject
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getInternalObject
in interface IDataObjectHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getData
in interface IDataObjectHelper
format
- The format (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getFormat
in interface IDataObjectHelper
format
- The format (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
canGetFiles
in interface IDataObjectHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getFiles
in interface IDataObjectHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
canGetNames
in interface IDataObjectHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getNames
in interface IDataObjectHelper
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void interfaceSupportsErrorInfo(GUID riid) throws IOException, AutomationException
Indicates whether the interface supports IErrorInfo.
interfaceSupportsErrorInfo
in interface ISupportErrorInfo
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
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 |