We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.event.
Class TransferableImpl
java.lang.Object
com.vaadin.event.TransferableImpl
All Implemented Interfaces:
Direct Known Subclasses:
DataBoundTransferable, DragAndDropWrapper.WrapperTransferable
- extends Object
- implements Transferable
public class TransferableImpl
TODO Javadoc!
Since:
6.3
See Also:
Constructor Summary | |
---|---|
TransferableImpl(Component sourceComponent,
Map<String,Object> rawVariables)
|
Method Summary | |
---|---|
Object |
getData(String dataFlavor)
Returns the data from Transferable by its data flavor (aka data type). |
Collection<String> |
getDataFlavors()
|
Component |
getSourceComponent()
|
void |
setData(String dataFlavor,
Object value)
Stores data of given data flavor to Transferable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
TransferableImpl
public TransferableImpl(Component sourceComponent,
Map<String,Object> rawVariables)
Method Detail |
---|
getSourceComponent
public Component getSourceComponent()
- Specified by:
getSourceComponent
in interfaceTransferable
- Returns:
- the component that created the Transferable or null if the source component is unknown
getData
public Object getData(String dataFlavor)
- Specified by:
getData
in 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
Description copied from interface: Transferable
Returns 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 Transferable
often provide a better
typed API for accessing data.
setData
public void setData(String dataFlavor,
Object value)
- Specified by:
setData
in interfaceTransferable
- Parameters:
dataFlavor
- the data flavorvalue
- the new value of the data flavor
Description copied from interface: Transferable
Stores data of given data flavor to Transferable. Possibly existing value of the same data flavor will be replaced.
getDataFlavors
public Collection<String> getDataFlavors()
- Specified by:
getDataFlavors
in interfaceTransferable
- Returns:
- a collection of data flavors ( data types ) available in this Transferable