diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-03-23 09:18:33 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-03-23 09:18:33 +0000 |
commit | be1d9b2934dcc006ab84110c66d7a77f6ebeb8c6 (patch) | |
tree | 9a4c61f98812342163cc29b77a174ec7ea9c1c2d /src/com/vaadin/event/Transferable.java | |
parent | cc6fa776179274fb514b76cbfabddcac8d8469b9 (diff) | |
download | vaadin-framework-be1d9b2934dcc006ab84110c66d7a77f6ebeb8c6.tar.gz vaadin-framework-be1d9b2934dcc006ab84110c66d7a77f6ebeb8c6.zip |
javadocs
svn changeset:12028/svn branch:6.3
Diffstat (limited to 'src/com/vaadin/event/Transferable.java')
-rw-r--r-- | src/com/vaadin/event/Transferable.java | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/src/com/vaadin/event/Transferable.java b/src/com/vaadin/event/Transferable.java index 379bcde9a4..8b69f9a056 100644 --- a/src/com/vaadin/event/Transferable.java +++ b/src/com/vaadin/event/Transferable.java @@ -8,20 +8,48 @@ import java.util.Collection; import com.vaadin.ui.Component; /** - * TODO Javadoc! + * Transferable wraps the data that is to be imported into another component. + * Currently Transferable is only used for drag and drop. * * @since 6.3 */ public 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. + * <p> + * Note, implementations of {@link Transferable} often provide a better + * typed API for accessing data. + * + * @param dataFlavor + * the data flavor to be returned from Transferable + * @return the data stored in the Transferable or null if Transferable + * contains no data for given data flavour + */ public Object getData(String dataFlavor); + /** + * Stores data of given data flavor to Transferable. Possibly existing value + * of the same data flavor will be replaced. + * + * @param dataFlavor + * the data flavor + * @param value + * the new value of the data flavor + */ public void setData(String dataFlavor, Object value); + /** + * @return a collection of data flavors ( data types ) available in this + * Transferable + */ public Collection<String> getDataFlavors(); /** - * @return the component that created the Transferable + * @return the component that created the Transferable or null if the source + * component is unknown */ public Component getSourceComponent(); |