{
e.rejectDrop();
}
//cast into appropriate data type
DndBrowserNodes nodes =
(DndBrowserNodes) tr.getTransferData(DndBrowserNodes.INFO_FLAVOR);
Component comp = e.getDropTargetContext().getComponent();
if (comp == staticMembers)
{
StringBuilder sb = new StringBuilder();
sb.append(staticMembers.getText());
for (BrowserNodeInfo node : nodes.getNodes())
{
if (sb.length() > 0)
{
sb.append("\n");
}
sb.append(node.getNode().getDN());
}
staticMembers.setText(sb.toString());
staticMembers.setCaretPosition(sb.length());
}
else if (comp == referenceGroup)
{
if (nodes.getNodes().length > 0)
{
String dn = nodes.getNodes()[0].getNode().getDN();
referenceGroup.setText(dn);
referenceGroup.setCaretPosition(dn.length());
}
}
e.acceptDrop(DnDConstants.ACTION_COPY_OR_MOVE);