Package com.vaadin.client.ui
Class VUpload
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.vaadin.client.ui.VUpload
-
- All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers,com.google.gwt.event.shared.HasHandlers,com.google.gwt.user.client.EventListener,com.google.gwt.user.client.ui.AcceptsOneWidget,com.google.gwt.user.client.ui.HasOneWidget,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,Iterable<com.google.gwt.user.client.ui.Widget>
public class VUpload extends com.google.gwt.user.client.ui.SimplePanelWidget class for the Upload component. Note, we are not using GWT FormPanel as we want to listen submitcomplete events even though the upload component is already detached.- Author:
- Vaadin Ltd
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSNAMEDefault classname for this widget.ApplicationConnectionclientFor internal use only.com.google.gwt.dom.client.FormElementelementFor internal use only.com.google.gwt.user.client.ui.FileUploadfuFileUpload component that opens native OS dialog to select file.intnextUploadIdFor internal use only.StringpaintableIdFor internal use only.VButtonsubmitButtonButton that initiates uploading.com.google.gwt.user.client.TimertWhen expecting big files, programmer may initiate some UI changes when uploading the file starts.
-
Constructor Summary
Constructors Constructor Description VUpload()Constructs the widget.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisableTitle(boolean disable)For internal use only.voiddisableUpload()For internal use only.voidenableUpload()For internal use only.voidensureTargetFrame()For internal use only.booleanisImmediateMode()Returns whether this component is in immediate mode or not.protected voidonAttach()protected voidonDetach()voidsetAcceptMimeTypes(String acceptMimeTypes)Sets accepted mime types.voidsetImmediateMode(boolean immediateMode)Sets the upload in immediate mode.voidsubmit()For internal use only.-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onBrowserEvent, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
Default classname for this widget.- See Also:
- Constant Field Values
-
fu
public com.google.gwt.user.client.ui.FileUpload fu
FileUpload component that opens native OS dialog to select file.For internal use only. May be removed or replaced in the future.
-
client
public ApplicationConnection client
For internal use only. May be removed or replaced in the future.
-
paintableId
public String paintableId
For internal use only. May be removed or replaced in the future.
-
submitButton
public final VButton submitButton
Button that initiates uploading.For internal use only. May be removed or replaced in the future.
-
t
public com.google.gwt.user.client.Timer t
When expecting big files, programmer may initiate some UI changes when uploading the file starts. Bit after submitting file we'll visit the server to check possible changes.For internal use only. May be removed or replaced in the future.
-
element
public com.google.gwt.dom.client.FormElement element
For internal use only. May be removed or replaced in the future.
-
nextUploadId
public int nextUploadId
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
setImmediateMode
public void setImmediateMode(boolean immediateMode)
Sets the upload in immediate mode.- Parameters:
immediateMode-truefor immediate mode,falsefor non-immediate mode
-
isImmediateMode
public boolean isImmediateMode()
Returns whether this component is in immediate mode or not.- Returns:
truefor immediate mode,falsefor not
-
disableUpload
public void disableUpload()
For internal use only. May be removed or replaced in the future.
-
enableUpload
public void enableUpload()
For internal use only. May be removed or replaced in the future.
-
submit
public void submit()
For internal use only. May be removed or replaced in the future.
-
disableTitle
public void disableTitle(boolean disable)
For internal use only. May be removed or replaced in the future.- Parameters:
disable-trueif the built-in browser-dependent tooltip should be hidden in favor of a Vaadin tooltip,falseotherwise
-
onAttach
protected void onAttach()
- Overrides:
onAttachin classcom.google.gwt.user.client.ui.Widget
-
ensureTargetFrame
public void ensureTargetFrame()
For internal use only. May be removed or replaced in the future.
-
onDetach
protected void onDetach()
- Overrides:
onDetachin classcom.google.gwt.user.client.ui.Widget
-
setAcceptMimeTypes
public void setAcceptMimeTypes(String acceptMimeTypes)
Sets accepted mime types. If no mime types are given, all types should be accepted.- Parameters:
acceptMimeTypes- a comma-separated list of content types that this component will handle correctly,nullor an empty String if all types should be accepted- Since:
- 8.5.0
-
-