Package 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:
VDragAndDropWrapperIE
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 classVDragAndDropWrapper.CustomDropHandlerstatic interfaceVDragAndDropWrapper.UploadHandlerInternal 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[]acceptedTypesApplicationConnectionclientFor internal use only.protected static intCOMPONENTprotected static intCOMPONENT_OTHERprotected static StringDRAGGABLEintdragStartModeFor internal use only.VAbstractDropHandlerdropHandlerFor internal use only.List<Integer>fileIdsFor internal use only.Map<String,String>fileIdToReceiverFor internal use only.List<VHtml5File>filesFor internal use only.booleanhasTooltipFor internal use only.protected HorizontalDropLocationhorizontalDropLocationprotected static intHTML5ValueMaphtml5DataFlavorsFor internal use only.protected static intNONEVDragAndDropWrapper.UploadHandleruploadHandlerFor internal use only.protected VerticalDropLocationverticalDropLocationprotected static intWRAPPER
-
Constructor Summary
Constructors Constructor Description VDragAndDropWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voiddeEmphasis(boolean doLayout)protected voidemphasis(VDragEvent drag)ComponentConnectorgetConnector()com.google.gwt.user.client.ui.WidgetgetDragImageWidget()protected com.google.gwt.user.client.ElementgetDragStartElement()VDropHandlergetDropHandler()Returns the drop handler for this widget.protected voidhookHtml5DragStart(com.google.gwt.dom.client.Element el)protected voidhookHtml5DragStart(com.google.gwt.user.client.Element el)Deprecated.As of 7.2, call or overridehookHtml5DragStart(Element)insteadprotected voidhookHtml5Events(com.google.gwt.dom.client.Element el)Prototype code, memory leak risk.protected voidhookHtml5Events(com.google.gwt.user.client.Element el)Deprecated.As of 7.2, call or overridehookHtml5Events(Element)insteadbooleanhtml5DragDrop(VHtml5DragEvent event)booleanhtml5DragEnter(VHtml5DragEvent event)booleanhtml5DragLeave(VHtml5DragEvent event)booleanhtml5DragOver(VHtml5DragEvent event)booleanhtml5DragStart(VHtml5DragEvent event)voidinitDragStartMode()For internal use only.voidsetDragAndDropWidget(com.google.gwt.user.client.ui.Widget widget)Set the widget that will be used as the drag image when using DragStartModeCOMPONENT_OTHER.voidstartNextUpload()For internal use only.booleanupdateDropDetails(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:
- Constant Field Values
-
hasTooltip
public boolean hasTooltip
For internal use only. May be removed or replaced in the future.
-
NONE
protected static final int NONE
- See Also:
- Constant Field Values
-
COMPONENT
protected static final int COMPONENT
- See Also:
- Constant Field Values
-
WRAPPER
protected static final int WRAPPER
- See Also:
- Constant Field Values
-
HTML5
protected static final int HTML5
- See Also:
- Constant Field Values
-
COMPONENT_OTHER
protected static final int COMPONENT_OTHER
- See Also:
- Constant Field Values
-
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:VHasDropHandlerReturns the drop handler for this widget.- Specified by:
getDropHandlerin 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 DragStartModeCOMPONENT_OTHER.- Parameters:
widget-
-
getDragImageWidget
public com.google.gwt.user.client.ui.Widget getDragImageWidget()
- Returns:
- the widget used as drag image. Returns
nullif no widget is set.
-
-