Class FileDropZone

All Implemented Interfaces:
HasAttachHandlers, HasHandlers, EventListener, HasVisibility, IsWidget, LogicalStructure, HasClearHandlers, HasClickHandlers, HasDoubleClickHandlers, HasDragMoveHandlers, HasDragRepositionMoveHandlers, HasDragRepositionStartHandlers, HasDragRepositionStopHandlers, HasDragResizeMoveHandlers, HasDragResizeStartHandlers, HasDragResizeStopHandlers, HasDragStartHandlers, HasDragStopHandlers, HasDropHandlers, HasDropMoveHandlers, HasDropOutHandlers, HasDropOverHandlers, HasFocusChangedHandlers, HasHoverHandlers, HasHoverHiddenHandlers, HasIconClickHandlers, HasKeyDownHandlers, HasKeyPressHandlers, HasMouseDownHandlers, HasMouseMoveHandlers, HasMouseOutHandlers, HasMouseOverHandlers, HasMouseStillDownHandlers, HasMouseUpHandlers, HasMouseWheelHandlers, HasMovedHandlers, HasParentMovedHandlers, HasResizedHandlers, HasRightMouseDownHandlers, HasRuleContextChangedHandlers, HasScrolledHandlers, HasShowContextMenuHandlers, HasTitleHoverHandlers, HasVisibilityChangedHandlers

public class FileDropZone extends DropZone
The FileDropZone class provides a straightforward way to upload files from a user's desktop using HTML5 file drop capabilities.

A FileDropZone does not itself upload files - it provides the UI for file collection and progress indication. Upload is typically handled by a surrounding form or application code.

Users can add files by dragging them onto the drop zone, or by clicking the drop zone to open a standard file browser dialog (when canAddFilesOnClick is true).

When used with a form, uploads include per-file progress indication and error handling.

For use within a DynamicForm, see FileUploadItem.

FileDropZone extends DropZone (and therefore StatefulCanvas), so CSS styling uses standard state suffixes: Over (during drag), Disabled, and custom states Populated (files present) and Processing (upload in progress).

  • Constructor Details

    • FileDropZone

      public FileDropZone()
    • FileDropZone

      public FileDropZone(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static FileDropZone getOrCreateRef(JavaScriptObject jsObj)
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, Canvas defaults)
      Changes the defaults for Canvas AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - Canvas defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • changeAutoChildDefaults

      public static void changeAutoChildDefaults(String autoChildName, FormItem defaults)
      Changes the defaults for FormItem AutoChildren named autoChildName.
      Parameters:
      autoChildName - name of an AutoChild to customize the defaults for.
      defaults - FormItem defaults to apply. These defaults override any existing properties without destroying or wiping out non-overridden properties. For usage tips on this param, see SGWTProperties.
      See Also:
    • create

      protected JavaScriptObject create()
      Overrides:
      create in class DropZone
    • setAcceptedFileTypes

      public FileDropZone setAcceptedFileTypes(String... acceptedFileTypes) throws IllegalStateException
      Array of accepted MIME types (e.g., ["image/*", "application/pdf"]). If null, all file types are accepted.
      Overrides:
      setAcceptedFileTypes in class DropZone
      Parameters:
      acceptedFileTypes - New acceptedFileTypes value. Default value is null
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getAcceptedFileTypes

      public String[] getAcceptedFileTypes()
      Array of accepted MIME types (e.g., ["image/*", "application/pdf"]). If null, all file types are accepted.
      Overrides:
      getAcceptedFileTypes in class DropZone
      Returns:
      Current acceptedFileTypes value. Default value is null
    • setAlign

      public FileDropZone setAlign(Alignment align) throws IllegalStateException
      Horizontal alignment for drop zone content.
      Overrides:
      setAlign in class DropZone
      Parameters:
      align - New align value. Default value is "center"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAlign

      public Alignment getAlign()
      Horizontal alignment for drop zone content.
      Overrides:
      getAlign in class DropZone
      Returns:
      Current align value. Default value is "center"
      See Also:
    • setArchiveFileIcon

      public FileDropZone setArchiveFileIcon(String archiveFileIcon) throws IllegalStateException
      Icon for archive files (ZIP, TAR, etc.).
      Parameters:
      archiveFileIcon - New archiveFileIcon value. Default value is "[SKINIMG]FileDropZone/archive.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getArchiveFileIcon

      public String getArchiveFileIcon()
      Icon for archive files (ZIP, TAR, etc.).
      Returns:
      Current archiveFileIcon value. Default value is "[SKINIMG]FileDropZone/archive.png"
      See Also:
    • setAudioFileIcon

      public FileDropZone setAudioFileIcon(String audioFileIcon) throws IllegalStateException
      Icon for audio files.
      Parameters:
      audioFileIcon - New audioFileIcon value. Default value is "[SKINIMG]FileDropZone/audio.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getAudioFileIcon

      public String getAudioFileIcon()
      Icon for audio files.
      Returns:
      Current audioFileIcon value. Default value is "[SKINIMG]FileDropZone/audio.png"
      See Also:
    • setBaseStyle

      public FileDropZone setBaseStyle(String baseStyle) throws IllegalStateException
      Base CSS class for the drop zone. Supports state suffixes: Over, Populated, Processing, Disabled.
      Overrides:
      setBaseStyle in class DropZone
      Parameters:
      baseStyle - New baseStyle value. Default value is "fileDropZone"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getBaseStyle

      public String getBaseStyle()
      Base CSS class for the drop zone. Supports state suffixes: Over, Populated, Processing, Disabled.
      Overrides:
      getBaseStyle in class DropZone
      Returns:
      Current baseStyle value. Default value is "fileDropZone"
      See Also:
    • setCanAddFilesOnClick

      public FileDropZone setCanAddFilesOnClick(Boolean canAddFilesOnClick) throws IllegalStateException
      If true, clicking the drop zone opens a file browser dialog.
      Parameters:
      canAddFilesOnClick - New canAddFilesOnClick value. Default value is true
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getCanAddFilesOnClick

      public Boolean getCanAddFilesOnClick()
      If true, clicking the drop zone opens a file browser dialog.
      Returns:
      Current canAddFilesOnClick value. Default value is true
    • getCancelButton

      public Button getCancelButton() throws IllegalStateException
      AutoChild Button allowing users to cancel an in-progress upload. Only shown if showCancelButton is true.

      This component is an AutoChild named "cancelButton". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current cancelButton value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setCodeFileIcon

      public FileDropZone setCodeFileIcon(String codeFileIcon) throws IllegalStateException
      Icon for code/script files.
      Parameters:
      codeFileIcon - New codeFileIcon value. Default value is "[SKINIMG]FileDropZone/code.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getCodeFileIcon

      public String getCodeFileIcon()
      Icon for code/script files.
      Returns:
      Current codeFileIcon value. Default value is "[SKINIMG]FileDropZone/code.png"
      See Also:
    • setDefaultFileIcon

      public FileDropZone setDefaultFileIcon(String defaultFileIcon) throws IllegalStateException
      Default icon for files when no specific type icon is available.
      Parameters:
      defaultFileIcon - New defaultFileIcon value. Default value is "[SKINIMG]FileDropZone/file.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDefaultFileIcon

      public String getDefaultFileIcon()
      Default icon for files when no specific type icon is available.
      Returns:
      Current defaultFileIcon value. Default value is "[SKINIMG]FileDropZone/file.png"
      See Also:
    • setDocumentFileIcon

      public FileDropZone setDocumentFileIcon(String documentFileIcon) throws IllegalStateException
      Icon for document files (Word, text, etc.).
      Parameters:
      documentFileIcon - New documentFileIcon value. Default value is "[SKINIMG]FileDropZone/document.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getDocumentFileIcon

      public String getDocumentFileIcon()
      Icon for document files (Word, text, etc.).
      Returns:
      Current documentFileIcon value. Default value is "[SKINIMG]FileDropZone/document.png"
      See Also:
    • setImageFileIcon

      public FileDropZone setImageFileIcon(String imageFileIcon) throws IllegalStateException
      Icon for image files (when showImagePreviews is false).
      Parameters:
      imageFileIcon - New imageFileIcon value. Default value is "[SKINIMG]FileDropZone/image.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getImageFileIcon

      public String getImageFileIcon()
      Icon for image files (when showImagePreviews is false).
      Returns:
      Current imageFileIcon value. Default value is "[SKINIMG]FileDropZone/image.png"
      See Also:
    • setMaxFiles

      public FileDropZone setMaxFiles(Integer maxFiles) throws IllegalStateException
      Maximum number of files allowed when multiple is true.
      Parameters:
      maxFiles - New maxFiles value. Default value is null
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMaxFiles

      public Integer getMaxFiles()
      Maximum number of files allowed when multiple is true.
      Returns:
      Current maxFiles value. Default value is null
    • setMaxFileSize

      public FileDropZone setMaxFileSize(Integer maxFileSize) throws IllegalStateException
      Maximum size in bytes for any individual file.
      Parameters:
      maxFileSize - New maxFileSize value. Default value is null
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMaxFileSize

      public Integer getMaxFileSize()
      Maximum size in bytes for any individual file.
      Returns:
      Current maxFileSize value. Default value is null
    • setMaxSize

      public FileDropZone setMaxSize(Integer maxSize) throws IllegalStateException
      Maximum total size in bytes for all files combined.
      Parameters:
      maxSize - New maxSize value. Default value is null
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMaxSize

      public Integer getMaxSize()
      Maximum total size in bytes for all files combined.
      Returns:
      Current maxSize value. Default value is null
    • setMinSize

      public FileDropZone setMinSize(Integer minSize) throws IllegalStateException
      Minimum total size in bytes for all files combined.
      Parameters:
      minSize - New minSize value. Default value is null
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMinSize

      public Integer getMinSize()
      Minimum total size in bytes for all files combined.
      Returns:
      Current minSize value. Default value is null
    • setMultiple

      public FileDropZone setMultiple(Boolean multiple) throws IllegalStateException
      Does this FileDropZone support multiple files?
      Parameters:
      multiple - New multiple value. Default value is false
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getMultiple

      public Boolean getMultiple()
      Does this FileDropZone support multiple files?
      Returns:
      Current multiple value. Default value is false
    • setPdfFileIcon

      public FileDropZone setPdfFileIcon(String pdfFileIcon) throws IllegalStateException
      Icon for PDF files.
      Parameters:
      pdfFileIcon - New pdfFileIcon value. Default value is "[SKINIMG]FileDropZone/pdf.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getPdfFileIcon

      public String getPdfFileIcon()
      Icon for PDF files.
      Returns:
      Current pdfFileIcon value. Default value is "[SKINIMG]FileDropZone/pdf.png"
      See Also:
    • getProgressBar

      public Progressbar getProgressBar() throws IllegalStateException
      AutoChild Progressbar showing upload progress.

      This component is an AutoChild named "progressBar". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current progressBar value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getProgressLabel

      public Label getProgressLabel() throws IllegalStateException
      AutoChild Label showing the processing message during uploads.

      This component is an AutoChild named "progressLabel". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current progressLabel value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • getProgressText

      public Label getProgressText() throws IllegalStateException
      AutoChild Label showing the percentage complete text.

      This component is an AutoChild named "progressText". For an overview of how to use and configure AutoChildren, see Using AutoChildren.

      Returns:
      Current progressText value. Default value is null
      Throws:
      IllegalStateException - if this widget has not yet been rendered.
    • setRemoveIcon

      public FileDropZone setRemoveIcon(String removeIcon) throws IllegalStateException
      Icon for the remove button on file tiles.
      Parameters:
      removeIcon - New removeIcon value. Default value is "[SKINIMG]FileDropZone/remove.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getRemoveIcon

      public String getRemoveIcon()
      Icon for the remove button on file tiles.
      Returns:
      Current removeIcon value. Default value is "[SKINIMG]FileDropZone/remove.png"
      See Also:
    • setReplaceFilesOnDrop

      public FileDropZone setReplaceFilesOnDrop(Boolean replaceFilesOnDrop) throws IllegalStateException
      If true, dropping new files replaces existing files. If false, new files are added to the existing list.
      Parameters:
      replaceFilesOnDrop - New replaceFilesOnDrop value. Default value is true
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getReplaceFilesOnDrop

      public Boolean getReplaceFilesOnDrop()
      If true, dropping new files replaces existing files. If false, new files are added to the existing list.
      Returns:
      Current replaceFilesOnDrop value. Default value is true
    • setShowCancelButton

      public FileDropZone setShowCancelButton(Boolean showCancelButton) throws IllegalStateException
      Whether to show a cancel button during processing that allows the user to abort the upload.
      Parameters:
      showCancelButton - New showCancelButton value. Default value is true
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowCancelButton

      public Boolean getShowCancelButton()
      Whether to show a cancel button during processing that allows the user to abort the upload.
      Returns:
      Current showCancelButton value. Default value is true
    • setShowFileThumbnails

      public FileDropZone setShowFileThumbnails(Boolean showFileThumbnails) throws IllegalStateException
      If true, display thumbnails/icons for added files. If false, show only file names.
      Parameters:
      showFileThumbnails - New showFileThumbnails value. Default value is true
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowFileThumbnails

      public Boolean getShowFileThumbnails()
      If true, display thumbnails/icons for added files. If false, show only file names.
      Returns:
      Current showFileThumbnails value. Default value is true
    • setShowImagePreviews

      public FileDropZone setShowImagePreviews(Boolean showImagePreviews) throws IllegalStateException
      When showFileThumbnails is true, should actual image previews be generated for image files? If false, image files will show a generic image icon instead. Image previews are generated using the FileReader API.
      Parameters:
      showImagePreviews - New showImagePreviews value. Default value is true
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getShowImagePreviews

      public Boolean getShowImagePreviews()
      When showFileThumbnails is true, should actual image previews be generated for image files? If false, image files will show a generic image icon instead. Image previews are generated using the FileReader API.
      Returns:
      Current showImagePreviews value. Default value is true
    • setSpreadsheetFileIcon

      public FileDropZone setSpreadsheetFileIcon(String spreadsheetFileIcon) throws IllegalStateException
      Icon for spreadsheet files (Excel, CSV, etc.).
      Parameters:
      spreadsheetFileIcon - New spreadsheetFileIcon value. Default value is "[SKINIMG]FileDropZone/spreadsheet.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getSpreadsheetFileIcon

      public String getSpreadsheetFileIcon()
      Icon for spreadsheet files (Excel, CSV, etc.).
      Returns:
      Current spreadsheetFileIcon value. Default value is "[SKINIMG]FileDropZone/spreadsheet.png"
      See Also:
    • setThumbnailHeight

      public FileDropZone setThumbnailHeight(Integer thumbnailHeight) throws IllegalStateException
      Height in pixels for file thumbnails/icons.
      Parameters:
      thumbnailHeight - New thumbnailHeight value. Default value is 64
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getThumbnailHeight

      public Integer getThumbnailHeight()
      Height in pixels for file thumbnails/icons.
      Returns:
      Current thumbnailHeight value. Default value is 64
    • setThumbnailWidth

      public FileDropZone setThumbnailWidth(Integer thumbnailWidth) throws IllegalStateException
      Width in pixels for file thumbnails/icons.
      Parameters:
      thumbnailWidth - New thumbnailWidth value. Default value is 64
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
    • getThumbnailWidth

      public Integer getThumbnailWidth()
      Width in pixels for file thumbnails/icons.
      Returns:
      Current thumbnailWidth value. Default value is 64
    • setValign

      public FileDropZone setValign(VerticalAlignment valign) throws IllegalStateException
      Vertical alignment for drop zone content.
      Overrides:
      setValign in class DropZone
      Parameters:
      valign - New valign value. Default value is "center"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getValign

      public VerticalAlignment getValign()
      Vertical alignment for drop zone content.
      Overrides:
      getValign in class DropZone
      Returns:
      Current valign value. Default value is "center"
      See Also:
    • setVideoFileIcon

      public FileDropZone setVideoFileIcon(String videoFileIcon) throws IllegalStateException
      Icon for video files.
      Parameters:
      videoFileIcon - New videoFileIcon value. Default value is "[SKINIMG]FileDropZone/video.png"
      Returns:
      FileDropZone instance, for chaining setter calls
      Throws:
      IllegalStateException - this property cannot be changed after the component has been created
      See Also:
    • getVideoFileIcon

      public String getVideoFileIcon()
      Icon for video files.
      Returns:
      Current videoFileIcon value. Default value is "[SKINIMG]FileDropZone/video.png"
      See Also:
    • cancelProcessing

      public void cancelProcessing()
      Cancel an in-progress upload/processing operation.

      This will abort the active XHR request (if any), hide the processing UI, and fire the processingCancelled() notification.

    • clearFiles

      public void clearFiles()
      Clear all files from this fileDropZone.
    • endProcessing

      public void endProcessing()
      Hide processing UI. Called when upload/processing completes.
    • filesAdded

      public void filesAdded(JavaScriptObject[] files)
      Notification fired when files are successfully added (via drag or click).
      Parameters:
      files - Files that were added
    • filesRemoved

      public void filesRemoved(JavaScriptObject[] files)
      Notification fired when files are removed.
      Parameters:
      files - Files that were removed
    • fileUploadComplete

      public void fileUploadComplete(JavaScriptObject file, Boolean success, DSResponse response)
      Notification fired when an individual file upload completes (in concurrent mode).
      Parameters:
      file - The file that completed
      success - Whether the upload succeeded
      response - The server response for this file
    • fileUploadFailed

      public void fileUploadFailed(JavaScriptObject file, String error)
      Notification fired when an individual file upload fails (in concurrent mode).
      Parameters:
      file - The file that failed
      error - Error message describing the failure
    • getFiles

      public JavaScriptObject[] getFiles()
      Retrieves the files that have been added to this fileDropZone.
      Returns:
      JavaScript File objects added to this fileDropZone
    • getProcessingPercentDone

      public Integer getProcessingPercentDone()
      Get current progress percentage.
      Returns:
      Current percentage, or null if not processing
    • getSize

      public Integer getSize()
      Get the total size in bytes of all selected files.
      Returns:
      Total size in bytes, or 0 if no files
    • processingCancelled

      public void processingCancelled()
      Notification fired when processing is cancelled via cancelProcessing().

      This is a notification method intended for override. The FileDropZone itself does not perform any network abort logic - it only manages local UI state (hiding progress, preserving files). When used as the canvas of a FileUploadItem, the item's default configuration overrides this method to propagate the cancel to the containing DynamicForm, which handles aborting any in-flight XHR upload request via RPCManager.cancelQueue().

      For standalone FileDropZone usage (outside of FileUploadItem), implement this method to abort any custom upload logic you have initiated.

    • removeFile

      public void removeFile(JavaScriptObject file)
      Remove a specific file from this fileDropZone.
      Parameters:
      file - The file to remove, or its index
    • removeFile

      public void removeFile(Integer file)
      Remove a specific file from this fileDropZone.
      Parameters:
      file - The file to remove, or its index
    • setFileProgress

      public void setFileProgress(JavaScriptObject file, double percentDone, Integer processed, Integer total)
      Update progress indication for a specific file during concurrent uploads.
      Parameters:
      file - The file being uploaded
      percentDone - Progress percentage (0-100) for this file
      processed - Bytes processed so far for this file
      total - Total bytes for this file
    • setFiles

      public void setFiles(JavaScriptObject files)
      Programmatically populate a fileDropZone with files.
      Parameters:
      files - JavaScript File object(s) to attach
    • setFiles

      public void setFiles(JavaScriptObject... files)
      Programmatically populate a fileDropZone with files.
      Parameters:
      files - JavaScript File object(s) to attach
    • setProcessingProgress

      public Boolean setProcessingProgress(double percentDone, Integer processed, Integer total)
      Update progress indication during upload/processing.
      Parameters:
      percentDone - Progress percentage (0-100)
      processed - Bytes processed so far
      total - Total bytes being processed
      Returns:
      false if no files selected, true otherwise
    • showDropError

      public void showDropError(String errorMessage)
      Display an error when a drop fails validation. Default implementation calls isc.warn(). Override for custom handling.
      Parameters:
      errorMessage - Error message to display
    • startProcessing

      public Boolean startProcessing()
      Show UI indicating processing has started. Masks the component and shows progressIndicator.
      Returns:
      false if no files selected, true otherwise
    • setDefaultProperties

      public static void setDefaultProperties(FileDropZone fileDropZoneProperties)
      Class level method to set the default properties of this class. If set, then all existing and subsequently created instances of this class will automatically have default properties corresponding to the properties set on the SmartGWT class instance passed to this function before its underlying SmartClient JS object was created. This is a powerful feature that eliminates the need for users to create a separate hierarchy of subclasses that only alter the default properties of this class. Can also be used for skinning / styling purposes.

      Note: This method is intended for setting default attributes only and will affect all instances of the underlying class (including those automatically generated in JavaScript). This method should not be used to apply standard EventHandlers or override methods for a class - use a custom subclass instead. Calling this method after instances have been created can result in undefined behavior, since it bypasses any setters and a class instance may have already examined a particular property and not be expecting any changes through this route.

      Parameters:
      fileDropZoneProperties - properties that should be used as new defaults when instances of this class are created
      See Also:
    • setLogicalStructure

      public LogicalStructureObject setLogicalStructure(FileDropZoneLogicalStructure s)
      Setter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
    • getLogicalStructure

      public LogicalStructureObject getLogicalStructure()
      Getter implementing the LogicalStructure interface, which supports Eclipse's logical structure debugging facility.
      Specified by:
      getLogicalStructure in interface LogicalStructure
      Overrides:
      getLogicalStructure in class DropZone