You might consider using createContextMenuFromAnnotatedCode to populate the menu argument.
If set, this delegate is called before popping up the window. This gives you a chance to prepare your dynamic data structures for the element(s) selected.
If true, this button will emit trigger events on double (and other quick events, if added) click events as well as on normal single click events.
A button that pops up a menu on click for working on a particular item or selection.