zul
Class Uploader

java.lang.Object
  extended by zk.Object
      extended by zul.Uploader

public class Uploader
extends Object

Default file uploader for the upload widget.

One upload widget can have multi-instance of uploader to upload multiple files at the same time.


Field Summary
 
Fields inherited from class zk.Object
$class, $oid
 
Method Summary
 void $init(Upload upload, String id, DOMElement form, String flnm)
          Constructor
 void cancel()
          Cancels the uploader to upload.
 void destroy(boolean finish)
          Destroys the uploader to upload.
 void end(boolean finish)
          Ends the uploader to upload.
 Widget getWidget()
          Returns the widget which the uploader belongs to.
 void start()
          Starts the uploader to upload
 boolean update(int sent, int total)
          Updates the status of the file being uploaded.
 
Methods inherited from class zk.Object
$init, $instanceof, $super, $super, $supers, $supers, afterInit, isAssignableFrom, isInstance, proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

$init

public void $init(Upload upload,
                  String id,
                  DOMElement form,
                  String flnm)
Constructor

Parameters:
upload - the upload object belong to the file uploader
id - the ID of the uploader
form - the element representing where the uploader element is appended
flnm - the name of the file to be uploaded

getWidget

public Widget getWidget()
Returns the widget which the uploader belongs to.

Returns:
zk.Widget

destroy

public void destroy(boolean finish)
Destroys the uploader to upload.

Parameters:
finish - if true, the upload is finish.

start

public void start()
Starts the uploader to upload


cancel

public void cancel()
Cancels the uploader to upload.


update

public boolean update(int sent,
                      int total)
Updates the status of the file being uploaded.

Parameters:
sent - how many percentage being sent
total - the size of the file
Returns:
boolean

end

public void end(boolean finish)
Ends the uploader to upload.

Parameters:
finish - whether the file is finish.


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo