public void insertColumn(int beforeIndex, Column<T, ?> col, Header<?> header, Header<?> footer) {
        // Allow insert at the end.
        if (beforeIndex != getColumnCount()) {
            checkColumnBounds(beforeIndex);
        }

        headers.add(beforeIndex, header);
        footers.add(beforeIndex, footer);
        columns.add(beforeIndex, col);

        // Increment the keyboard selected column.
        if (beforeIndex <= keyboardSelectedColumn) {
            keyboardSelectedColumn = Math.min(keyboardSelectedColumn + 1, columns.size() - 1);
        }

        // Move the keyboard selected column if the current column is not
        // interactive.
        if (isColumnInteractive(col)
            && ((keyboardSelectedColumn >= columns.size()) || !isColumnInteractive(columns
                .get(keyboardSelectedColumn)))) {
            keyboardSelectedColumn = beforeIndex;
        }

        // Sink events used by the new column.
        Set<String> consumedEvents = new HashSet<String>();
        {
            Set<String> cellEvents = col.getCell().getConsumedEvents();
            if (cellEvents != null) {
                consumedEvents.addAll(cellEvents);
            }
        }
        if (header != null) {
            Set<String> headerEvents = header.getCell().getConsumedEvents();
            if (headerEvents != null) {
                consumedEvents.addAll(headerEvents);
            }
        }
        if (footer != null) {
            Set<String> footerEvents = footer.getCell().getConsumedEvents();
            if (footerEvents != null) {
                consumedEvents.addAll(footerEvents);
            }
        }
        CellBasedWidgetImpl.get().sinkEvents(this, consumedEvents);

        headersDirty = true;
        refreshColumnsAndRedraw();
    }
Inserts a column into the table at the specified index with an associated
header and footer.

@param beforeIndex the index to insert the column
@param col         the column to be added
@param header      the associated {@link Header}
@param footer      the associated footer (as a {@link Header} object)
@throws IndexOutOfBoundsException if the index is out of range
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractCellTable.java