public function setWidget(SwatWidget $widget)
    {
        if ($this->widget !== null) {
            throw new SwatException(
                'SwatUI: Only one widget can be nested ' .
                    'within a SwatActionItem'
            );
        }

        $this->widget = $widget;
        $widget->parent = $this;
    }