1.2.0 permalink Arrow_down_16x16
  • (add-components container components)
Adds components with constraints to a container

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/miglayout/internal.clj:94 top

(defn add-components
  "Adds components with constraints to a container"
  [^JComponent container components]
  (loop [[[^Component component constraint] & components] components
         id-map nil]
    (if component
      (let [cc (parse-component-constraint constraint)]
        (.add container component cc)
        (recur
         components
         (if-let [id (.getId cc)]
           (assoc id-map (keyword id) component)
           id-map)))
      (doto container (.putClientProperty ::components id-map)))))
Vars in clojure.contrib.miglayout.internal/add-components: assoc defn doto if-let keyword let loop
Used in 0 other vars

Comments top

No comments for add-components. Log in to add a comment.