Sets the alignment for the columns.

@param integer $col_id The column number.
@param integer $align Alignment to set for this column. One of
self::CONSOLE_TABLE_ALIGN_LEFT
self::CONSOLE_TABLE_ALIGN_CENTER
self::CONSOLE_TABLE_ALIGN_RIGHT.

@return void
965536
function setAlign($col_id, $align = self::CONSOLE_TABLE_ALIGN_LEFT) {
        switch ($align) {
            case self::CONSOLE_TABLE_ALIGN_CENTER:
                $pad = STR_PAD_BOTH;
                break;
            case self::CONSOLE_TABLE_ALIGN_RIGHT:
                $pad = STR_PAD_LEFT;
                break;
            default:
                $pad = STR_PAD_RIGHT;
                break;
        }
        $this->_col_align[$col_id] = $pad;
    }
310899
public function findIdColumn($id, $column) {
		if (!empty($column)) $this->driver->field($column);
		$tableAlias = $this->driver->alias?$this->driver->alias.'.':'';
		return $this->driver->where($tableAlias.$this->id.'=?', [$id])
            ->fetchColumn();
	}
680055
public function setColumns($columns)
    {
        $columns = is_array($columns) ? $columns : func_get_args();

        if (count($columns) > 0) {
            $this->columns = implode(', ', $columns);
        }
    }
766580
function setColumnAlign(change: Change, align: string): Change {
    const pos = tablePlugin.utils.getPosition(change.value);
    const columnCells = tablePlugin.utils.getCellsAtColumn(
        pos.table,
        pos.getColumnIndex()
    );
    columnCells.forEach(cell => {
        change.setNodeByKey(cell.key, { data: { align } });
    });
    return change;
}
1041256
public void setAlignment(int alignment) {
        super.setAlignment(alignment);
        for(int i = 0; i < this.content.length; i++) {
            if(this.content[i] instanceof Paragraph) {
                ((Paragraph) this.content[i]).setAlignment(alignment);
            } else if(this.content[i] instanceof Table) {
                ((Table) this.content[i]).setAlignment(alignment);
            } else if(this.content[i] instanceof Image) {
                ((Image) this.content[i]).setAlignment(alignment);
            }     
        }
    }
340582
def set_cols_align(self, array):
        

        self._check_row_size(array)
        self._align = array
        return self
78804
public function findOrFail($id, $columns = ['*'])
    {
        if (Uuid::validate($id)) {
            return $this->findOrFailByUuid($id, $columns);
        } else {
            return parent::findOrFail($id, $columns);
        }
    }
181367
public function setColumn($col, $values)
    {
        if (!\is_array($values)) {
            \trigger_error("Values must be an array.", E_USER_ERROR);
            return false;
        }
        if (\is_numeric($col)) {
            \trigger_error("Column must be a letter, eg column D.", E_USER_ERROR);
            return false;
        }

        //todo check array
        $i = 0;
        foreach ($values as $value) {
            $this->setCell($col . ($i + 1), $value);
            $i++;
        }

        return true;
    }
624346
public void align(final long alignByteNumber) throws IOException {
    if (this.bitBufferCount > 0) {
      this.writeBits(0, JBBPBitNumber.decode(8 - this.bitBufferCount));
    }

    if (alignByteNumber > 0) {
      long padding = (alignByteNumber - (this.byteCounter % alignByteNumber)) % alignByteNumber;
      while (padding > 0) {
        this.out.write(0);
        this.byteCounter++;
        padding--;
      }
    }
  }
85713
function adjustColumnIndex( $columnIndex, $newColumnIndex )
    {
        $matrix = $this->attribute( 'matrix' );
        $columnDefinition = $matrix['columns']['sequential'][$columnIndex];
        if ( $columnDefinition['index'] != $newColumnIndex )
        {
            $this->setColumnIndex( $columnIndex, $newColumnIndex );
            return true;
        }
        return false;
    }
905449
def set_header_align(self, array):
        

        self._check_row_size(array)
        self._header_align = array
        return self
321035
public function setColumns(array $columns)
    {
        $useColumns = [];

        foreach ($columns as $col) {
            $col = $this->createColumn($col);
            $useColumns[$col->getUniqueId()] = $col;
        }

        $this->columns = $useColumns;
    }
6720
public function setColumnsAdapter($columnIds,  tao_helpers_grid_Cell_Adapter $adapter)
    {
        $returnValue = (bool) false;

        
		if(is_string($columnIds)){
			$columnIds = array($columnIds);
		}
		if(is_array($columnIds)){
			foreach($columnIds as $colId){
				if (!isset($this->columns[$colId]) || !$this->columns[$colId] instanceof tao_helpers_grid_Column) {
					throw new common_Exception('cannot set the column\'s adapter : the column with the id ' . $colId . ' does not exist');
				} else {
					$returnValue = $this->columns[$colId]->setAdapter($adapter);
				}
			}
		}
        

        return (bool) $returnValue;
    }
361760
protected function createColumn(string $key, array $columnConfiguration): void
    {
        $this->columns[] = new Column($key, $this, $columnConfiguration);
    }
373146
def add_alignment(self,align):
    """"""
    self._target_context_errors = None
    self._query_context_errors = None
    ae = AlignmentErrors(align)
    self._alignment_errors.append(ae)
    self._general_errors.add_alignment_errors(ae)
1005606
public void setAlign(String align) throws ApplicationException {
	align = StringUtil.toLowerCase(align);
	if (align.equals("left")) this.align = Table.ALIGN_LEFT;
	else if (align.equals("center")) this.align = Table.ALIGN_CENTER;
	else if (align.equals("right")) this.align = Table.ALIGN_RIGHT;
	else throw new ApplicationException("value [" + align + "] of attribute align from tag col is invalid", "valid values are [left, center, right]");
    }
901846
function adjustColumnName( $columnIndex, $newColumnName )
    {
        $matrix = $this->attribute( 'matrix' );
        $columnDefinition = $matrix['columns']['sequential'][$columnIndex];
        if ( $columnDefinition['name'] != $newColumnName )
        {
            $this->setColumnName( $columnIndex, $newColumnName );
            return true;
        }
        return false;
    }