 (defn get-icon [name]
   (SwingResourceManager/getIcon
     org.micromanager.MMStudioMainFrame (str "icons/" name)))
-
-(defn set-model [table m]
-  (.setModel table m)
-  (.setRowSorter table (TableRowSorter. m)))
 
 (defn set-filter [table text]
   (let [sorter (.getRowSorter table)

        (removeUpdate [_ _] (f))))))

(defn get-model-column-index [table text]
  (let [table-model (.getModel table)]
    (-> (vec
      (for [i (range (.getColumnCount table-model))]
        (.getColumnName table-model i)))
      (.indexOf text))))

(defn open-selected-files [table]
  (let [path-column (get-model-column-index table "Path")]

  (reify ImageStorageListener
    (imageStorageFinished [_ path]
      (add-summary-maps @browser
                        (list (get-summary-map path "")) tags))))
      
(defn refresh-collection []
  (let [n (.indexOf tags "Location")
        locations (distinct (map #(get % n) @current-data))]
    ; blah blah
  ))

;; windows

(defn create-settings-window []
