Package com.explodingpixels.widgets
Interface PopupMenuCustomizer
-
- All Known Implementing Classes:
PopupMenuCustomizerUsingStrings
public interface PopupMenuCustomizer
An interface that is used to popuplate aJPopupMenu
. ThecustomizePopup(JPopupMenu)
method will be called just prior to each showing of the menu. Thus, the implementor should clear the menu at the beginning of the customization. Here is a simplePopupMenuCustomizer
implementation:public class MyPopupMenuCustomizer implements PopupMenuCustomizer { public void customizePopup(JPopupMenu popup) { popup.removeAll(); JMenuItem menuItem = new JMenuItem(menuString); menuItem.addActionListener(someActionListener); popup.add(menuItem); } }
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
customizePopup(javax.swing.JPopupMenu popup)
Called just prior the givenJPopupMenu
being shown.
-