   "Returns file extension of given file."
   [^File file]
   (let [name (.getName file),
-	idx  (.lastIndexOf name ".")]
+        idx  (.lastIndexOf name ".")]
     (if-not (= -1 idx)
       (.toLowerCase (.substring name (+ 1 idx)))
       nil)))

  "Combined ideal and filter move mode."
  []
  (let [ideal (ideal-move-mode),
	filter (filter-move-mode)]
    (fn [node dx dy]
      (ideal node dx dy)
      (filter node dx dy))))

  saves the image."
  [frame scn buttons]
  (let [saved-layouts (atom {}),
        ^JComboBox combo (make-combo-box buttons @saved-layouts),
        save-layout   (fn [_]
                        (do-swing
                         (let [layout (get-layout-from-scene scn),
                               key    (now)]
                           (swap! saved-layouts conj [key, layout])
                           (.addItem combo key))))]
    (add-callback-for-hook scn :move-stop save-layout)
    (add-action-listener combo
                         (fn [^ActionEvent evt]
                           (do-swing
                            (let [selected (.. evt getSource getSelectedItem),
                                  layout (@saved-layouts selected)]
                              (update-layout-of-scene scn layout)))))
    (save-layout nil)))


