Package com.vaadin.client.extensions
Class FileDropTargetConnector
- java.lang.Object
-
- com.vaadin.client.ui.AbstractConnector
-
- com.vaadin.client.extensions.AbstractExtensionConnector
-
- com.vaadin.client.extensions.DropTargetExtensionConnector
-
- com.vaadin.client.extensions.FileDropTargetConnector
-
- All Implemented Interfaces:
com.google.gwt.event.shared.EventHandler,StateChangeEvent.StateChangeHandler,ServerConnector,Connector,Serializable
public class FileDropTargetConnector extends DropTargetExtensionConnector
Extension to add file drop target functionality to a widget. It allows dropping files onto the widget and uploading the dropped files to the server.- Since:
- 8.1
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.vaadin.client.extensions.DropTargetExtensionConnector
STYLE_SUFFIX_DRAG_BOTTOM, STYLE_SUFFIX_DRAG_CENTER, STYLE_SUFFIX_DRAG_TOP, STYLE_SUFFIX_DROPTARGET
-
-
Constructor Summary
Constructors Constructor Description FileDropTargetConnector()Constructs file drop target connector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileDropTargetStategetState()Returns the shared state object for this connector.protected voidonDrop(elemental.events.Event event)Event handler for thedropevent.-
Methods inherited from class com.vaadin.client.extensions.DropTargetExtensionConnector
addDragOverStyle, addDropTargetStyle, extend, getDropTargetElement, isDropAllowedByCriteriaScript, onDragEnter, onDragLeave, onDragOver, onUnregister, removeDragOverStyle, removeDropTargetStyle, sendDropEventToServer
-
Methods inherited from class com.vaadin.client.extensions.AbstractExtensionConnector
setParent
-
Methods inherited from class com.vaadin.client.ui.AbstractConnector
addStateChangeHandler, addStateChangeHandler, createState, doInit, ensureHandlerManager, fireEvent, forceStateChange, getChildren, getConnection, getConnectorId, getParent, getResourceUrl, getRpcImplementations, getRpcProxy, getStateType, getTag, hasEventListener, init, isEnabled, onStateChanged, registerRpc, removeStateChangeHandler, removeStateChangeHandler, setChildren, setTag, unregisterRpc, updateEnabledState
-
-
-
-
Method Detail
-
onDrop
protected void onDrop(elemental.events.Event event)
Description copied from class:DropTargetExtensionConnectorEvent handler for thedropevent.Override this method in case custom handling for the drop event is required. If the drop is allowed, the event should prevent default.
- Overrides:
onDropin classDropTargetExtensionConnector- Parameters:
event- browser event to be handled
-
getState
public FileDropTargetState getState()
Description copied from class:AbstractConnectorReturns the shared state object for this connector. Override this method to define the shared state type for your connector.- Specified by:
getStatein interfaceServerConnector- Overrides:
getStatein classDropTargetExtensionConnector- Returns:
- the current shared state (never null)
-
-