Package com.explodingpixels.widgets
Interface PopupMenuCustomizer
-
- All Known Implementing Classes:
PopupMenuCustomizerUsingStrings
public interface PopupMenuCustomizerAn 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 simplePopupMenuCustomizerimplementation: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 voidcustomizePopup(javax.swing.JPopupMenu popup)Called just prior the givenJPopupMenubeing shown.
-