/** * Remove a column. * * @param index the column index */ public void removeColumn(int index) { if (index < 0 || index >= columns.size()) { throw new IndexOutOfBoundsException("The specified column index is out of bounds."); } columns.remove(index); headers.remove(index); footers.remove(index); // Decrement the keyboard selected column. if (index <= keyboardSelectedColumn && keyboardSelectedColumn > 0) { keyboardSelectedColumn--; } // Redraw the table asynchronously. headersDirty = true; refreshColumnsAndRedraw(); // We don't unsink events because other handlers or user code may have sunk // them intentionally. }
/** * Remove a column. * * @param index the column index */ public void removeColumn(int index) { if (index < 0 || index >= columns.size()) { throw new IndexOutOfBoundsException("The specified column index is out of bounds."); } columns.remove(index); headers.remove(index); footers.remove(index); // Decrement the keyboard selected column. if (index <= keyboardSelectedColumn && keyboardSelectedColumn > 0) { keyboardSelectedColumn--; } // Redraw the table asynchronously. headersDirty = true; refreshColumnsAndRedraw(); // We don't unsink events because other handlers or user code may have sunk // them intentionally. }
/** * Remove a column. * * @param index the column index */ public void removeColumn(int index) { if (index < 0 || index >= columns.size()) { throw new IndexOutOfBoundsException("The specified column index is out of bounds."); } columns.remove(index); headers.remove(index); footers.remove(index); // Decrement the keyboard selected column. if (index <= keyboardSelectedColumn && keyboardSelectedColumn > 0) { keyboardSelectedColumn--; } // Redraw the table asynchronously. headersDirty = true; refreshColumnsAndRedraw(); // We don't unsink events because other handlers or user code may have sunk // them intentionally. }