else if (transferable.isDataFlavorSupported(RoleDescriptor.ROLE_FLAVOR)) { RoleDescriptor localRole = (RoleDescriptor) transferable.getTransferData(RoleDescriptor.ROLE_FLAVOR) ;  TreePath localPath = getPathForLocation(_evt.getLocation().x, _evt.getLocation().y) ; DefaultMutableTreeNode localTargetNode = (DefaultMutableTreeNode) localPath.getLastPathComponent() ;   if (localTargetNode instanceof ResourceTreeNode) { BreakdownElementsControler.linkRoleDescriptorAndHumanResource( localRole, ((ResourceTreeNode) localTargetNode).getResource()) ; _evt.getDropTargetContext().dropComplete(true) ; }  }  else { _evt.rejectDrop() ; }
	public void drop (DropTargetDropEvent _evt)	{		try		{			Transferable transferable = _evt.getTransferable() ;			// Checking that its a human resource			if (!transferable.isDataFlavorSupported(HumanResource.RESOURCE_FLAVOR))			{				_evt.rejectDrop() ;			}			else			{				HumanResource localResource = (HumanResource) transferable.getTransferData(HumanResource.RESOURCE_FLAVOR) ;				// Now getting the target component				TreePath localPath = getPathForLocation(_evt.getLocation().x, _evt.getLocation().y) ;				DefaultMutableTreeNode localTargetNode = (DefaultMutableTreeNode) localPath.getLastPathComponent() ;				// If the node is a role, then linking				if (localTargetNode instanceof RoleDescriptorTreeNode)				{					BreakdownElementsControler.linkRoleDescriptorAndHumanResource( ((RoleDescriptorTreeNode) localTargetNode).getRole(), localResource) ;					_evt.getDropTargetContext().dropComplete(true) ;				}				/*				 * else if (localTargetNode instanceof TaskDescriptorTreeNode) { Collection				 * <RoleDescriptor> localRoles = ((TaskDescriptorTreeNode)				 * localTargetNode).getTask().getPrimaryPerformers() ; Iterator <RoleDescriptor>				 * localIterator = localRoles.iterator() ;				 * 				 * while (localIterator.hasNext()) { if				 * (localResource.getPerformingRoles().contains(localIterator.next())) { if				 * (!localResource.getPerformingTasks().contains( ((TaskDescriptorTreeNode)				 * localTargetNode).getTask())) { localResource.getPerformingTasks().add(				 * ((TaskDescriptorTreeNode) localTargetNode).getTask()) ;				 * _evt.getDropTargetContext().dropComplete(true) ; }				 * 				 * break ; } } }				 */			}		}		catch (UnsupportedFlavorException exc)		{			_evt.rejectDrop() ;		}		catch (IOException exc)		{			_evt.rejectDrop() ;		}	}