/*
Positions the reorder marker on the column (given by the position information).
@see findColumnForPosition
338595
function(oTable, oPos, bShow) {
			if (!oPos || !oTable._$ReorderIndicator) {
				return;
			}

			var iLeft = oPos.left - oTable.getDomRef().getBoundingClientRect().left;
			if (oTable._bRtlMode && oPos.before || !oTable._bRtlMode && oPos.after) {
				iLeft = iLeft + oPos.width;
			}

			jQuery(oTable._$ReorderIndicator).css({
				"left": iLeft + "px"
			}).toggleClass("sapUiTableColReorderIndicatorActive", bShow);
		}
321985
function ()
	{
		var i, iLen;

		for ( i=0, iLen=this.s.dt.aoDrawCallback.length ; i<iLen ; i++ )
		{
			if ( this.s.dt.aoDrawCallback[i].sName === 'ColReorder_Pre' )
			{
				this.s.dt.aoDrawCallback.splice( i, 1 );
				break;
			}
		}

		$(this.s.dt.nTHead).find( '*' ).off( '.ColReorder' );

		$.each( this.s.dt.aoColumns, function (i, column) {
			$(column.nTh).removeAttr('data-column-index');
		} );

		this.s.dt._colReorder = null;
		this.s = null;
	}
1370027
private void showColumn(TableColumn column) {
		// Ignore changes to the TableColumnModel made by the TableColumnManager

		columnModel.removeColumnModelListener(this);

		// Add the column to the end of the table

		columnModel.addColumn(column);

		// Move the column to its position before it was hidden.
		// (Multiple columns may be hidden so we need to find the first
		// visible column before this column so the column can be moved
		// to the appropriate position)

		int position = allColumns.indexOf(column);
		int from = columnModel.getColumnCount() - 1;
		int to = 0;

		for (int i = position - 1; i > -1; i--) {
			try {
				TableColumn visibleColumn = allColumns.get(i);
				to = columnModel.getColumnIndex(visibleColumn.getHeaderValue()) + 1;
				break;
			} catch (IllegalArgumentException e) {
			}
		}

		columnModel.moveColumn(from, to);

		columnModel.addColumnModelListener(this);
	}
292903
public void reorderValue(final InputColumn<?>[] sortedValue) {
        // the offset represents the search textfield and the button panel
        final int offset = 2;

        // reorder the visual components
        for (int i = 0; i < sortedValue.length; i++) {
            final InputColumn<?> inputColumn = sortedValue[i];
            final JComponent decoration = getOrCreateCheckBoxDecoration(inputColumn, true);
            final int position = offset + i;
            add(decoration, position);
        }
        updateUI();

        // recreate the _checkBoxes map
        final TreeMap<InputColumn<?>, DCCheckBox<InputColumn<?>>> checkBoxesCopy = new TreeMap<>(_checkBoxes);
        _checkBoxes.clear();
        for (final InputColumn<?> inputColumn : sortedValue) {
            final DCCheckBox<InputColumn<?>> checkBox = checkBoxesCopy.get(inputColumn);
            _checkBoxes.put(inputColumn, checkBox);
        }
        _checkBoxes.putAll(checkBoxesCopy);
        setValue(sortedValue);
    }
748965
private void rotateTwiceOrdered() {
		Point2D_F64 a = ordered[0];
		Point2D_F64 b = ordered[1];
		Point2D_F64 c = ordered[2];
		Point2D_F64 d = ordered[3];

		ordered[0] = c;
		ordered[1] = d;
		ordered[2] = a;
		ordered[3] = b;
	}
677505
function ()
	{
		var aoColumns = this.s.dt.aoColumns;

		this.s.aoTargets.splice( 0, this.s.aoTargets.length );

		this.s.aoTargets.push( {
			"x":  $(this.s.dt.nTable).offset().left,
			"to": 0
		} );

		var iToPoint = 0;
		for ( var i=0, iLen=aoColumns.length ; i<iLen ; i++ )
		{
			/* For the column / header in question, we want it's position to remain the same if the
			 * position is just to it's immediate left or right, so we only incremement the counter for
			 * other columns
			 */
			if ( i != this.s.mouse.fromIndex )
			{
				iToPoint++;
			}

			if ( aoColumns[i].bVisible )
			{
				this.s.aoTargets.push( {
					"x":  $(aoColumns[i].nTh).offset().left + $(aoColumns[i].nTh).outerWidth(),
					"to": iToPoint
				} );
			}
		}

		/* Disallow columns for being reordered by drag and drop, counting right to left */
		if ( this.s.fixedRight !== 0 )
		{
			this.s.aoTargets.splice( this.s.aoTargets.length - this.s.fixedRight );
		}

		/* Disallow columns for being reordered by drag and drop, counting left to right */
		if ( this.s.fixed !== 0 )
		{
			this.s.aoTargets.splice( 0, this.s.fixed );
		}
	}
791062
@Override
    public void findNext(String str) {
        int startLine = getLine();
        int startColumn = getColumn();
        highLight(str);
        delegate.findNext(str);
        int targetLine = getLine();
        int targetColumn = getColumn();
        //Rest the actual pointer
        delegate.move(startLine, startColumn);
        int verticalOffset = targetLine - getLine();
        moveVertical(verticalOffset);
        int horizontalOffset = targetColumn - getColumn();
        moveHorizontally(horizontalOffset);
        redrawText();

    }
458505
private static Sort first(String columnName, Sort.Order order) {
        return Sort.on(columnName, order);
    }
1071652
private void placeCell(ArrayList<Row> someRows, Cell aCell, Point aPosition) {
        int i;
        Row row = null;
        int rowCount = aPosition.x + aCell.getRowspan() - someRows.size();
        assumeTableDefaults(aCell);
        if ( (aPosition.x + aCell.getRowspan()) > someRows.size() ) {
            for (i = 0; i < rowCount; i++) {
                row = new Row(columns);
                someRows.add(row);
            }
        }
        
        // reserve cell in rows below
        for (i = aPosition.x + 1; i < (aPosition.x  + aCell.getRowspan()); i++) {
            if ( !someRows.get(i).reserve(aPosition.y, aCell.getColspan())) {
                
                // should be impossible to come here :-)
                throw new RuntimeException("addCell - error in reserve");
            }
        }
        row = someRows.get(aPosition.x);
        row.addElement(aCell, aPosition.y);
        
    }
981683
function position() {

    $table = Table_Frame_Decorator::find_parent_table($this->_frame);
    $cellmap = $table->get_cellmap();
    $this->_frame->set_position($cellmap->get_frame_position($this->_frame));

  }
1025336
function position() {
    var start = { line: lineno, column: column };
    if (!options.position) return positionNoop;

    return function(node){
      node.position = {
        start: start,
        end: { line: lineno, column: column },
        source: options.source
      };

      whitespace();
      return node;
    }
  }
32475
private void moveRowsBasedOnPriority() {
        for (RowNumber myNumber : overs.keySet()) {
            Over over = overs.get(myNumber);

            int newIndex = rowOrder.indexOf(new RowNumber(over.getOver()));

            rowOrder.remove(myNumber);
            rowOrder.add(newIndex,
                         myNumber);
        }
    }
605937
private void updateValue(Point location) {
        CellPosition oldValue = value;
        if (location == null) {
            value = null;
        } else {
            int row = table.rowAtPoint(location);
            int column = table.columnAtPoint(location);
            value = new CellPosition(row, column);
        }
        maybeNotifyListeners(oldValue, value);
    }
355304
def reorder(self, single_column=False):
        """"""
        if single_column:
            columns = self.sortOrder[:1]
        else:
            columns = self.sortOrder
        for ascending,column in columns[::-1]:
            # Python 2.2+ guarantees stable sort, so sort by each column in reverse 
            # order will order by the assigned columns 
            self.sorted.sort( key=column.get, reverse=(not ascending))
912512
function assign_x_positions() {
    // Pre-condition: widths must be resolved and assigned to columns and
    // column[0]["x"] must be set.

    if ( $this->_columns_locked ) {
      return;
    }
    
    $x = $this->_columns[0]["x"];
    foreach ( array_keys($this->_columns) as $j ) {
      $this->_columns[$j]["x"] = $x;
      $x += $this->_columns[$j]["used-width"];

    }

  }
164880
private void positionX(int secondX) {

        if (secondX < m_firstX) {
            setSelectPositionX(secondX, m_firstX - secondX);
        } else {
            setSelectWidth(secondX - m_firstX);
        }
    }
1288745
def reposition_parts!
      reload.parts.each_with_index do |part, index|
        part.update_columns position: index
      end
    end