我正在使用Vaadin7拖放事件
这是我的代码 -
@Override
public void drop(DragAndDropEvent event) {
Component sourceComponent = event.getTransferable()
.getSourceComponent();
if (sourceComponent instanceof BoardCard) {
WrapperTargetDetails details = (WrapperTargetDetails) event
.getTargetDetails();
DropTarget target = details.getTarget();
BoardCardVo sourceCard = ((BoardCard) sourceComponent).getBoardCardVo() ;
if(target == sourceComponent){
return ;
}
...
}
我想,'sourceComponent'是拖动组件,'target'是目标组件。但是,这些是同一个对象
如何获取被拖动的组件?
(在gridlayout中)