Package com.vaadin.event
Class TransferableImpl
- java.lang.Object
-
- com.vaadin.event.TransferableImpl
-
- All Implemented Interfaces:
Transferable,java.io.Serializable
- Direct Known Subclasses:
DragAndDropWrapper.WrapperTransferable
public class TransferableImpl extends java.lang.Object implements Transferable
TODO Javadoc!- Since:
- 6.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TransferableImpl(Component sourceComponent, java.util.Map<java.lang.String,java.lang.Object> rawVariables)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetData(java.lang.String dataFlavor)Returns the data from Transferable by its data flavor (aka data type).java.util.Collection<java.lang.String>getDataFlavors()ComponentgetSourceComponent()voidsetData(java.lang.String dataFlavor, java.lang.Object value)Stores data of given data flavor to Transferable.
-
-
-
Constructor Detail
-
TransferableImpl
public TransferableImpl(Component sourceComponent, java.util.Map<java.lang.String,java.lang.Object> rawVariables)
-
-
Method Detail
-
getSourceComponent
public Component getSourceComponent()
- Specified by:
getSourceComponentin interfaceTransferable- Returns:
- the component that created the Transferable or null if the source component is unknown
-
getData
public java.lang.Object getData(java.lang.String dataFlavor)
Description copied from interface:TransferableReturns the data from Transferable 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
Transferableoften provide a better typed API for accessing data.- Specified by:
getDatain interfaceTransferable- Parameters:
dataFlavor- the data flavor to be returned from Transferable- Returns:
- the data stored in the Transferable or null if Transferable contains no data for given data flavour
-
setData
public void setData(java.lang.String dataFlavor, java.lang.Object value)Description copied from interface:TransferableStores data of given data flavor to Transferable. Possibly existing value of the same data flavor will be replaced.- Specified by:
setDatain interfaceTransferable- Parameters:
dataFlavor- the data flavorvalue- the new value of the data flavor
-
getDataFlavors
public java.util.Collection<java.lang.String> getDataFlavors()
- Specified by:
getDataFlavorsin interfaceTransferable- Returns:
- a collection of data flavors ( data types ) available in this Transferable
-
-