public function hasChild ($child, $recursive = true)
    {
        foreach ($this->children as $component)
            /* @var $component Component */
            if ($component == $child || ($recursive && $component->hasChild($child, true)))
                return true;
        return false;
    }