if ( defn.isKindOf( targetDefn ) )
if ( targetDefn.isKindOf( defn ) )
	public static boolean containElement( DesignElement element,			IElementDefn defn )	{		if ( element == null || defn == null )			return false;		// Check contents.		int count = element.getDefn( ).getSlotCount( );		for ( int i = 0; i < count; i++ )		{			Iterator iter = element.getSlot( i ).iterator( );			while ( iter.hasNext( ) )			{				DesignElement e = (DesignElement) iter.next( );				IElementDefn targetDefn = e.getDefn( );				if ( defn.isKindOf( targetDefn ) )					return true;				if ( containElement( e, defn ) )					return true;			}		}		return false;	}