}
private void dropPerformed(DropEvent dropEvent) {
getListbox().renderAll();
Component target = dropEvent.getTarget();
Component dragged = dropEvent.getDragged();
if (dragged instanceof Listitem) {
Set<Listitem> itemSet = new HashSet<Listitem>(getListbox()
.getSelectedItems());
itemSet.add((Listitem) dragged);
List<Listitem> itemList = new ArrayList(getListbox().getItems());
itemList.retainAll(itemSet);
for (Listitem listitem : itemList) {
if (listitem != target) {
listitem.getParent().removeChild(listitem);
target.getParent().insertBefore(listitem, target);
}
}
getListbox().clearSelection();
}
if (dragged instanceof Treerow) {
Treeitem treeitem = (Treeitem) ((Treerow) dragged).getParent();
Listitem listitem = new Listitem("");
listitem.setValue(treeitem.getValue());
dragged.getParent().removeChild(dragged);
target.getParent().insertBefore(listitem, target);
}
try {
Nodes.append(JeaseSession.getContainer(),