public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject();  if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { DataFlavor flavor = possibleFlavors[i]; if (flavor.equals(DataFlavor.stringFlavor)) return DnDConstants.ACTION_MOVE; if (flavor instanceof CSMARTDataFlavor) { CSMARTDataFlavor cflavor = (CSMARTDataFlavor) flavor; if (getClass().getName().equals(cflavor.getSourceClassName())) { if (cflavor.equals(societyFlavor) || cflavor.equals(recipeFlavor) || cflavor.equals(experimentFlavor) || cflavor.equals(componentFlavor)) return DnDConstants.ACTION_MOVE; } } }
public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) { Object userObject = target.getUserObject();  if (userObject == null || userObject instanceof String) { for (int i = 0; i < possibleFlavors.length; i++) { DataFlavor flavor = possibleFlavors[i]; if (flavor instanceof CSMARTDataFlavor) { CSMARTDataFlavor cflavor = (CSMARTDataFlavor) flavor;  if (getClass().getName().equals(cflavor.getSourceClassName())) return DnDConstants.ACTION_MOVE;
    public int isDroppable(DataFlavor[] possibleFlavors, DefaultMutableTreeNode target) {        Object userObject = target.getUserObject();        // Can only drop on folders (or the root)        if (userObject == null || userObject instanceof String) {            for (int i = 0; i < possibleFlavors.length; i++) {                DataFlavor flavor = possibleFlavors[i];                if (flavor.equals(DataFlavor.stringFlavor))                    return DnDConstants.ACTION_MOVE;                if (flavor instanceof CSMARTDataFlavor) {                    CSMARTDataFlavor cflavor = (CSMARTDataFlavor) flavor;                    if (getClass().getName().equals(cflavor.getSourceClassName())) {                        if (cflavor.equals(societyFlavor)                            || cflavor.equals(recipeFlavor)                            || cflavor.equals(experimentFlavor)			    || cflavor.equals(componentFlavor))                            return DnDConstants.ACTION_MOVE;                    }                }            }        }        return DnDConstants.ACTION_NONE;    }