center.add(view);
new ListViewDragSource(view);
TreePanelDropTarget target = new TreePanelDropTarget(tree) {
@SuppressWarnings("rawtypes")
@Override
protected void handleAppendDrop(DNDEvent event, TreeNode item) {
List<BeanModel> sel = event.getData();
for (BeanModel bean : sel) {
ModelData m = new BaseModelData();
for (String s : bean.getPropertyNames()) {
m.set(s, bean.get(s));
}
tree.getStore().add(item.getModel(), m, false);
}
}
};
target.setOperation(Operation.COPY);
target.setFeedback(Feedback.APPEND);
add(container);
}