0.1.0-SNAPSHOT Arrow_down_16x16
  • (jlist & {action :action, on-selection-change :on-selection-change, items :items, scrolling :scrolling, :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/list.clj:50 top

(defmacro jlist [& {action :action on-selection-change :on-selection-change items :items scrolling :scrolling :as opts}]
  (let [l (gensym "jlist")]
  `(let [~l (doto (JList.)
	      ~@(if action  
		  [`(add-action-listener ~action)])
	      ~@(if on-selection-change  
		  [`(add-list-selection-listener ~on-selection-change)])    
	      ~@(auto-setters JList *list-known-keys* opts)
	      ~@(map #(list '.addItem %) items))]
     ~@(if scrolling 
	`[(scroll-panel ~l)]
Vars in clj-swing.list/jlist: defmacro let list map apply concat doto seq vector
Used in 0 other vars

Comments top

No comments for jlist. Log in to add a comment.