 			       (layout-fn (lattice (get-layout-from-scene scn)))))))))
 
   ;; move mode (ideal, filter, chain, single)
-  (let [move-modes {"single" single-move,
-		    "ideal"  ideal-move,
-		    "filter" filter-move,
-		    "chain"  chain-move,
-		    "inf"    infimum-additive-move,
-		    "sup"    supremum-additive-move}
+  (let [move-modes {"single" (single-move-mode),
+		    "ideal"  (ideal-move-mode),
+		    "filter" (filter-move-mode),
+		    "chain"  (chain-move-mode),
+		    "inf"    (infimum-additive-move-mode),
+		    "sup"    (supremum-additive-move-mode)}
 	#^JComboBox combo-box (make-combo-box buttons (keys move-modes)),
-	current-move-mode (atom single-move)]
+	current-move-mode (atom (move-modes "single"))]
     (add-callback-for-hook scn :move-drag
 			   (fn [node dx dy]
 			     (@current-move-mode node dx dy)))

			     (reset! current-move-mode move-mode)))))
  nil)

(defn- single-move
  "Moves the single node only."
  [node dx dy]
  nil)

(defn- neighbor-move-mode
  "Moves nodes neighbored to node by [dx dy]."
  [neighbors node dx dy]
  (do-swing
   (doseq [n (neighbors node)]
     (move-node-by n dx dy))))

(def all-nodes-above* (memoize all-nodes-above))

(defn- ideal-move
  "Moves all nodes below the current node."
  [node dx dy]
  (neighbor-move-mode all-nodes-above* node dx dy))

(def all-nodes-below* (memoize all-nodes-below))

(defn- filter-move
  "Moves all nodes above the current node."
  [node dx dy]
  (neighbor-move-mode all-nodes-below* node dx dy))

(defn- chain-move
  "Combined ideal and filter move mode."
  [node dx dy]
  (ideal-move node dx dy)
  (filter-move node dx dy))

(defn- additive-move
  "Abstract move mode for moving nodes according to additive
  influence."
  [influenced-nodes dx dy]
  (do-swing
   (doseq [[n weight] influenced-nodes]
     (with-doubles [dx dy weight]
       (move-node-by n (* dx weight) (* dy weight))))))

(def all-inf-add-influenced-nodes* all-inf-add-influenced-nodes)

(defn- infimum-additive-move
  "Moves all nodes infimum-additively with node."
  [node dx dy]
  (additive-move (all-inf-add-influenced-nodes* node) dx dy))

(def all-sup-add-influenced-nodes* all-sup-add-influenced-nodes)

(defn- supremum-additive-move
  "Moves all nodes supremum-additively with node."
  [node dx dy]
  (additive-move (all-sup-add-influenced-nodes* node) dx dy))


;; improve with force layout


;; editor features

(declare single-move-mode, ideal-move-mode, filter-move-mode, chain-move-mode,
	 infimum-additive-move-mode, supremum-additive-move-mode)

(defn- change-parameters
  "Installs parameter list which influences lattice drawing."
