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.vaadin.client.ui.VGridLayout
io.jmix.ui.widget.client.addon.dragdroplayouts.ui.gridlayout.VDDGridLayout
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.IsWidget, com.vaadin.client.ui.dd.VHasDropHandler, VDDHasDropHandler<VDDGridLayoutDropHandler>, VHasDragCaptionProvider, VHasDragFilter, VHasDragImageReferenceSupport, VHasDragMode, VHasGrabFilter, VHasIframeShims, VLayoutDragDropMouseHandler.DragStartListener, Iterable<com.google.gwt.user.client.ui.Widget>

Client side implementation for DDGridLayout
Since:
0.4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
    A helper class returned by getCellDetailsByCoordinates() which contains positional and size data of the cell.

    Nested classes/interfaces inherited from class com.vaadin.client.ui.VGridLayout

    com.vaadin.client.ui.VGridLayout.Cell

    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.DebugIdImplEnabled

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets

    com.google.gwt.user.client.ui.HasWidgets.ForIsWidget

    Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel

    com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    protected com.vaadin.client.ApplicationConnection
     
    static final String
     

    Fields inherited from class com.vaadin.client.ui.VGridLayout

    cells, colExpandRatioArray, columnWidths, explicitColRatios, explicitRowRatios, hideEmptyRowsAndColumns, rowExpandRatioArray, rowHeights, spacingMeasureElement, widgetToCell

    Fields inherited from class com.google.gwt.user.client.ui.UIObject

    DEBUG_ID_PREFIX
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Removes any emphasis previously set by emphasis
    boolean
    dragStart(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.
    protected void
    emphasis(VDDGridLayout.CellDetails cell, com.vaadin.client.ui.dd.VDragEvent event)
    Emphasizes a component container when user is hovering a dragged component over the container.
    float
     
    float
     
     
    Returns the drag filter used by the layout
    Returns the drag mode
    Returns the drop handler used when the user drops a component over the Grid Layout
     
    protected com.vaadin.shared.ui.dd.HorizontalDropLocation
    getHorizontalDropLocation(VDDGridLayout.CellDetails cell, com.vaadin.client.ui.dd.VDragEvent event)
    Returns the horizontal drop location
     
    protected com.vaadin.shared.ui.dd.VerticalDropLocation
    getVerticalDropLocation(VDDGridLayout.CellDetails cell, com.vaadin.client.ui.dd.VDragEvent event)
    Returns the vertical drop location
    void
    iframeShimsEnabled(boolean enabled)
     
    boolean
     
    protected void
     
    protected void
     
    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.
    protected void
    postEnterHook(com.vaadin.client.ui.dd.VDragEvent drag)
    A hook for extended components to post process the the enter event.
    protected void
    postLeaveHook(com.vaadin.client.ui.dd.VDragEvent drag)
    A hook for extended components to post process the the leave event.
    protected void
    postOverHook(com.vaadin.client.ui.dd.VDragEvent drag)
    A hook for extended components to post process the the over event.
    void
    setCellLeftRightDropRatio(float cellLeftRightDropRatio)
     
    void
    setCellTopBottomDropRatio(float cellTopBottomDropRatio)
     
    void
     
    void
     
    void
     
    void
     
    void
     
    void
     
    void
    updateDragDetails(com.vaadin.client.ui.dd.VDragEvent event)
    Updates the drop details while dragging

    Methods inherited from class com.vaadin.client.ui.VGridLayout

    createNewCell, getCell, getColumnWidths, getComponent, getComponent, getConnector, getHorizontalSpacing, getRowHeights, getVerticalSpacing, remove, setCaption, setSize, updateHeight, updateMarginStyleNames, updateSpacingStyleName, updateWidth

    Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel

    add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove

    Methods inherited from class com.google.gwt.user.client.ui.Panel

    add, 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, 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 Details

  • Constructor Details

    • VDDGridLayout

      public VDDGridLayout()
  • Method Details

    • setDragCaptionProvider

      public void setDragCaptionProvider(VDragCaptionProvider dragCaption)
      Specified by:
      setDragCaptionProvider in interface VHasDragCaptionProvider
    • getDragCaptionProvider

      public VDragCaptionProvider getDragCaptionProvider()
      Specified by:
      getDragCaptionProvider in interface VHasDragCaptionProvider
    • onLoad

      protected void onLoad()
      Overrides:
      onLoad in class com.google.gwt.user.client.ui.Widget
    • onUnload

      protected void onUnload()
      Overrides:
      onUnload in class com.google.gwt.user.client.ui.Widget
    • getDropHandler

      public VDDGridLayoutDropHandler getDropHandler()
      Returns the drop handler used when the user drops a component over the Grid Layout
      Specified by:
      getDropHandler in interface VDDHasDropHandler<VDDGridLayoutDropHandler>
      Specified by:
      getDropHandler in interface com.vaadin.client.ui.dd.VHasDropHandler
    • setDropHandler

      public void setDropHandler(VDDGridLayoutDropHandler handler)
      Specified by:
      setDropHandler in interface VDDHasDropHandler<VDDGridLayoutDropHandler>
    • updateDragDetails

      public void updateDragDetails(com.vaadin.client.ui.dd.VDragEvent event)
      Updates the drop details while dragging
      Parameters:
      event - The drag event
    • getHorizontalDropLocation

      protected com.vaadin.shared.ui.dd.HorizontalDropLocation getHorizontalDropLocation(VDDGridLayout.CellDetails cell, com.vaadin.client.ui.dd.VDragEvent event)
      Returns the horizontal drop location
      Parameters:
      cell - The cell details
      event - The drag event
      Returns:
    • getVerticalDropLocation

      protected com.vaadin.shared.ui.dd.VerticalDropLocation getVerticalDropLocation(VDDGridLayout.CellDetails cell, com.vaadin.client.ui.dd.VDragEvent event)
      Returns the vertical drop location
      Parameters:
      cell - The cell details
      event - The drag event
      Returns:
    • emphasis

      protected void emphasis(VDDGridLayout.CellDetails cell, com.vaadin.client.ui.dd.VDragEvent event)
      Emphasizes a component container when user is hovering a dragged component over the container.
      Parameters:
      cell - The container
      event -
    • deEmphasis

      protected void deEmphasis()
      Removes any emphasis previously set by emphasis
    • getDragMode

      public LayoutDragMode getDragMode()
      Description copied from interface: VHasDragMode
      Returns the drag mode
      Specified by:
      getDragMode in interface VHasDragMode
      Returns:
    • 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.
    • dragStart

      public boolean dragStart(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. Return false to interrupt the drag:
      Specified by:
      dragStart in interface VLayoutDragDropMouseHandler.DragStartListener
      Parameters:
      widget - The widget which is about to be dragged
      mode - The draggin mode
      Returns:
      Should the dragging be commenced.
    • getDragFilter

      public VDragFilter getDragFilter()
      Description copied from interface: VHasDragFilter
      Returns the drag filter used by the layout
      Specified by:
      getDragFilter in interface VHasDragFilter
      Returns:
    • setDragFilter

      public void setDragFilter(VDragFilter filter)
      Specified by:
      setDragFilter in interface VHasDragFilter
    • getCellLeftRightDropRatio

      public float getCellLeftRightDropRatio()
    • setCellLeftRightDropRatio

      public void setCellLeftRightDropRatio(float cellLeftRightDropRatio)
    • getCellTopBottomDropRatio

      public float getCellTopBottomDropRatio()
    • setCellTopBottomDropRatio

      public void setCellTopBottomDropRatio(float cellTopBottomDropRatio)
    • iframeShimsEnabled

      public void iframeShimsEnabled(boolean enabled)
      Specified by:
      iframeShimsEnabled in interface VHasIframeShims
    • isIframeShimsEnabled

      public boolean isIframeShimsEnabled()
      Specified by:
      isIframeShimsEnabled in interface VHasIframeShims
    • setDragMode

      public void setDragMode(LayoutDragMode mode)
      Specified by:
      setDragMode in interface VHasDragMode
    • setDragImageProvider

      public void setDragImageProvider(VDragImageProvider provider)
      Specified by:
      setDragImageProvider in interface VHasDragImageReferenceSupport
    • getMouseHandler

      protected final VLayoutDragDropMouseHandler getMouseHandler()
    • getGrabFilter

      public VGrabFilter getGrabFilter()
      Specified by:
      getGrabFilter in interface VHasGrabFilter
    • setGrabFilter

      public void setGrabFilter(VGrabFilter grabFilter)
      Specified by:
      setGrabFilter in interface VHasGrabFilter