[SWINGX-1407]  API for removing all columns in a column model Created: 13/Jun/07  Updated: 16/Aug/11  Resolved: 16/Aug/11

Status: Resolved
Project: swingx
Component/s: Table
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Improvement Priority: Major
Reporter: navinkjha Assignee: kleopatra
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: Not Specified
Original Estimate: 0 minutes

Operating System: All
Platform: All

Issuezilla Id: 44


DefaultTableColumnModelExt has a removeColumn method. It would be very nice to
have a method to remove all the columns from the column model. This is very
useful when there are a large number of columns and user reorders columns.
Instead of moving columns around it would be a lot easier to simply remove all
columns and add them according to the preferred order.

Comment by kleopatra [ 16/Aug/11 ]

hmm ... this is ooold

Tend to close as wontfix:

  • removeColumn is api of the base TableColumnModel
  • there's is not much an extended interface can do to support bulk removal (notification responsibilities require one-by-one removal anyway)
  • a simple utility method can do a one-by-one removal, like
public static void removeAll(TableColumnModelExt model) {
   List<TableColumn> columns = model.getColumns(true);
   for(TableColumn column: columns) 

Please feel free to re-open if you disagree


darn ... how to format code here? It's the wavy brackets, like

{ code }

(without space) before and after the code

Comment by kleopatra [ 16/Aug/11 ]

added utility method to TableUtilities, as of revision #4062

Generated at Fri Aug 28 09:05:09 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.