@Override protected void handleHTML5Drop(DragAndDropEvent event) { AccordionTargetDetails details = (AccordionTargetDetails) event .getTargetDetails(); VerticalDropLocation location = details.getDropLocation(); DDAccordion acc = (DDAccordion) details.getTarget(); int idx = details.getOverIndex(); Component c = resolveComponentFromHTML5Drop(event); c.setCaption(resolveCaptionFromHTML5Drop(event)); if (location == VerticalDropLocation.TOP) { acc.addTab(c, idx); } else if (location == VerticalDropLocation.BOTTOM) { acc.addTab(c, idx + 1); } else { acc.addTab(c); } }
DDAccordion acc = (DDAccordion) details.getTarget(); Component c = transferable.getComponent(); int idx = details.getOverIndex(); VerticalDropLocation location = details.getDropLocation();
.getTransferable(); Component c = transferable.getComponent(); int idx = details.getOverIndex();