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, unsinkEvents
addStyleDependentName, 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, toString
public 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.EventListener
onBrowserEvent
in class com.google.gwt.user.client.ui.Widget
public 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.HasChangeHandlers
public String getFilename()
public String getName()
getName
in interface com.google.gwt.user.client.ui.HasName
public boolean isEnabled()
isEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
true
if the widget is enabledpublic void setEnabled(boolean enabled)
setEnabled
in interface com.google.gwt.user.client.ui.HasEnabled
enabled
- true
to enable the widget, false
to
disable itpublic void setName(String name)
setName
in interface com.google.gwt.user.client.ui.HasName
Copyright © 2017. All Rights Reserved.