Interface IMenuCreator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dispose()
      Disposes the menu returned by getMenu.
      Menu getMenu​(Control parent)
      Returns the SWT menu, created as a pop up menu parented by the given control.
      Menu getMenu​(Menu parent)
      Returns an SWT menu created as a drop down menu parented by the given menu.
    • Method Detail

      • dispose

        void dispose()
        Disposes the menu returned by getMenu. Does nothing if there is no menu. This method will be executed only when the parent of the menu is disposed.
      • getMenu

        Menu getMenu​(Control parent)
        Returns the SWT menu, created as a pop up menu parented by the given control. In most cases, this menu can be created once, cached and reused when the pop-up/drop-down action occurs. If the menu must be dynamically created (i.e., each time it is popped up or dropped down), the old menu should be disposed of before replacing it with the new menu.
        Parameters:
        parent - the parent control
        Returns:
        the menu, or null if the menu could not be created
      • getMenu

        Menu getMenu​(Menu parent)
        Returns an SWT menu created as a drop down menu parented by the given menu. In most cases, this menu can be created once, cached and reused when the pop-up/drop-down action occurs. If the menu must be dynamically created (i.e., each time it is popped up or dropped down), the old menu should be disposed of before replacing it with the new menu.
        Parameters:
        parent - the parent menu
        Returns:
        the menu, or null if the menu could not be created