Class CmsFileInput
java.lang.Object
com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.CmsWidget
org.opencms.gwt.client.ui.input.upload.CmsFileInput
- All Implemented Interfaces:
com.google.gwt.event.dom.client.HasChangeHandlers
,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.HasName
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.IsWidget
public class CmsFileInput
extends CmsWidget
implements com.google.gwt.user.client.ui.HasName, com.google.gwt.event.dom.client.HasChangeHandlers
A file input field.
- Since:
- 8.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
Field Summary
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.google.gwt.event.shared.HandlerRegistration
addChangeHandler
(com.google.gwt.event.dom.client.ChangeHandler handler) getFiles()
Returns an array of CmsFile objects.getName()
boolean
Returnstrue
if multiple file selection is allowed,false
otherwise.boolean
Returnstrue
if the input field is disabledfalse
otherwise.void
onAttach()
void
onDetach()
void
Sets the 'accept' attribute.void
setAllowMultipleFiles
(boolean allow) Sets the the flag for allowing multiple file selection.void
setDisabled
(boolean disabled) Sets the disabled flag.void
void
setParent
(com.google.gwt.user.client.ui.Widget parent) Overriding to increase method visibility.boolean
Returnstrue
if the control supports the HTML5 FileAPI andfalse
otherwise.Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, 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 com.google.gwt.event.shared.HasHandlers
fireEvent
-
Constructor Details
-
CmsFileInput
public CmsFileInput()The default constructor.
-
-
Method Details
-
addChangeHandler
public com.google.gwt.event.shared.HandlerRegistration addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler handler) - Specified by:
addChangeHandler
in interfacecom.google.gwt.event.dom.client.HasChangeHandlers
- See Also:
-
HasChangeHandlers.addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler)
-
getFiles
Returns an array of CmsFile objects.- Returns:
- an array of CmsFile objects
-
getName
- Specified by:
getName
in interfacecom.google.gwt.user.client.ui.HasName
- See Also:
-
HasName.getName()
-
isAllowedMultipleFiles
Returnstrue
if multiple file selection is allowed,false
otherwise.- Returns:
true
if multiple file selection is allowed,false
otherwise
-
isDisabled
Returnstrue
if the input field is disabledfalse
otherwise.- Returns:
true
if the input field is disabledfalse
otherwise
-
onAttach
- Overrides:
onAttach
in classcom.google.gwt.user.client.ui.Widget
- See Also:
-
Widget.onAttach()
-
onDetach
- Overrides:
onDetach
in classcom.google.gwt.user.client.ui.Widget
- See Also:
-
Widget.onDetach()
-
setAccept
Sets the 'accept' attribute.- Parameters:
acceptAttribute
- the new value for the 'accept' attribute
-
setAllowMultipleFiles
Sets the the flag for allowing multiple file selection.- Parameters:
allow
-true
if the multiple file selection should be allowed
-
setDisabled
Sets the disabled flag.- Parameters:
disabled
-true
if the input field should be disabled
-
setName
- Specified by:
setName
in interfacecom.google.gwt.user.client.ui.HasName
- See Also:
-
HasName.setName(java.lang.String)
-
setParent
Description copied from class:CmsWidget
Overriding to increase method visibility. -
supportsFileAPI
Returnstrue
if the control supports the HTML5 FileAPI andfalse
otherwise.- Returns:
true
if the control supports the HTML5 FileAPI andfalse
otherwise
-