Hai,
am trying to impliment drag&drop component inside another drag&drop
some thing like bukket in a bukket when i select the inner component the outer componet also selecting after drop how to avoid this ?
when inner layers selection i need to select only inner child component when iam selecting parent i need to select all like
private Component createComponentParent() {
Component result = null;
if (type == PaletteItemType.IF) {
result = new child()
}
return result;
}
child() is anothe component with drag and drop capacity
final DragAndDropWrapper ddWrap = new DragAndDropWrapper(caption);
ddWrap.setSizeUndefined();
ddWrap.setDragStartMode(DragStartMode.WRAPPER);
ddWrap.setData(type);
return ddWrap;
we can avoid this selection problem with usage of DragStartMode.WRAPPER and DragStartMode.NONE
private class WrappedComponent extends DragAndDropWrapper {
public WrappedComponent(final Component content) {
super(content);
((AbstractOrderedLayout) content).addLayoutClickListener(new LayoutClickListener() {
@Override
public void layoutClick(final LayoutClickEvent event) {
setDragStartMode(DragStartMode.WRAPPER);
logger.info("CLICKED HERE");
}
});
setDragStartMode(DragStartMode.NONE);
}