Set recommended horizontal align.

@throws Exception\InvalidArgumentException

@param string $align can be left|center|right

@return Column
961543
public function setAlign($align)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setAlign($align);
        }
    }
464703
public function setDirection($direction)
    {
        if ($direction === null) {
            $this->direction = $direction;
            return $this;
        }

        if (!is_string($direction)) {
            throw new InvalidArgumentException(
                'Direction must be a string.'
            );
        }

        $this->direction = strtolower($direction) === 'asc' ? 'ASC' : 'DESC';
        return $this;
    }
70850
public void setVerticalAlignment(final VerticalAlignment align) {

        if(cell.getCellStyle().getVerticalAlignmentEnum().equals(align)) {
            // 既に縦位置が同じ値
            return;
        }

        cloneStyle();
        cell.getCellStyle().setVerticalAlignment(align);
    }
935424
private function mapHAlign($hAlign)
    {
        switch ($hAlign) {
            case PHPExcel_Style_Alignment::HORIZONTAL_GENERAL:
                return false;
            case PHPExcel_Style_Alignment::HORIZONTAL_LEFT:
                return 'left';
            case PHPExcel_Style_Alignment::HORIZONTAL_RIGHT:
                return 'right';
            case PHPExcel_Style_Alignment::HORIZONTAL_CENTER:
            case PHPExcel_Style_Alignment::HORIZONTAL_CENTER_CONTINUOUS:
                return 'center';
            case PHPExcel_Style_Alignment::HORIZONTAL_JUSTIFY:
                return 'justify';
            default:
                return false;
        }
    }
585140
public function setType($type)
    {
        if (! in_array($type, self::$types, true)) {
            throw new InvalidArgumentException(sprintf(
                '"%s" is not a valid type! Valid types: %s',
                $type,
                implode(', ', self::$types)
            ));
        }

        $this->type = $type;

        return $this;
    }
1021374
public function setVerticalAlign($verticalAlign) {
        if (!in_array($verticalAlign, [static::TOP, static::CENTER, static::BOTTOM], true)) {
            throw new \InvalidArgumentException(
                '$verticalAlign argument must be one of: ImagesGroupConfig::TOP, ImagesGroupConfig::CENTER, ImagesGroupConfig::BOTTOM'
            );
        }
        $this->verticalAlign = $verticalAlign;
        return $this;
    }
1218751
public function setRelationship($relationship)
    {
        $allowedValues = $this->getRelationshipAllowableValues();
        if (!is_null($relationship) && !in_array($relationship, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'relationship', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['relationship'] = $relationship;

        return $this;
    }
14776
public function setStanding($standing)
    {

        if (($standing > 10)) {
            throw new \InvalidArgumentException('invalid value for $standing when calling GetCharactersCharacterIdStandings200Ok., must be smaller than or equal to 10.');
        }
        if (($standing < -10)) {
            throw new \InvalidArgumentException('invalid value for $standing when calling GetCharactersCharacterIdStandings200Ok., must be bigger than or equal to -10.');
        }

        $this->container['standing'] = $standing;

        return $this;
    }
127949
public function addColumn(Column $column)
    {
        if (array_key_exists((string)$column, $this->columns)) {
            throw new \InvalidArgumentException("Column with label '$column' already exists!");
        }
        $this->columns[(string)$column] = $column;

        return $this;
    }
548224
public function setType($type)
    {
        if (is_string($type)) {
            $type = ColumnType::createType($type);
        } elseif (!$type instanceof AbstractType) {
            throw new Exception\InvalidArgumentException(__METHOD__ . ' setType() accepts only AbstractType or string.');
        }
        $this->properties['type'] = $type;

        return $this;
    }
33942
protected function setStyle($style)
    {
        if (is_string($style) === false) {
            throw new \InvalidArgumentException(
                'The style label must be a string.'
            );
        }
        if (!in_array($style, $this->STYLES)) {
            throw new \InvalidArgumentException(
                'Invalid style.'
            );
        }

        $this->style = $style;

        return $this;
    }
623252
protected function _formAlignment($options)
    {
        if (!$options['align']) {
            $options['align'] = $this->_detectFormAlignment($options);
        }

        if (is_array($options['align'])) {
            $this->_grid = $options['align'];
            $options['align'] = 'horizontal';
        } elseif ($options['align'] === 'horizontal') {
            $this->_grid = $this->getConfig('grid');
        }

        if (!in_array($options['align'], ['default', 'horizontal', 'inline'])) {
            throw new InvalidArgumentException('Invalid `align` option value.');
        }

        $this->_align = $options['align'];

        unset($options['align']);

        $templates = $this->_config['templateSet'][$this->_align];
        if (is_string($options['templates'])) {
            $options['templates'] = (new PhpConfig())->read($options['templates']);
        }

        if ($this->_align === 'default') {
            $options['templates'] += $templates;

            return $options;
        }

        $options = $this->injectClasses('form-' . $this->_align, $options);

        if ($this->_align === 'inline') {
            $options['templates'] += $templates;

            return $options;
        }

        $offsetedGridClass = implode(' ', [$this->_gridClass('left', true), $this->_gridClass('middle')]);

        $templates['label'] = sprintf($templates['label'], $this->_gridClass('left'));
        $templates['formGroup'] = sprintf($templates['formGroup'], $this->_gridClass('middle'));
        foreach (['checkboxFormGroup', 'submitContainer'] as $value) {
            $templates[$value] = sprintf($templates[$value], $offsetedGridClass);
        }

        $options['templates'] += $templates;

        return $options;
    }
783873
public function offsetGet($offset)
    {
        if (!$this->offsetExists($offset)) {
            throw new \InvalidArgumentException(sprintf(
                'Column "%s" does not exist, valid columns: "%s"',
                $offset, implode('", "', array_keys($this->getArrayCopy()))
            ));
        }

        return parent::offsetGet($offset);
    }
830477
public function align(Align $align): self
    {
        $this->expand();
        $this->align = $align;

        return $this;
    }
4390
public function setOrientation($orientation)
    {
        if (in_array($orientation, Orientation::asArray(), true) === true) {
            $this->orientation = $orientation;
        } else {
            $msg = "The 'orientation' argument must be a value from the Orientation enumeration.";
            throw new InvalidArgumentException($msg);
        }
    }
1292980
public function setSortColumns(array $columns)
    {
        $this->sortColumns = [];
        $this->mappingSortColumns = [];

        foreach ($columns as $i => $column) {
            if (!isset($column['name'])) {
                throw new InvalidArgumentException('The "name" property of sort column must be present ("sort" property is optional)');
            }

            if (isset($column['sort']) && 'asc' !== $column['sort'] && 'desc' !== $column['sort']) {
                throw new InvalidArgumentException('The "sort" property of sort column must have "asc" or "desc" value');
            }

            if ($this->isSorted($column['name'])) {
                throw new InvalidArgumentException(sprintf('The "%s" column is already sorted', $column['name']));
            }

            $this->sortColumns[] = $column;
            $this->mappingSortColumns[$column['name']] = $i;
        }

        return $this;
    }
691625
public static function align(string $align) : string {
		if (empty($align)) $align = 'left';
		if (I18n::rtl()) {
			if ($align == 'left') {
				$align = 'right';
			} else if ($align == 'right') {
				$align = 'left';
			}
		}
		return $align;
	}