如何在vaadin7中获取拖动的组件信息?

时间:2015-03-19 05:43:12

标签: vaadin7

我正在使用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中)

0 个答案:

没有答案