diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-13 18:34:33 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-13 19:18:33 +0300 |
commit | e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569 (patch) | |
tree | 9ab6f13f7188cab44bbd979b1cf620f15328a03f /server/src/com/vaadin/event/TransferableImpl.java | |
parent | 14dd4d0b28c76eb994b181a4570f3adec53342e6 (diff) | |
download | vaadin-framework-e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569.tar.gz vaadin-framework-e85d933b25cc3c5cc85eb7eb4b13b950fd8e1569.zip |
Moved server files to a server src folder (#9299)
Diffstat (limited to 'server/src/com/vaadin/event/TransferableImpl.java')
-rw-r--r-- | server/src/com/vaadin/event/TransferableImpl.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/server/src/com/vaadin/event/TransferableImpl.java b/server/src/com/vaadin/event/TransferableImpl.java new file mode 100644 index 0000000000..4c973571f7 --- /dev/null +++ b/server/src/com/vaadin/event/TransferableImpl.java @@ -0,0 +1,47 @@ +/* +@VaadinApache2LicenseForJavaFiles@ + */ +package com.vaadin.event; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import com.vaadin.ui.Component; + +/** + * TODO Javadoc! + * + * @since 6.3 + */ +public class TransferableImpl implements Transferable { + private Map<String, Object> rawVariables = new HashMap<String, Object>(); + private Component sourceComponent; + + public TransferableImpl(Component sourceComponent, + Map<String, Object> rawVariables) { + this.sourceComponent = sourceComponent; + this.rawVariables = rawVariables; + } + + @Override + public Component getSourceComponent() { + return sourceComponent; + } + + @Override + public Object getData(String dataFlavor) { + return rawVariables.get(dataFlavor); + } + + @Override + public void setData(String dataFlavor, Object value) { + rawVariables.put(dataFlavor, value); + } + + @Override + public Collection<String> getDataFlavors() { + return rawVariables.keySet(); + } + +} |