diff options
author | scgilardi <scgilardi@gmail.com> | 2008-10-08 05:14:57 +0000 |
---|---|---|
committer | scgilardi <scgilardi@gmail.com> | 2008-10-08 05:14:57 +0000 |
commit | 591431e91a20c621c7e80cd4a40f4b7d2206a4c7 (patch) | |
tree | 1038ce3b32cbed5c9e538858358547e9afabd487 /src | |
parent | a8474065a444f5b1306674df607be62d17a62b72 (diff) |
miglayout.clj: a couple of type hints
Diffstat (limited to 'src')
-rw-r--r-- | src/clojure/contrib/miglayout/miglayout.clj | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/clojure/contrib/miglayout/miglayout.clj b/src/clojure/contrib/miglayout/miglayout.clj index 9baf40c0..a411e32a 100644 --- a/src/clojure/contrib/miglayout/miglayout.clj +++ b/src/clojure/contrib/miglayout/miglayout.clj @@ -20,7 +20,8 @@ ;; Created 5 October 2008 (ns clojure.contrib.miglayout - (:import (net.miginfocom.swing MigLayout))) + (:import (java.awt Container Component) + (net.miginfocom.swing MigLayout))) (defn miglayout "Adds java.awt.Components to a java.awt.Container with constraints @@ -48,7 +49,7 @@ - A vector specifies a single constraint with zero or more arguments - A map specifiess one or more constraints as keys, each mapped to a single argument" - [container & args] + [#^Container container & args] (let [[f & r :as a] args [constraints args] (if (map? f) [f r] [nil a]) the-str #((if (keyword? %) name str) %)] @@ -57,7 +58,7 @@ (str (:layout constraints)) (str (:column constraints)) (str (:row constraints)))) - (loop [component (first args) + (loop [#^Component component (first args) constraints nil [arg & args] (rest args)] (cond (string? arg) |