diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-10-12 15:20:48 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2010-10-12 15:20:48 +0000 |
commit | 2d88e0f7492bb6b5de0e997df03fc7fda9b858c9 (patch) | |
tree | 27fe8c57c69c6a6cc016e088f088758cae4cd868 /src | |
parent | 007b31bba243f21dc53a0b0c88356e6d8a353109 (diff) | |
download | vaadin-framework-2d88e0f7492bb6b5de0e997df03fc7fda9b858c9.tar.gz vaadin-framework-2d88e0f7492bb6b5de0e997df03fc7fda9b858c9.zip |
removed done todo + added API that don't use deprecated Receiver, fine tuning #5741
svn changeset:15523/svn branch:6.5
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/ui/Upload.java | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/src/com/vaadin/ui/Upload.java b/src/com/vaadin/ui/Upload.java index 1acc91031e..3fcafe7260 100644 --- a/src/com/vaadin/ui/Upload.java +++ b/src/com/vaadin/ui/Upload.java @@ -76,7 +76,7 @@ public class Upload extends AbstractComponent implements Component.Focusable, /** * The output of the upload is redirected to this receiver. */ - private Receiver receiver; + private com.vaadin.terminal.Receiver receiver; private boolean isUploading; @@ -99,8 +99,6 @@ public class Upload extends AbstractComponent implements Component.Focusable, private int nextid; - /* TODO: Add a default constructor, receive to temp file. */ - /** * Creates a new instance of Upload. * @@ -110,6 +108,17 @@ public class Upload extends AbstractComponent implements Component.Focusable, } /** + * @deprecated use + * {@link Upload#Upload(String, com.vaadin.terminal.Receiver)} + * instead + */ + @Deprecated + public Upload(String caption, Receiver uploadReceiver) { + setCaption(caption); + receiver = uploadReceiver; + } + + /** * Creates a new instance of Upload that redirects the uploaded data to * stream given by the Receiver. * @@ -119,7 +128,7 @@ public class Upload extends AbstractComponent implements Component.Focusable, * @param uploadReceiver * Receiver to call to retrieve output stream when upload starts. */ - public Upload(String caption, Receiver uploadReceiver) { + public Upload(String caption, com.vaadin.terminal.Receiver uploadReceiver) { setCaption(caption); receiver = uploadReceiver; } @@ -751,21 +760,34 @@ public class Upload extends AbstractComponent implements Component.Focusable, * * @return the Receiver. */ - public Receiver getReceiver() { + public com.vaadin.terminal.Receiver getReceiver() { return receiver; } /** * Sets the receiver. * + * @deprecated use {@link #setReceiver(com.vaadin.terminal.Receiver)} + * instead * @param receiver * the receiver to set. */ + @Deprecated public void setReceiver(Receiver receiver) { this.receiver = receiver; } /** + * Sets the receiver. + * + * @param receiver + * the receiver to set. + */ + public void setReceiver(com.vaadin.terminal.Receiver receiver) { + this.receiver = receiver; + } + + /** * {@inheritDoc} */ @Override |