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.orderedlayout.VAbstractOrderedLayout
com.vaadin.client.ui.VHorizontalLayout
io.jmix.ui.widget.client.addon.dragdroplayouts.ui.horizontallayout.VDDHorizontalLayout
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<VDDHorizontalLayoutDropHandler>, VHasDragCaptionProvider, VHasDragFilter, VHasDragImageReferenceSupport, VHasDragMode, VHasGrabFilter, VHasIframeShims, VLayoutDragDropMouseHandler.DragStartListener, Iterable<com.google.gwt.user.client.ui.Widget>

Client side implementation for DDHorizontalLayout
Since:
0.4.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.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

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

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

    CLASSNAME

    Fields inherited from class com.vaadin.client.ui.orderedlayout.VAbstractOrderedLayout

    definedHeight, spacing, vertical, widgetToSlot

    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 applies drag and drop style applied 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(com.google.gwt.user.client.ui.Widget container, com.vaadin.client.ui.dd.VDragEvent event)
    Empasises the drop location of the component when hovering over a ĆhildComponentContainer.
    double
     
     
    Returns the drag filter used by the layout
    Returns the current drag mode which determines how the drag is visualized
    Get the drop handler attached to the Layout
     
    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.
     
    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
     
    void
     
    void
     
    void
     
    void
    Creates a drop handler if one does not already exist and updates it from the details received from the server.
    void
     
    protected void
    updateDragDetails(com.google.gwt.user.client.ui.Widget widget, com.vaadin.client.ui.dd.VDragEvent event)
    Updates the drop details while dragging.

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

    setStyleName

    Methods inherited from class com.vaadin.client.ui.orderedlayout.VAbstractOrderedLayout

    addOrMoveSlot, addOrMoveSlot, clearExpand, computeWidgetHeight, createSlot, getCaptionPositionFromElement, getCaptionPositionFromElement, getLayoutManager, getSlot, getSlot, getSlot, insert, insert, removeSlot, removeWidget, setHeight, setLayoutManager, setMargin, setSlotStyleNames, setSpacing, updateCaptionOffset, updateCaptionOffset, updateExpandCompensation, updateExpandedSizes

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

    add, clear, insert, insert

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

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

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

    add, adopt, 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, setPixelSize, setSize, setStyleDependentName, 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 com.google.gwt.user.client.ui.IndexedPanel

    getWidget, getWidgetCount, getWidgetIndex, remove

    Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget

    getWidgetIndex

    Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget

    add

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

  • Constructor Details

    • VDDHorizontalLayout

      public VDDHorizontalLayout()
  • 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
    • deEmphasis

      protected void deEmphasis()
      Removes any applies drag and drop style applied by emphasis()
    • 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 container
      event - The drag event
      Returns:
      The horizontal drop location
    • 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.
    • updateDragDetails

      protected void updateDragDetails(com.google.gwt.user.client.ui.Widget widget, 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:
      widget - The container which we are hovering over
      event - The drag event
    • emphasis

      protected void emphasis(com.google.gwt.user.client.ui.Widget container, com.vaadin.client.ui.dd.VDragEvent event)
      Empasises the drop location of the component when hovering over a ĆhildComponentContainer. Passing null as the container removes any previous emphasis.
      Parameters:
      container - The container which we are hovering over
      event - The drag event
    • getDragMode

      public LayoutDragMode getDragMode()
      Returns the current drag mode which determines how the drag is visualized
      Specified by:
      getDragMode in interface VHasDragMode
      Returns:
    • setDropHandler

      public void setDropHandler(VDDHorizontalLayoutDropHandler dropHandler)
      Creates a drop handler if one does not already exist and updates it from the details received from the server.
      Specified by:
      setDropHandler in interface VDDHasDropHandler<VDDHorizontalLayoutDropHandler>
      Parameters:
      dropHandler - The drop handler
    • getDropHandler

      public VDDHorizontalLayoutDropHandler getDropHandler()
      Get the drop handler attached to the Layout
      Specified by:
      getDropHandler in interface VDDHasDropHandler<VDDHorizontalLayoutDropHandler>
      Specified by:
      getDropHandler in interface com.vaadin.client.ui.dd.VHasDropHandler
    • getDragFilter

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

      public double getCellLeftRightDropRatio()
    • setCellLeftRightDropRatio

      public void setCellLeftRightDropRatio(float cellLeftRightDropRatio)
    • setDragFilter

      public void setDragFilter(VDragFilter filter)
      Specified by:
      setDragFilter in interface VHasDragFilter
    • 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