com.vaadin.client.ui.
Class VDragAndDropWrapper
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.vaadin.client.ui.VCustomComponent
-
- com.vaadin.client.ui.VDragAndDropWrapper
-
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.AcceptsOneWidget
,com.google.gwt.user.client.ui.HasOneWidget
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,VHasDropHandler
,Iterable<com.google.gwt.user.client.ui.Widget>
Direct Known Subclasses:
public class VDragAndDropWrapper extends VCustomComponent implements VHasDropHandler
A wrapper for Drag and Drop. Must have features pending: drop details: locations + sizes in document hierarchy up to wrapper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
VDragAndDropWrapper.CustomDropHandler
static interface
VDragAndDropWrapper.UploadHandler
Internal client side interface used by the connector and the widget for the drag and drop wrapper to signal the completion of an HTML5 file upload.
-
Field Summary
Fields Modifier and Type Field Description protected String[]
acceptedTypes
ApplicationConnection
client
For internal use only.
protected static int
COMPONENT
protected static int
COMPONENT_OTHER
protected static String
DRAGGABLE
int
dragStartMode
For internal use only.
VAbstractDropHandler
dropHandler
For internal use only.
List<Integer>
fileIds
For internal use only.
Map<String,String>
fileIdToReceiver
For internal use only.
List<VHtml5File>
files
For internal use only.
boolean
hasTooltip
For internal use only.
protected HorizontalDropLocation
horizontalDropLocation
protected static int
HTML5
ValueMap
html5DataFlavors
For internal use only.
protected static int
NONE
VDragAndDropWrapper.UploadHandler
uploadHandler
For internal use only.
protected VerticalDropLocation
verticalDropLocation
protected static int
WRAPPER
-
Constructor Summary
Constructors Constructor Description VDragAndDropWrapper()
-
Method Summary
All Methods Modifier and Type Method Description protected void
deEmphasis(boolean doLayout)
protected void
emphasis(VDragEvent drag)
ComponentConnector
getConnector()
com.google.gwt.user.client.ui.Widget
getDragImageWidget()
protected com.google.gwt.user.client.Element
getDragStartElement()
VDropHandler
getDropHandler()
Returns the drop handler for this widget.
protected void
hookHtml5DragStart(com.google.gwt.dom.client.Element el)
protected void
hookHtml5DragStart(com.google.gwt.user.client.Element el)
Deprecated.
As of 7.2, call or overridehookHtml5DragStart(Element)
insteadprotected void
hookHtml5Events(com.google.gwt.dom.client.Element el)
Prototype code, memory leak risk.
protected void
hookHtml5Events(com.google.gwt.user.client.Element el)
Deprecated.
As of 7.2, call or overridehookHtml5Events(Element)
insteadboolean
html5DragDrop(VHtml5DragEvent event)
boolean
html5DragEnter(VHtml5DragEvent event)
boolean
html5DragLeave(VHtml5DragEvent event)
boolean
html5DragOver(VHtml5DragEvent event)
boolean
html5DragStart(VHtml5DragEvent event)
void
initDragStartMode()
For internal use only.
void
setDragAndDropWidget(com.google.gwt.user.client.ui.Widget widget)
Set the widget that will be used as the drag image when using DragStartMode
COMPONENT_OTHER
.void
startNextUpload()
For internal use only.
boolean
updateDropDetails(VDragEvent drag)
-
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, getContainerElement, getWidget, iterator, remove, setWidget, setWidget
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
DRAGGABLE
protected static final String DRAGGABLE
See Also:
-
hasTooltip
public boolean hasTooltip
For internal use only. May be removed or replaced in the future.
-
NONE
protected static final int NONE
See Also:
-
COMPONENT
protected static final int COMPONENT
See Also:
-
WRAPPER
protected static final int WRAPPER
See Also:
-
HTML5
protected static final int HTML5
See Also:
-
COMPONENT_OTHER
protected static final int COMPONENT_OTHER
See Also:
-
dragStartMode
public int dragStartMode
For internal use only. May be removed or replaced in the future.
-
client
public ApplicationConnection client
For internal use only. May be removed or replaced in the future.
-
dropHandler
public VAbstractDropHandler dropHandler
For internal use only. May be removed or replaced in the future.
-
uploadHandler
public VDragAndDropWrapper.UploadHandler uploadHandler
For internal use only. May be removed or replaced in the future.
-
fileIdToReceiver
public Map<String,String> fileIdToReceiver
For internal use only. May be removed or replaced in the future.
-
html5DataFlavors
public ValueMap html5DataFlavors
For internal use only. May be removed or replaced in the future.
-
acceptedTypes
protected String[] acceptedTypes
-
fileIds
public List<Integer> fileIds
For internal use only. May be removed or replaced in the future.
-
files
public List<VHtml5File> files
For internal use only. May be removed or replaced in the future.
-
verticalDropLocation
protected VerticalDropLocation verticalDropLocation
-
horizontalDropLocation
protected HorizontalDropLocation horizontalDropLocation
-
-
Method Detail
-
initDragStartMode
public void initDragStartMode()
For internal use only. May be removed or replaced in the future.
-
getDragStartElement
protected com.google.gwt.user.client.Element getDragStartElement()
-
startNextUpload
public void startNextUpload()
For internal use only. May be removed or replaced in the future.
-
html5DragStart
public boolean html5DragStart(VHtml5DragEvent event)
-
html5DragEnter
public boolean html5DragEnter(VHtml5DragEvent event)
-
html5DragLeave
public boolean html5DragLeave(VHtml5DragEvent event)
-
html5DragOver
public boolean html5DragOver(VHtml5DragEvent event)
-
html5DragDrop
public boolean html5DragDrop(VHtml5DragEvent event)
-
getDropHandler
public VDropHandler getDropHandler()
Description copied from interface:
VHasDropHandler
Returns the drop handler for this widget.
Specified by:
getDropHandler
in interfaceVHasDropHandler
Returns:
the drop handler
-
getConnector
public ComponentConnector getConnector()
-
hookHtml5DragStart
@Deprecated protected void hookHtml5DragStart(com.google.gwt.user.client.Element el)
Deprecated.As of 7.2, call or overridehookHtml5DragStart(Element)
instead
-
hookHtml5DragStart
protected void hookHtml5DragStart(com.google.gwt.dom.client.Element el)
Since:
7.2
-
hookHtml5Events
@Deprecated protected void hookHtml5Events(com.google.gwt.user.client.Element el)
Deprecated.As of 7.2, call or overridehookHtml5Events(Element)
insteadPrototype code, memory leak risk.
Parameters:
el
-
-
hookHtml5Events
protected void hookHtml5Events(com.google.gwt.dom.client.Element el)
Prototype code, memory leak risk.
Parameters:
el
-Since:
7.2
-
updateDropDetails
public boolean updateDropDetails(VDragEvent drag)
-
deEmphasis
protected void deEmphasis(boolean doLayout)
-
emphasis
protected void emphasis(VDragEvent drag)
-
setDragAndDropWidget
public void setDragAndDropWidget(com.google.gwt.user.client.ui.Widget widget)
Set the widget that will be used as the drag image when using DragStartMode
COMPONENT_OTHER
.Parameters:
widget
-
-
getDragImageWidget
public com.google.gwt.user.client.ui.Widget getDragImageWidget()
Returns:
the widget used as drag image. Returns
null
if no widget is set.
-
-