|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itmill.toolkit.terminal.Identifiable
com.itmill.toolkit.ui.AbstractComponent
com.itmill.toolkit.ui.Upload
public class Upload
Component for client file uploading.
| Nested Class Summary | |
|---|---|
class |
Upload.FailedEvent
Upload.Interrupted event is sent when the upload is received, but the reception is interrupted for some reason. |
static interface |
Upload.FailedListener
Receives events when the uploads are finished, but unsuccessful. |
class |
Upload.FinishedEvent
Upload.Received event is sent when the upload receives a file, regardless if the receival was successfull. |
static interface |
Upload.FinishedListener
Receives the events when the uploads are ready. |
static interface |
Upload.Receiver
Interface that must be implemented by the upload receivers. |
class |
Upload.SucceededEvent
Upload.Success event is sent when the upload is received successfully. |
static interface |
Upload.SucceededListener
Receives events when the uploads are successfully finished. |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.ui.Component |
|---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
| Nested classes/interfaces inherited from interface com.itmill.toolkit.terminal.Paintable |
|---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
| Constructor Summary | |
|---|---|
Upload(String caption,
Upload.Receiver uploadReceiver)
Creates a new instance of Upload that redirects the uploaded data to given stream. |
|
| Method Summary | |
|---|---|
void |
addListener(Upload.FailedListener listener)
Adds the upload interrupted event listener. |
void |
addListener(Upload.FinishedListener listener)
Adds the upload received event listener. |
void |
addListener(Upload.SucceededListener listener)
Adds the upload success event listener. |
void |
changeVariables(Object source,
Map variables)
Invoked when the value of a variable has changed. |
protected void |
fireUploadInterrupted(String filename,
String MIMEType,
long length)
Emits the upload interrupted event. |
protected void |
fireUploadReceived(String filename,
String MIMEType,
long length)
Emit upload received event. |
protected void |
fireUploadSuccess(String filename,
String MIMEType,
long length)
Emits the upload success event. |
void |
focus()
Sets the focus to this component. |
long |
getFocusableId()
Gets the unique ID of focusable. |
Upload.Receiver |
getReceiver()
Returns the current receiver. |
int |
getTabIndex()
Gets the Tabulator index of this Focusable component. |
String |
getTag()
Gets the component type. |
void |
paintContent(PaintTarget target)
Paints the content of this component. |
void |
removeListener(Upload.FailedListener listener)
Removes the upload interrupted event listener. |
void |
removeListener(Upload.FinishedListener listener)
Removes the upload received event listener. |
void |
removeListener(Upload.SucceededListener listener)
Removes the upload success event listener. |
void |
setReceiver(Upload.Receiver receiver)
Sets the receiver. |
void |
setTabIndex(int tabIndex)
Deprecated. Use setTabIndexes() |
int |
setTabIndexes(int startingIndex)
Sets the Tabulator indexes for all of the focusable fields within this component, and returns the next available Tabulator index. |
| Methods inherited from class com.itmill.toolkit.terminal.Identifiable |
|---|
getDebugId, getUIID, setDebugId, setUIID |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Upload(String caption,
Upload.Receiver uploadReceiver)
caption - uploadReceiver - | Method Detail |
|---|
public String getTag()
getTag in class AbstractComponent
public void changeVariables(Object source,
Map variables)
changeVariables in interface VariableOwnerchangeVariables in class AbstractComponentsource - the Source of the variable change. This is the origin of the
event. For example in Web Adapter this is the request.variables - the Mapping from variable names to new variable values.AbstractComponent.changeVariables(java.lang.Object,
java.util.Map)
public void paintContent(PaintTarget target)
throws PaintException
paintContent in class AbstractComponenttarget - Target to paint the content on.
PaintException - if the paint operation failed.public void addListener(Upload.FinishedListener listener)
listener - the Listener to be added.public void removeListener(Upload.FinishedListener listener)
listener - the Listener to be removed.public void addListener(Upload.FailedListener listener)
listener - the Listener to be added.public void removeListener(Upload.FailedListener listener)
listener - the Listener to be removed.public void addListener(Upload.SucceededListener listener)
listener - the Listener to be added.public void removeListener(Upload.SucceededListener listener)
listener - the Listener to be removed.
protected void fireUploadReceived(String filename,
String MIMEType,
long length)
filename - MIMEType - length -
protected void fireUploadInterrupted(String filename,
String MIMEType,
long length)
filename - MIMEType - length -
protected void fireUploadSuccess(String filename,
String MIMEType,
long length)
filename - MIMEType - length - public Upload.Receiver getReceiver()
public void setReceiver(Upload.Receiver receiver)
receiver - the receiver to set.public void focus()
focus in interface Component.FocusableComponent.Focusable.focus()public int getTabIndex()
getTabIndex in interface Component.FocusableComponent.Focusable.getTabIndex()public void setTabIndex(int tabIndex)
setTabIndex in interface Component.FocusabletabIndex - the Positive tab order of this focusable. Negative of zero
means unspecified tab order.Component.Focusable.setTabIndex(int),
com.itmill.toolkit.ui.Upload#setTabIndexes()public int setTabIndexes(int startingIndex)
startingIndex -
public long getFocusableId()
getFocusableId in interface Component.FocusableComponent.Focusable.getFocusableId()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||