public function setFromStock($stock_id, $overwrite_properties = true)
    {
        switch ($stock_id) {
            case 'create':
                $title = Swat::_('Create');
                $class = 'swat-tool-link-create';
                break;

            case 'add':
                $title = Swat::_('Add');
                $class = 'swat-tool-link-add';
                break;

            case 'edit':
                $title = Swat::_('Edit');
                $class = 'swat-tool-link-edit';
                break;

            case 'download':
                $title = Swat::_('Download');
                $class = 'swat-tool-link-download';
                break;

            case 'delete':
                $title = Swat::_('Delete');
                $class = 'swat-tool-link-delete';
                break;

            case 'cancel':
                $title = Swat::_('Cancel');
                $class = 'swat-tool-link-cancel';
                break;

            case 'preview':
                $title = Swat::_('Preview');
                $class = 'swat-tool-link-preview';
                break;

            case 'change-order':
                $title = Swat::_('Change Order');
                $class = 'swat-tool-link-change-order';
                break;

            case 'help':
                $title = Swat::_('Help');
                $class = 'swat-tool-link-help';
                break;

            case 'print':
                $title = Swat::_('Print');
                $class = 'swat-tool-link-print';
                break;

            case 'email':
                $title = Swat::_('Email');
                $class = 'swat-tool-link-email';
                break;

            default:
                throw new SwatUndefinedStockTypeException(
                    "Stock type with id of '{$stock_id}' not found.",
                    0,
                    $stock_id
                );
        }

        if ($overwrite_properties || $this->title === null) {
            $this->title = $title;
        }

        $this->stock_class = $class;
    }