theData = aNode.getUserObject(); if (theData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}; else if (theData instanceof RecipeComponent)  flavors = new DataFlavor[] {recipeFlavor}; else if (theData instanceof Experiment) flavors = new DataFlavor[] {experimentFlavor}; else if (theData instanceof ModifiableComponent) flavors = new DataFlavor[] {componentFlavor}; else throw new IllegalArgumentException("Unknown node"); }
theData = aNode; Object theUserData = aNode.getUserObject(); if (theUserData instanceof String) flavors = new DataFlavor[] {folderFlavor}; else if (theUserData instanceof SocietyComponent) flavors = new DataFlavor[] {societyFlavor}; else if (theUserData instanceof RecipeComponent) flavors = new DataFlavor[] {recipeFlavor}; else if (theUserData instanceof Experiment) flavors = new DataFlavor[] {experimentFlavor}; else if (theUserData instanceof ModifiableComponent) flavors = new DataFlavor[] {componentFlavor}; else throw new IllegalArgumentException("Unknown node"); }
        public MyTransferable(DefaultMutableTreeNode aNode) {            theData = aNode.getUserObject();            if (theData instanceof String)                flavors = new DataFlavor[] {folderFlavor};            else if (theData instanceof SocietyComponent)                flavors = new DataFlavor[] {societyFlavor};	    else if (theData instanceof RecipeComponent)	      //else if (theData instanceof Recipe)                flavors = new DataFlavor[] {recipeFlavor};            else if (theData instanceof Experiment)                flavors = new DataFlavor[] {experimentFlavor};            else if (theData instanceof ModifiableComponent)                flavors = new DataFlavor[] {componentFlavor};            else                throw new IllegalArgumentException("Unknown node");        }