]> source.dussan.org Git - vaadin-framework.git/commitdiff
removed done todo + added API that don't use deprecated Receiver, fine tuning #5741
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 12 Oct 2010 15:20:48 +0000 (15:20 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Tue, 12 Oct 2010 15:20:48 +0000 (15:20 +0000)
svn changeset:15523/svn branch:6.5

src/com/vaadin/ui/Upload.java

index 1acc91031e533dd50262a8e571023caad111ef58..3fcafe7260ab459f5f5ff8192414a3e07792d785 100644 (file)
@@ -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.
      * 
@@ -109,6 +107,17 @@ public class Upload extends AbstractComponent implements Component.Focusable,
     public Upload() {
     }
 
+    /**
+     * @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,20 +760,33 @@ 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}
      */