• (add-menu-item parent item)
Adds a menu item to the parent according to the item description.
The item description is a map of the following structure.

Either:
- one single :action specifying a javax.swing.Action to be associated
with the item.
- a specification suitable for make-action
- a set of :name, :mnemonic and :items keys, specifying a submenu with
the given sequence of item entries.
- an empty map specifying a separator.

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/swing_utils.clj:101 top

(defmulti add-menu-item
  "Adds a menu item to the parent according to the item description.
   The item description is a map of the following structure.

 Either:
   - one single :action specifying a javax.swing.Action to be associated
     with the item.
   - a specification suitable for make-action
   - a set of :name, :mnemonic and :items keys, specifying a submenu with
     the given sequence of item entries.
   - an empty map specifying a separator."
  {:arglists '([parent item])}
  (fn add-menu-item-dispatch [_ item]
    (some @menu-constructor-dispatch (keys item))))
Vars in clojure.contrib.swing-utils/add-menu-item: defmulti fn keys some deref
Used in 0 other vars

Comments top

No comments for add-menu-item. Log in to add a comment.