protected function validateColumn(SwatTableViewColumn $column)
    {
        // note: This works because the id property is set before children are
        // added to parents in SwatUI.
        if ($column->id !== null) {
            if (array_key_exists($column->id, $this->columns_by_id)) {
                throw new SwatDuplicateIdException(
                    "A column with the id '{$column->id}' already exists " .
                        'in this table view.',
                    0,
                    $column->id
                );
            }
        }
    }