swingx
  1. swingx
  2. SWINGX-1407

API for removing all columns in a column model

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.6.3
    • Component/s: Table
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      44

      Description

      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.

        Activity

        Hide
        kleopatra added a comment - - edited

        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) 
               model.removeColumn(column);
        }
        
        

        Please feel free to re-open if you disagree

        Cheers
        Jeanette

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

        { code }

        (without space) before and after the code

        Show
        kleopatra added a comment - - edited 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) model.removeColumn(column); } Please feel free to re-open if you disagree Cheers Jeanette darn ... how to format code here? It's the wavy brackets, like { code } (without space) before and after the code
        Hide
        kleopatra added a comment -

        added utility method to TableUtilities, as of revision #4062

        Show
        kleopatra added a comment - added utility method to TableUtilities, as of revision #4062

          People

          • Assignee:
            kleopatra
            Reporter:
            navinkjha
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: