Class FileDropTarget<T extends AbstractComponent>

    • Constructor Detail

      • FileDropTarget

        public FileDropTarget​(T target,
                              FileDropHandler<T> fileDropHandler)
        Extends target component and makes it a file drop target. A file drop handler needs to be added to handle the file drop event.
        Parameters:
        target - Component to be extended.
        fileDropHandler - File drop handler that handles the file drop event.
        See Also:
        FileDropEvent
    • Method Detail

      • onDrop

        protected void onDrop​(java.util.Map<java.lang.String,​com.vaadin.shared.ui.dnd.FileParameters> fileParams)
        Invoked when a file or files have been dropped on client side. Fires the FileDropEvent.
        Parameters:
        fileParams - map from file ids to actual file details
      • getState

        protected com.vaadin.shared.ui.dnd.FileDropTargetState getState()
        Description copied from class: AbstractClientConnector
        Returns the shared state for this connector. The shared state object is shared between the server connector and the client connector. Changes are only communicated from the server to the client and not in the other direction.

        As a side effect, marks the connector dirty so any changes done to the state will be sent to the client. Use getState(false) to avoid marking the connector as dirty.

        Overrides:
        getState in class DropTargetExtension<T extends AbstractComponent>
        Returns:
        The shared state for this connector. Never null.