if ((userData instanceof ModifiableConfigurableComponent) && !((ModifiableConfigurableComponent)userData).isEditable()) return DnDConstants.ACTION_NONE;
    public int addElement(Transferable t,                          DefaultMutableTreeNode target,                          DefaultMutableTreeNode before) {        DataFlavor[] flavors = t.getTransferDataFlavors();        int action = isDroppable(flavors, target);        if (action != DnDConstants.ACTION_NONE) {            DataFlavor flavor = flavors[0];            try {                DefaultMutableTreeNode root =                    (DefaultMutableTreeNode) model.getRoot();                if (target == root) {                    for (int i = 0, n = root.getChildCount(); i < n; i++) {                        DefaultMutableTreeNode node =                            (DefaultMutableTreeNode) root.getChildAt(i);                        Object o = node.getUserObject();                        if (SOCIETIES.equals(o) && flavor == societyFlavor                            || RECIPES.equals(o) && flavor == recipeFlavor) {                            target = node;                        } else {                            return DnDConstants.ACTION_NONE;                        }                    }                }                Object userData = t.getTransferData(flavor);                if ((userData instanceof ModifiableConfigurableComponent) &&                    !((ModifiableConfigurableComponent)userData).isEditable())                  return DnDConstants.ACTION_NONE;                DefaultMutableTreeNode node =                    new DefaultMutableTreeNode(userData, false);                int ix = target.getChildCount();                if (before != null) {                    ix = model.getIndexOfChild(target, before);                }//                  System.out.println("Insert into " + target//                                     + " at " + ix//                                     + " before " + before);                model.insertNodeInto(node, target, ix);                selectNode(node);                return action;            } catch (Exception e) {                e.printStackTrace();            }        }        return DnDConstants.ACTION_NONE;    }