0.1.0-SNAPSHOT permalink Arrow_down_16x16



  • (general-button cl {caption :caption, action :action, name :name, :as opts})

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 clj_swing/button.clj:12 top

(defmacro general-button [cl {caption :caption action :action name :name :as opts}]
  (let [b (or name (gensym "btn"))]
    `(let [~b  (new ~cl)]
       (doto ~b
	 ~@(if caption  
	     [`(.setText ~caption)])
	 ~@(if action  
	     [`(add-action-listener ~action)])
	 ~@(icon-setters *button-icon-keys*  opts)
	 ~@(auto-setters JButton *button-known-keys* opts)))))
Vars in clj-swing.button/general-button: defmacro let apply concat doto list seq vector
Used in 0 other vars

Comments top

No comments for general-button. Log in to add a comment.