public class FileUploadExt
extends com.google.gwt.user.client.ui.Widget
implements com.google.gwt.user.client.ui.HasName, com.google.gwt.event.dom.client.HasChangeHandlers, com.google.gwt.user.client.ui.HasEnabled
| Modifier | Constructor and Description |
|---|---|
|
FileUploadExt()
Constructor.
|
|
FileUploadExt(boolean multiple)
Constructor.
|
protected |
FileUploadExt(com.google.gwt.dom.client.Element element,
boolean multiple) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gwt.event.shared.HandlerRegistration |
addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler) |
void |
click()
Shows the file selection box.
|
String |
getFilename()
Gets the filename selected by the user.
|
FileList |
getFiles()
Returns the files selected by the end-user.
|
String |
getName() |
boolean |
isEnabled()
Gets whether this widget is enabled.
|
boolean |
isMultiple()
Returns true if support for multiple file upload is activated, false otherwise.
|
void |
onBrowserEvent(com.google.gwt.user.client.Event event) |
void |
setEnabled(boolean enabled)
Sets whether this widget is enabled.
|
void |
setMultiple(boolean value)
Sets support for multiple file upload.
|
void |
setName(String name) |
static FileUploadExt |
wrap(com.google.gwt.dom.client.Element element,
boolean multiple)
Creates a FileUploadExt widget that wraps an existing <input
type='file'> element.
|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toStringpublic FileUploadExt()
public FileUploadExt(boolean multiple)
multiple - true to active multiple file upload support, false otherwiseprotected FileUploadExt(com.google.gwt.dom.client.Element element,
boolean multiple)
public boolean isMultiple()
public void setMultiple(boolean value)
value - true to activate support for multiple file upload, false otherwise.public FileList getFiles()
public void click()
public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent in interface com.google.gwt.user.client.EventListeneronBrowserEvent in class com.google.gwt.user.client.ui.Widgetpublic static FileUploadExt wrap(com.google.gwt.dom.client.Element element, boolean multiple)
RootPanel.detachNow(Widget).element - the element to be wrappedmultiple - true to active multiple file upload support, false otherwisepublic com.google.gwt.event.shared.HandlerRegistration addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler)
addChangeHandler in interface com.google.gwt.event.dom.client.HasChangeHandlerspublic String getFilename()
public String getName()
getName in interface com.google.gwt.user.client.ui.HasNamepublic boolean isEnabled()
isEnabled in interface com.google.gwt.user.client.ui.HasEnabledtrue if the widget is enabledpublic void setEnabled(boolean enabled)
setEnabled in interface com.google.gwt.user.client.ui.HasEnabledenabled - true to enable the widget, false to
disable itpublic void setName(String name)
setName in interface com.google.gwt.user.client.ui.HasNameCopyright © 2017. All Rights Reserved.