Class JmixTableDragSourceExtension<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable>

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.server.AbstractExtension
com.vaadin.ui.dnd.DragSourceExtension<T>
io.jmix.ui.widget.JmixTableDragSourceExtension<T>
Type Parameters:
T - component that extends Table
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Extension, com.vaadin.shared.Connector, Serializable

public class JmixTableDragSourceExtension<T extends com.vaadin.v7.ui.Table & JmixEnhancedTable> extends com.vaadin.ui.dnd.DragSourceExtension<T>
Drag source extension for Table.

You can drag rows from table and drop them to another components if they use special extension to handle drop event.

To get dragged item ids in the drop event you get this extension and use getLastDraggedItemIds() or getLastSingleDraggedItemId().

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector

    com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler

    Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

    com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected List<Object>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     

    Methods inherited from class com.vaadin.ui.dnd.DragSourceExtension

    addDragEndListener, addDragStartListener, attach, clearDataTransferData, clearDataTransferData, getDataTransferData, getDataTransferData, getDataTransferText, getDragData, getEffectAllowed, getParent, getState, getState, onDragEnd, onDragStart, registerDragSourceRpc, remove, setDataTransferData, setDataTransferText, setDragData, setDragImage, setEffectAllowed, setPayload, setPayload, setPayload

    Methods inherited from class com.vaadin.server.AbstractExtension

    extend, getSupportedParentType, setParent

    Methods inherited from class com.vaadin.server.AbstractClientConnector

    addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, beforeClientResponse, createState, detach, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isConnectorEnabled, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.server.ClientConnector

    addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler

    Methods inherited from interface com.vaadin.shared.Connector

    getConnectorId
  • Field Details

    • transferredItems

      protected List<Object> transferredItems
  • Constructor Details

    • JmixTableDragSourceExtension

      public JmixTableDragSourceExtension(T target)
  • Method Details

    • getLastDraggedItemIds

      public List<Object> getLastDraggedItemIds()
      Returns:
      list of last dragged item ids
    • getLastSingleDraggedItemId

      @Nullable public Object getLastSingleDraggedItemId()
      Returns:
      id of dragged item. If were dragged more than one it returns first item id in the collection.