Directory

← Back

DragDropLayouts

Drag & Drop for core layouts

Author

Contributors

Rating

Currently when you want to drag and drop between layouts you will have to wrap the source component in a DragAndDropWrapper. Many times this is adequate but it tends to add some complexity to the code and yet another element in the DOM. It would be much nicer if the layouts would handle this for you.

To solve this issue I have extended the core layouts and implemented the necessary functionality so the layouts are valid drag sources and drop targets. This means that in your code you don't have to concern yourself with the drag and drop when adding components, only enable drag&drop in the layout and you are ready to go!

Currently supported layouts are:

  • AbsoluteLayout (DDAbsoluteLayout)
  • HorizontalLayout (DDHorizontalLayout)
  • VerticalLayout (DDVerticalLayout)
  • GridLayout (DDGridLayout)
  • HorizontalSplitPanel (DDHorizontalSplitPanel)
  • VerticalSplitPanel (DDVerticalSplitPanel)
  • TabSheet (DDTabSheet)
  • Accordion (DDAccordion)
  • CssLayout (DDCssLayout)
  • FormLayout (DDFormLayout)
  • Panel (DDPanel)

Please see the version table below to decide which version to use in your project:

VaadinDragDropLayouts
6.x0.x
7.0.x+1.0.x
7.2.x+1.1.x
7.6.x+1.2.x
7.7.x+1.3.x
8.x1.4.x

Sample code

// Create a absolute layout
DDAbsoluteLayout layout = new DDAbsoluteLayout();

// Enable dragging components
layout.setDragMode(LayoutDragMode.CLONE);

// Enable dropping components
layout.setDropHandler(new DefaultAbsoluteLayoutDropHandler());

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Fix drag hover timer issues

Released
2017-03-02
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 7.7+
Vaadin 8.0+ in 1.4.2
Vaadin 7.6+ in 1.3.1
Vaadin 7.2+ in 1.1.3
Vaadin 7.0+ in 1.0.1
Vaadin 6.5+ in 0.8.2
Browser
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Internet Explorer
iOS Browser
Android Browser
Internet Explorer
Internet Explorer
Windows Phone

DragDropLayouts - Vaadin Add-on Directory

Drag & Drop for core layouts DragDropLayouts - Vaadin Add-on Directory
Currently when you want to drag and drop between layouts you will have to wrap the source component in a DragAndDropWrapper. Many times this is adequate but it tends to add some complexity to the code and yet another element in the DOM. It would be much nicer if the layouts would handle this for you. To solve this issue I have extended the core layouts and implemented the necessary functionality so the layouts are valid drag sources and drop targets. This means that in your code you don't have to concern yourself with the drag and drop when adding components, only enable drag&drop in the layout and you are ready to go! Currently supported layouts are: - AbsoluteLayout (DDAbsoluteLayout) - HorizontalLayout (DDHorizontalLayout) - VerticalLayout (DDVerticalLayout) - GridLayout (DDGridLayout) - HorizontalSplitPanel (DDHorizontalSplitPanel) - VerticalSplitPanel (DDVerticalSplitPanel) - TabSheet (DDTabSheet) - Accordion (DDAccordion) - CssLayout (DDCssLayout) - FormLayout (DDFormLayout) - Panel (DDPanel) Please see the version table below to decide which version to use in your project:
VaadinDragDropLayouts
6.x0.x
7.0.x+1.0.x
7.2.x+1.1.x
7.6.x+1.2.x
7.7.x+1.3.x
8.x1.4.x
Online