Class PopupBuilder


  • public class PopupBuilder
    extends java.lang.Object
    The popup builder. Constructs a (non-nested) popup menu from actions.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List rawmenu
      The menu-items and actions.
    • Constructor Summary

      Constructors 
      Constructor Description
      PopupBuilder()
      Create the popup builder.
      PopupBuilder​(java.lang.Object[] rawmenu)
      Create the popup builder.
      PopupBuilder​(java.util.List rawmenu)
      Create the popup builder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addItem​(java.lang.Object item)
      Add an item.
      javax.swing.JPopupMenu buildPopupMenu()
      Build the popup menu.
      void removeItem​(java.lang.Object item)
      Remove an item.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rawmenu

        protected java.util.List rawmenu
        The menu-items and actions.
    • Constructor Detail

      • PopupBuilder

        public PopupBuilder()
        Create the popup builder.
        Parameters:
        rawmenu - The raw menu.
      • PopupBuilder

        public PopupBuilder​(java.util.List rawmenu)
        Create the popup builder.
        Parameters:
        rawmenu - The raw menu.
      • PopupBuilder

        public PopupBuilder​(java.lang.Object[] rawmenu)
        Create the popup builder.
        Parameters:
        rawmenu - The raw menu.
    • Method Detail

      • buildPopupMenu

        public javax.swing.JPopupMenu buildPopupMenu()
        Build the popup menu.
        Returns:
        The popup menu.
      • addItem

        public void addItem​(java.lang.Object item)
        Add an item.
        Parameters:
        item - The item (Action or IMenuItemConstructor).
      • removeItem

        public void removeItem​(java.lang.Object item)
        Remove an item.
        Parameters:
        item - The item (Action or IMenuItemConstructor).