 
 ;;;  Table
 
-(defrecord table-control [widget control hooks model])
+(defrecord table-control [widget control hooks model row-permutator])
+;; row-permutator is a two-element vector of functions, where the first-row
+;; element transforms view-rows to index-rows and the second element is
+;; the inverse function transforming index-rows to view-rows.
 (derive ::table-control ::control)
 (derive ::table-control :conexp.contrib.gui.util.hookable/hookable)
 

         col-model (.getColumnModel control) ]
    (.moveColumn col-model old-view new-view)))

(defn- table-change-hook
  [otable column first-row last-row type]
  (if (and (= 0 type)

                                                ActionEvent/CTRL_MASK false),

        hooks           (:hooks (make-hookable)),
        widget          (table-control. pane table hooks model 
                          [identity identity]),
        change-listener (proxy [TableModelListener] []
                          (tableChanged [event]
                            (with-swing-threads*
