Class MenuPopupWindow

  • All Implemented Interfaces:
    BasePane, Composite, Window

    public class MenuPopupWindow
    extends AbstractWindow
    This class is a Window implementation that automatically sets some common settings that you'd want on specifically popup windows with menu items. It ensures that the window is modal and has a fixed position (rather than letting the window manager choose).
    • Field Detail

      • menuItemPanel

        private final Panel menuItemPanel
    • Constructor Detail

      • MenuPopupWindow

        public MenuPopupWindow​(Component parent)
        Creates a new popup window with a relative position to the component supplied.
        Parameters:
        parent - Component that this popup menu is triggered from
    • Method Detail

      • addMenuItem

        public void addMenuItem​(MenuItem menuItem)
        Adds a new menu item to this popup window. The item will automatically be selected if it's the first one added.
        Parameters:
        menuItem - Menu item to add to the popup window.