/** * {@inheritDoc} */ public TargetDetails translateDropTargetDetails( Map<String, Object> clientVariables) { return new AccordionTargetDetails(this, clientVariables); }
@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();
AccordionTargetDetails details = (AccordionTargetDetails) event .getTargetDetails(); DDAccordion acc = (DDAccordion) details.getTarget(); VerticalDropLocation location = details.getDropLocation(); LayoutBoundTransferable transferable = (LayoutBoundTransferable) event .getTransferable(); Component c = transferable.getComponent(); int idx = details.getOverIndex();
/** * Some details about the mouse event * * @return details about the actual event that caused the event details. * Practically mouse move or mouse up. */ public MouseEventDetails getMouseEvent() { return MouseEventDetails.deSerialize((String) getData("mouseEvent")); }