Class 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

      Constructors 
      Constructor Description
      CmsFileInput()
      The default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gwt.event.shared.HandlerRegistration addChangeHandler​(com.google.gwt.event.dom.client.ChangeHandler handler)  
      CmsFileInfo[] getFiles()
      Returns an array of CmsFile objects.
      java.lang.String getName()  
      boolean isAllowedMultipleFiles()
      Returns true if multiple file selection is allowed, false otherwise.
      boolean isDisabled()
      Returns true if the input field is disabled false otherwise.
      void onAttach()  
      void onDetach()  
      void setAllowMultipleFiles​(boolean allow)
      Sets the the flag for allowing multiple file selection.
      void setDisabled​(boolean disabled)
      Sets the disabled flag.
      void setName​(java.lang.String name)  
      void setParent​(com.google.gwt.user.client.ui.Widget parent)
      Overriding to increase method visibility.
      boolean supportsFileAPI()
      Returns true if the control supports the HTML5 FileAPI and false 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 Detail

      • CmsFileInput

        public CmsFileInput()
        The default constructor.

    • Method Detail

      • addChangeHandler

        public com.google.gwt.event.shared.HandlerRegistration addChangeHandler​(com.google.gwt.event.dom.client.ChangeHandler handler)
        Specified by:
        addChangeHandler in interface com.google.gwt.event.dom.client.HasChangeHandlers
        See Also:
        HasChangeHandlers.addChangeHandler(com.google.gwt.event.dom.client.ChangeHandler)
      • getFiles

        public CmsFileInfo[] getFiles()
        Returns an array of CmsFile objects.

        Returns:
        an array of CmsFile objects
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface com.google.gwt.user.client.ui.HasName
        See Also:
        HasName.getName()
      • isAllowedMultipleFiles

        public boolean isAllowedMultipleFiles()
        Returns true if multiple file selection is allowed, false otherwise.

        Returns:
        true if multiple file selection is allowed, false otherwise
      • isDisabled

        public boolean isDisabled()
        Returns true if the input field is disabled false otherwise.

        Returns:
        true if the input field is disabled false otherwise
      • onAttach

        public void onAttach()
        Overrides:
        onAttach in class com.google.gwt.user.client.ui.Widget
        See Also:
        Widget.onAttach()
      • onDetach

        public void onDetach()
        Overrides:
        onDetach in class com.google.gwt.user.client.ui.Widget
        See Also:
        Widget.onDetach()
      • setAllowMultipleFiles

        public void setAllowMultipleFiles​(boolean allow)
        Sets the the flag for allowing multiple file selection.

        Parameters:
        allow - true if the multiple file selection should be allowed
      • setDisabled

        public void setDisabled​(boolean disabled)
        Sets the disabled flag.

        Parameters:
        disabled - true if the input field should be disabled
      • setName

        public void setName​(java.lang.String name)
        Specified by:
        setName in interface com.google.gwt.user.client.ui.HasName
        See Also:
        HasName.setName(java.lang.String)
      • supportsFileAPI

        public boolean supportsFileAPI()
        Returns true if the control supports the HTML5 FileAPI and false otherwise.

        Returns:
        true if the control supports the HTML5 FileAPI and false otherwise