com.alee.utils.swing.menu
Class PopupMenuGenerator

java.lang.Object
  extended by com.alee.utils.swing.menu.AbstractMenuGenerator
      extended by com.alee.utils.swing.menu.PopupMenuGenerator

public class PopupMenuGenerator
extends AbstractMenuGenerator

Special generator that simplifies and shortens popup menu creation code.

Author:
Mikle Garin

Field Summary
protected  WebPopupMenu popupMenu
           
 
Fields inherited from class com.alee.utils.swing.menu.AbstractMenuGenerator
defaultIconFormat, extension, group, languagePrefix, nearClass, path
 
Constructor Summary
PopupMenuGenerator()
           
PopupMenuGenerator(java.lang.String styleId)
           
PopupMenuGenerator(WebPopupMenu popupMenu)
           
 
Method Summary
 WebCheckBoxMenuItem addCheckItem(java.lang.String icon, java.lang.String text, HotkeyData hotkey, boolean enabled, boolean selected, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String text, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String text, boolean enabled, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String text, HotkeyData hotkey, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String text, HotkeyData hotkey, boolean enabled, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String icon, java.lang.String text, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String icon, java.lang.String text, boolean enabled, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String icon, java.lang.String text, HotkeyData hotkey, java.awt.event.ActionListener actionListener)
           
 WebMenuItem addItem(java.lang.String icon, java.lang.String text, HotkeyData hotkey, boolean enabled, java.awt.event.ActionListener actionListener)
           
 WebRadioButtonMenuItem addRadioItem(java.lang.String icon, java.lang.String text, HotkeyData hotkey, boolean enabled, boolean selected, java.awt.event.ActionListener actionListener)
           
 void addSeparator()
           
 WebPopupMenu getPopupMenu()
           
 
Methods inherited from class com.alee.utils.swing.menu.AbstractMenuGenerator
closeGroup, createCheckBoxItem, createItem, createMenu, createRadioButtonItem, getExtension, getIcon, getLanguageKey, getLanguagePrefix, getNearClass, getPath, group, openGroup, openGroup, setExtension, setIconSettings, setLanguagePrefix, setNearClass, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

popupMenu

protected final WebPopupMenu popupMenu
Constructor Detail

PopupMenuGenerator

public PopupMenuGenerator()

PopupMenuGenerator

public PopupMenuGenerator(java.lang.String styleId)

PopupMenuGenerator

public PopupMenuGenerator(WebPopupMenu popupMenu)
Method Detail

addSeparator

public void addSeparator()

addItem

public WebMenuItem addItem(java.lang.String text,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String text,
                           HotkeyData hotkey,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String icon,
                           java.lang.String text,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String icon,
                           java.lang.String text,
                           HotkeyData hotkey,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String icon,
                           java.lang.String text,
                           boolean enabled,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String text,
                           boolean enabled,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String text,
                           HotkeyData hotkey,
                           boolean enabled,
                           java.awt.event.ActionListener actionListener)

addItem

public WebMenuItem addItem(java.lang.String icon,
                           java.lang.String text,
                           HotkeyData hotkey,
                           boolean enabled,
                           java.awt.event.ActionListener actionListener)

addCheckItem

public WebCheckBoxMenuItem addCheckItem(java.lang.String icon,
                                        java.lang.String text,
                                        HotkeyData hotkey,
                                        boolean enabled,
                                        boolean selected,
                                        java.awt.event.ActionListener actionListener)

addRadioItem

public WebRadioButtonMenuItem addRadioItem(java.lang.String icon,
                                           java.lang.String text,
                                           HotkeyData hotkey,
                                           boolean enabled,
                                           boolean selected,
                                           java.awt.event.ActionListener actionListener)

getPopupMenu

public WebPopupMenu getPopupMenu()