Package muntjac :: Package event :: Module transferable :: Class ITransferable
[hide private]
[frames] | no frames]

Class ITransferable

source code

object --+
         |
        ITransferable
Known Subclasses:

ITransferable wraps the data that is to be imported into another component. Currently ITransferable is only used for drag and drop.

Instance Methods [hide private]
 
getData(self, dataFlavor)
Returns the data from ITransferable by its data flavor (aka data type).
source code
 
setData(self, dataFlavor, value)
Stores data of given data flavor to ITransferable.
source code
 
getDataFlavors(self)
Returns: a collection of data flavors ( data types ) available in this ITransferable
source code
 
getSourceComponent(self)
Returns: the component that created the ITransferable or null if the source component is unknown
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

getData(self, dataFlavor)

source code 

Returns the data from ITransferable by its data flavor (aka data type). Data types can be any string keys, but MIME types like "text/plain" are commonly used.

Note, implementations of ITransferable often provide a better typed API for accessing data.

Parameters:
  • dataFlavor - the data flavor to be returned from ITransferable
Returns:
the data stored in the ITransferable or null if ITransferable contains no data for given data flavour

setData(self, dataFlavor, value)

source code 

Stores data of given data flavor to ITransferable. Possibly existing value of the same data flavor will be replaced.

Parameters:
  • dataFlavor - the data flavor
  • value - the new value of the data flavor

getDataFlavors(self)

source code 
Returns:
a collection of data flavors ( data types ) available in this ITransferable

getSourceComponent(self)

source code 
Returns:
the component that created the ITransferable or null if the source component is unknown