Class VDDCssLayout
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.ComplexPanel
com.google.gwt.user.client.ui.FlowPanel
com.vaadin.client.ui.VCssLayout
io.jmix.ui.widget.client.addon.dragdroplayouts.ui.csslayout.VDDCssLayout
- 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.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IndexedPanel,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget,com.google.gwt.user.client.ui.InsertPanel,com.google.gwt.user.client.ui.InsertPanel.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,com.vaadin.client.ui.dd.VHasDropHandler,VDDHasDropHandler<VDDCssLayoutDropHandler>,VHasDragCaptionProvider,VHasDragFilter,VHasDragImageReferenceSupport,VHasDragMode,VHasGrabFilter,VHasIframeShims,VLayoutDragDropMouseHandler.DragStartListener,Iterable<com.google.gwt.user.client.ui.Widget>
public class VDDCssLayout
extends com.vaadin.client.ui.VCssLayout
implements VHasDragMode, VDDHasDropHandler<VDDCssLayoutDropHandler>, VLayoutDragDropMouseHandler.DragStartListener, VHasDragFilter, VHasIframeShims, VHasDragImageReferenceSupport, VHasGrabFilter, VHasDragCaptionProvider
Client side implementation for
DDCssLayout- Since:
- 0.7.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidgetNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidgetNested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget -
Field Summary
FieldsFields inherited from class com.vaadin.client.ui.VCssLayout
CLASSNAMEFields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidattachDragImageToLayout(com.vaadin.client.ui.dd.VDragEvent drag) voiddetachDragImageFromLayout(com.vaadin.client.ui.dd.VDragEvent drag) booleandragStart(com.google.gwt.user.client.ui.Widget widget, LayoutDragMode mode) Can be used to listen to drag start events, must return true for the drag to commence.Returns the drag filter used by the layoutReturns the drag modeReturns the drop handler which handles the drop eventsprotected com.vaadin.shared.ui.dd.HorizontalDropLocationgetHorizontalDropLocation(com.google.gwt.user.client.ui.Widget container, com.vaadin.client.ui.dd.VDragEvent event) Returns the horizontal location within the cell when hoovering over the cell.doubleprotected final VLayoutDragDropMouseHandlerprotected com.vaadin.shared.ui.dd.VerticalDropLocationgetVerticalDropLocation(com.google.gwt.user.client.ui.Widget container, com.vaadin.client.ui.dd.VDragEvent event) Returns the horizontal location within the cell when hoovering over the cell.doublevoidiframeShimsEnabled(boolean enabled) booleanprotected voidonLoad()protected voidonUnload()protected booleanpostDropHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the drop before it is sent to the server.protected voidpostEnterHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the enter event.protected voidpostLeaveHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the leave event.protected voidpostOverHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the over event.voidsetDragCaptionProvider(VDragCaptionProvider dragCaption) voidsetDragFilter(VDragFilter filter) voidsetDragImageProvider(VDragImageProvider provider) voidsetDragMode(LayoutDragMode mode) voidsetDropHandler(VDDCssLayoutDropHandler dropHandler) voidsetGrabFilter(VGrabFilter grabFilter) voidsetHorizontalDropRatio(float horizontalDropRatio) voidsetVerticalDropRatio(float verticalDropRatio) voidupdateDrag(com.vaadin.client.ui.dd.VDragEvent drag) protected voidupdateDragDetails(com.vaadin.client.ui.dd.VDragEvent event) Updates the drop details while dragging.Methods inherited from class com.vaadin.client.ui.VCssLayout
addOrMoveMethods inherited from class com.google.gwt.user.client.ui.FlowPanel
add, clear, insert, insertMethods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeMethods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, doAttachChildren, doDetachChildren, orphan, removeMethods 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, removeFromParent, setLayoutData, sinkEvents, unsinkEventsMethods 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, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.gwt.user.client.ui.IndexedPanel
getWidget, getWidgetCount, getWidgetIndex, removeMethods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
getWidgetIndexMethods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget
addMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
DRAG_SHADOW_STYLE_NAME
- See Also:
-
-
Constructor Details
-
VDDCssLayout
public VDDCssLayout()Default constructor
-
-
Method Details
-
dragStart
Can be used to listen to drag start events, must return true for the drag to commence. Return false to interrupt the drag:- Specified by:
dragStartin interfaceVLayoutDragDropMouseHandler.DragStartListener- Parameters:
widget- The widget which is about to be draggedmode- The draggin mode- Returns:
- Should the dragging be commenced.
-
setDragCaptionProvider
- Specified by:
setDragCaptionProviderin interfaceVHasDragCaptionProvider
-
getDragCaptionProvider
- Specified by:
getDragCaptionProviderin interfaceVHasDragCaptionProvider
-
getDropHandler
Returns the drop handler which handles the drop events- Specified by:
getDropHandlerin interfaceVDDHasDropHandler<VDDCssLayoutDropHandler>- Specified by:
getDropHandlerin interfacecom.vaadin.client.ui.dd.VHasDropHandler
-
setDropHandler
- Specified by:
setDropHandlerin interfaceVDDHasDropHandler<VDDCssLayoutDropHandler>
-
getDragMode
Returns the drag mode- Specified by:
getDragModein interfaceVHasDragMode- Returns:
-
onLoad
protected void onLoad()- Overrides:
onLoadin classcom.google.gwt.user.client.ui.Widget
-
onUnload
protected void onUnload()- Overrides:
onUnloadin classcom.google.gwt.user.client.ui.Widget
-
postDropHook
protected boolean postDropHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the drop before it is sent to the server. Useful if you don't want to override the whole drop handler. -
postEnterHook
protected void postEnterHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the enter event. Useful if you don't want to override the whole drophandler. -
postLeaveHook
protected void postLeaveHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the leave event. Useful if you don't want to override the whole drophandler. -
postOverHook
protected void postOverHook(com.vaadin.client.ui.dd.VDragEvent drag) A hook for extended components to post process the the over event. Useful if you don't want to override the whole drophandler. -
attachDragImageToLayout
public void attachDragImageToLayout(com.vaadin.client.ui.dd.VDragEvent drag) -
detachDragImageFromLayout
public void detachDragImageFromLayout(com.vaadin.client.ui.dd.VDragEvent drag) -
updateDragDetails
protected void updateDragDetails(com.vaadin.client.ui.dd.VDragEvent event) Updates the drop details while dragging. This is needed to ensure client side criterias can validate the drop location.- Parameters:
event- The drag event
-
updateDrag
public void updateDrag(com.vaadin.client.ui.dd.VDragEvent drag) -
getHorizontalDropLocation
protected com.vaadin.shared.ui.dd.HorizontalDropLocation getHorizontalDropLocation(com.google.gwt.user.client.ui.Widget container, com.vaadin.client.ui.dd.VDragEvent event) Returns the horizontal location within the cell when hoovering over the cell. By default the cell is devided into three parts: left,center,right with the ratios 10%,80%,10%;- Parameters:
container- The widget containerevent- The drag event- Returns:
- The horizontal drop location
-
getVerticalDropLocation
protected com.vaadin.shared.ui.dd.VerticalDropLocation getVerticalDropLocation(com.google.gwt.user.client.ui.Widget container, com.vaadin.client.ui.dd.VDragEvent event) Returns the horizontal location within the cell when hoovering over the cell. By default the cell is devided into three parts: left,center,right with the ratios 10%,80%,10%;- Parameters:
container- The widget containerevent- The drag event- Returns:
- The horizontal drop location
-
getDragFilter
Description copied from interface:VHasDragFilterReturns the drag filter used by the layout- Specified by:
getDragFilterin interfaceVHasDragFilter- Returns:
-
getHorizontalDropRatio
public double getHorizontalDropRatio() -
setHorizontalDropRatio
public void setHorizontalDropRatio(float horizontalDropRatio) -
getVerticalDropRatio
public double getVerticalDropRatio() -
setVerticalDropRatio
public void setVerticalDropRatio(float verticalDropRatio) -
setDragFilter
- Specified by:
setDragFilterin interfaceVHasDragFilter
-
iframeShimsEnabled
public void iframeShimsEnabled(boolean enabled) - Specified by:
iframeShimsEnabledin interfaceVHasIframeShims
-
isIframeShimsEnabled
public boolean isIframeShimsEnabled()- Specified by:
isIframeShimsEnabledin interfaceVHasIframeShims
-
setDragMode
- Specified by:
setDragModein interfaceVHasDragMode
-
setDragImageProvider
- Specified by:
setDragImageProviderin interfaceVHasDragImageReferenceSupport
-
getMouseHandler
-
getGrabFilter
- Specified by:
getGrabFilterin interfaceVHasGrabFilter
-
setGrabFilter
- Specified by:
setGrabFilterin interfaceVHasGrabFilter
-