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:
-
-
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 Modifier and Type Method Description FileDropTargetState
getState()
Returns the shared state object for this connector.
protected void
onDrop(elemental.events.Event event)
Event handler for the
drop
event.-
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:
DropTargetExtensionConnector
Event handler for the
drop
event.Override this method in case custom handling for the drop event is required. If the drop is allowed, the event should prevent default.
Overrides:
onDrop
in classDropTargetExtensionConnector
Parameters:
event
- browser event to be handled
-
getState
public FileDropTargetState getState()
Description copied from class:
AbstractConnector
Returns the shared state object for this connector. Override this method to define the shared state type for your connector.
Specified by:
getState
in interfaceServerConnector
Overrides:
getState
in classDropTargetExtensionConnector
Returns:
the current shared state (never null)
-
-