   "Install zoom-move-toggler."
   [frame scn buttons]
   (let [zoom-factors (fn []
-		       (let [[zoom-x zoom-y] (get-zoom-factors scn)]
-			 (with-out-str
-			   (printf "%1.2f" zoom-x)
-			   (print " x ")
-			   (printf "%1.2f" zoom-y)))),
-	^JButton zoom-move (make-button buttons "Move"),
-	^JLabel  zoom-info (make-label buttons " -- ")]
+                       (let [[zoom-x zoom-y] (get-zoom-factors scn)]
+                         (with-out-str
+                           (printf "%1.2f" zoom-x)
+                           (print " x ")
+                           (printf "%1.2f" zoom-y)))),
+        ^JButton zoom-move (make-button buttons "Move"),
+        ^JLabel  zoom-info (make-label buttons " -- ")]
     (add-action-listener zoom-move
-			 (fn [evt]
-			   (do-swing
-			    (if (= "Move" (.getText zoom-move))
-			      (do
-				(start-interaction scn zoom-interaction)
-				(.setText zoom-move "Zoom"))
-			      (do
-				(start-interaction scn move-interaction)
-				(.setText zoom-move "Move"))))))
+                         (fn [evt]
+                           (do-swing
+                            (if (= "Move" (.getText zoom-move))
+                              (do
+                                (start-interaction scn zoom-interaction)
+                                (.setText zoom-move "Zoom"))
+                              (do
+                                (start-interaction scn move-interaction)
+                                (.setText zoom-move "Move"))))))
     (add-callback-for-hook scn :image-changed
-			   (fn []
-			     (do-swing
-			      (.setText zoom-info (zoom-factors))))))
+                           (fn []
+                             (do-swing
+                              (.setText zoom-info (zoom-factors))))))
   nil)
 
 ;; export images to files

  "Improves layout on scene with force layout."
  [scn iterations r a g]
  (binding [*repulsive-amount* r,
	    *attractive-amount* a,
	    *gravitative-amount* g]
    (update-layout-of-scene scn
			    (if (<= iterations 0)
			      (force-layout (get-layout-from-scene scn))
			      (force-layout (get-layout-from-scene scn) iterations)))))

(defn- improve-layout-by-force
  "Improves layout on screen by force layout."
  [frame scn buttons]
  (let [^JTextField rep-field    (make-labeled-text-field buttons "rep"  (str *repulsive-amount*)),
	^JTextField attr-field   (make-labeled-text-field buttons "attr" (str *attractive-amount*)),
	^JTextField grav-field   (make-labeled-text-field buttons "grav" (str *gravitative-amount*)),
	^JTextField iter-field   (make-labeled-text-field buttons "iter" (str "300")),
	_                        (make-padding buttons),
	^JButton button          (make-button buttons "Force"),

	get-force-parameters     (fn []
                                   (let [r (Double/parseDouble (.getText rep-field)),
                                         a (Double/parseDouble (.getText attr-field)),
                                         g (Double/parseDouble (.getText grav-field)),
                                         i (Integer/parseInt (.getText iter-field))]
                                     [r a g i]))]
    (add-action-listener button (fn [evt]
				  (do-swing
				   (with-swing-error-msg frame "An Error occured."
				     (let [[r a g i] (get-force-parameters)]
				       (improve-with-force scn i r a g))))))))

;; zoom-move


        [conexp.contrib.gui.util
         :only (with-swing-error-msg)]
        ;; drawing
        [conexp.contrib.draw.scenes
         :only (add-callback-for-hook,
                call-hook-with,
                redraw-scene,
