Module org.jpo

Class CategoryPopupMenu

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPopupMenu
com.jidesoft.swing.JidePopupMenu
org.jpo.gui.swing.CategoryPopupMenu
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement, Scrollable

public class CategoryPopupMenu extends com.jidesoft.swing.JidePopupMenu
Creates a JPopupMenu with entries for all the categories
See Also:
  • Constructor Details

    • CategoryPopupMenu

      public CategoryPopupMenu(List<SortableDefaultMutableTreeNode> referringNodes)
      Creates the popup menu with entries for all categories
      Parameters:
      referringNodes - The node for which to create the popup menu for
  • Method Details

    • addMenuItems

      public static void addMenuItems(JComponent parentMenu, List<SortableDefaultMutableTreeNode> referringNodes)
      This method adds a bunch of JMenuItems to the supplied parent menu. The input parameter parentMenu is modified because I need to call add several times. I can't send back a collection of JMenuItems that will then be added to the parent JPopupMenu or JMenu.
      Parameters:
      parentMenu - the JPopupMenu or JMenu to add the JMenuItems to
      referringNodes - The nodes on which the selection is to be applied