set alignment of given column offset
 @param [Number] column offset, starting 0
 @param [Symbol] :left, :right
429814
def column_align colindex, lrc
      raise ArgumentError, "wrong alignment value sent" if ![:right, :left, :center].include? lrc
      @calign[colindex] = lrc
      get_column(colindex).align = lrc
      @repaint_required = true
      #@recalc_required = true
    end
225950
def align_after(self, offset):
        
        f = self.reader
        if offset <= 0:  # FIXME what is a negative offset??
            f.seek(0)
            self._block_count = 0
            self._read_header()  # FIXME we can't extimate how big it is...
            return
        sm = self.sync_marker
        sml = len(sm)
        pos = offset
        while pos < self.file_length - sml:
            f.seek(pos)
            data = f.read(self.FORWARD_WINDOW_SIZE)
            sync_offset = data.find(sm)
            if sync_offset > -1:
                f.seek(pos + sync_offset)
                self._block_count = 0
                return
            pos += len(data)
320805
function(
    /*number*/ combinedWidth,
    /*number*/ leftOffset,
    /*number*/ cellWidth,
    /*?number*/ cellMinWidth,
    /*?number*/ cellMaxWidth,
    /*number|string*/ columnKey,
    /*object*/ event) {
    if (Locale.isRTL()) {
      leftOffset = -leftOffset;
    }
    this.setState({
      isColumnResizing: true,
      columnResizingData: {
        left: leftOffset + combinedWidth - cellWidth,
        width: cellWidth,
        minWidth: cellMinWidth,
        maxWidth: cellMaxWidth,
        initialEvent: {
          clientX: event.clientX,
          clientY: event.clientY,
          preventDefault: emptyFunction
        },
        key: columnKey
      }
    });
  }
1052674
def align_left(text, width, fill: SPACE, separator: NEWLINE)
      return if width.nil?
      each_line(text, separator) do |line|
        width_diff = width - display_width(line)
        if width_diff > 0
          line + fill * width_diff
        else
          line
        end
      end
    end
593349
function leftAlign(lines) {
    if (lines.length == 0) return lines;
    var distance = lines[0].match(/^\s*/)[0].length;
    var result = [];
    lines.forEach(function(line){
        result.push(line.slice(Math.min(distance, line.match(/^\s*/)[0].length)));
    });
    return result;
}
283845
function setOffset(elem, offset) {
  // set position first, in-case top/left are set even on static elem
  if (css(elem, 'position') === 'static') {
    elem.style.position = 'relative';
  }

  var old = getOffset(elem);
  var ret = {};
  var current = undefined;
  var key = undefined;

  for (key in offset) {
    if (offset.hasOwnProperty(key)) {
      current = parseFloat(css(elem, key)) || 0;
      ret[key] = current + offset[key] - old[key];
    }
  }
  css(elem, ret);
}
808095
def set_column_stretch(self, column=0, stretch=10):
        
        self._layout.setColumnStretch(column, stretch)
        return self
70850
public void setVerticalAlignment(final VerticalAlignment align) {

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

        cloneStyle();
        cell.getCellStyle().setVerticalAlignment(align);
    }
844811
public function align($position, $offset_x = 0, $offset_y = 0)
    {
        switch (strtolower($position)) {

            case 'top':
            case 'top-center':
            case 'top-middle':
            case 'center-top':
            case 'middle-top':
                $x = intval($this->width / 2);
                $y = 0 + $offset_y;
                break;

            case 'top-right':
            case 'right-top':
                $x = $this->width - $offset_x;
                $y = 0 + $offset_y;
                break;

            case 'left':
            case 'left-center':
            case 'left-middle':
            case 'center-left':
            case 'middle-left':
                $x = 0 + $offset_x;
                $y = intval($this->height / 2);
                break;

            case 'right':
            case 'right-center':
            case 'right-middle':
            case 'center-right':
            case 'middle-right':
                $x = $this->width - $offset_x;
                $y = intval($this->height / 2);
                break;

            case 'bottom-left':
            case 'left-bottom':
                $x = 0 + $offset_x;
                $y = $this->height - $offset_y;
                break;

            case 'bottom':
            case 'bottom-center':
            case 'bottom-middle':
            case 'center-bottom':
            case 'middle-bottom':
                $x = intval($this->width / 2);
                $y = $this->height - $offset_y;
                break;

            case 'bottom-right':
            case 'right-bottom':
                $x = $this->width - $offset_x;
                $y = $this->height - $offset_y;
                break;

            case 'center':
            case 'middle':
            case 'center-center':
            case 'middle-middle':
                $x = intval($this->width / 2);
                $y = intval($this->height / 2);
                break;

            default:
            case 'top-left':
            case 'left-top':
                $x = 0 + $offset_x;
                $y = 0 + $offset_y;
                break;
        }

        $this->pivot->setPosition($x, $y);

        return $this;
    }
274129
public void adjustBeginLineColumn (final int nNewLine, final int newCol)
  {
    int start = m_nTokenBegin;
    int newLine = nNewLine;
    int len;

    if (m_nBufpos >= m_nTokenBegin)
    {
      len = m_nBufpos - m_nTokenBegin + m_nInBuf + 1;
    }
    else
    {
      len = m_nBufsize - m_nTokenBegin + m_nBufpos + 1 + m_nInBuf;
    }

    int nIdx = 0;
    int j = 0;
    int nextColDiff = 0;
    int columnDiff = 0;

    while (true)
    {
      if (nIdx >= len)
        break;
      j = start % m_nBufsize;
      ++start;
      final int k = start % m_nBufsize;
      if (m_aBufLine[j] != m_aBufLine[k])
        break;

      m_aBufLine[j] = newLine;
      nextColDiff = columnDiff + m_aBufColumn[k] - m_aBufColumn[j];
      m_aBufColumn[j] = newCol + columnDiff;
      columnDiff = nextColDiff;
      nIdx++;
    }

    if (nIdx < len)
    {
      m_aBufLine[j] = newLine++;
      m_aBufColumn[j] = newCol + columnDiff;

      while (nIdx++ < len)
      {
        j = start % m_nBufsize;
        ++start;
        final int k = start % m_nBufsize;
        if (m_aBufLine[j] != m_aBufLine[k])
          m_aBufLine[j] = newLine++;
        else
          m_aBufLine[j] = newLine;
      }
    }

    m_nLine = m_aBufLine[j];
    m_nColumn = m_aBufColumn[j];
  }
1237981
public void setSimpleColumn(float llx, float lly, float urx, float ury) {
        leftX = Math.min(llx, urx);
        maxY = Math.max(lly, ury);
        minY = Math.min(lly, ury);
        rightX = Math.max(llx, urx);
        yLine = maxY;
        rectangularWidth = rightX - leftX;
        if (rectangularWidth < 0)
            rectangularWidth = 0;
        rectangularMode = true;
    }
422251
def next_column
      # TODO take care of multipliers
      _calculate_column_offsets unless @coffsets
      c = @column_pointer.next
      cp = @coffsets[c]
      #$log.debug " next_column #{c} , #{cp} "
      @curpos = cp if cp
      down() if c < @column_pointer.last_index
      fire_column_event :ENTER_COLUMN
    end
967380
def setColumns( self, columns ):
        
        self.setColumnCount(len(columns))
        self.setHorizontalHeaderLabels(columns)
830233
function alignment(value, index) {
  var start = value.lastIndexOf(lineFeed, index)
  var end = value.indexOf(lineFeed, index)
  var char

  end = end === -1 ? value.length : end

  while (++start < end) {
    char = value.charAt(start)

    if (
      char !== colon &&
      char !== dash &&
      char !== space &&
      char !== verticalBar
    ) {
      return false
    }
  }

  return true
}
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;
    }
1355298
public function setDefaultColumnAlignment($alignment)
    {
        Assert::oneOf($alignment, Alignment::all(), 'The default column alignment must be one of the Alignment constants. Got: %s');

        $this->defaultColumnAlignment = $alignment;

        return $this;
    }
961543
public function setAlign($align)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setAlign($align);
        }
    }