JMenuItem | add(String text)- Constructs menu item with a specified label and adds it to
popup menu
|
JMenuItem | add(Action action)- Constructs menu item associated with the specified action
and adds it to the popup menu
|
JMenuItem | add(JMenuItem item)- Adds given menu item to the popup menu
|
void | addMenuKeyListener(MenuKeyListener l)- Adds a MenuKeyListener to the popup.
|
void | addPopupMenuListener(PopupMenuListener listener)- Adds popupMenuListener to listen for PopupMenuEvents fired
by the JPopupMenu
|
void | addSeparator()- Adds separator to this popup menu
|
protected PropertyChangeListener | createActionChangeListener(JMenuItem item)- Creates PropertyChangeListener that listens to PropertyChangeEvents
occuring in the Action associated with given menu item in this popup menu.
|
protected JMenuItem | createActionComponent(Action action)- Creates new menu item associated with a given action.
|
protected void | firePopupMenuCanceled()- This method calls popupMenuCanceled() of popup menu's PopupMenuListeners.
|
protected void | firePopupMenuWillBecomeInvisible()- This method calls popupMenuWillBecomeInvisible() of popup
menu's PopupMenuListeners.
|
protected void | firePopupMenuWillBecomeVisible()- This method calls popupMenuWillBecomeVisible() of popup menu's
PopupMenuListeners.
|
AccessibleContext | getAccessibleContext()- DOCUMENT ME!
|
Component | getComponent()- Method of the MenuElement interface.
|
Component | getComponentAtIndex(int index)- Replaced by getComponent(int)
|
int | getComponentIndex(Component component)- Returns index of the specified component in the popup menu
|
static boolean | getDefaultLightWeightPopupEnabled()- Returns flag indicating if newly created JPopupMenu will use
heavyweight or lightweight container to display its menu items
|
Component | getInvoker()- Returns popup menu's invoker.
|
String | getLabel()- Returns label for this popup menu
|
Insets | getMargin()- Returns margin for this popup menu.
|
MenuKeyListener[] | getMenuKeyListeners()- Returns array of getMenuKeyListeners that are listening to JPopupMenu.
|
PopupMenuListener[] | getPopupMenuListeners()- Returns array of PopupMenuListeners that are listening to JPopupMenu
|
SingleSelectionModel | getSelectionModel()- Returns selectionModel used by this popup menu to keep
track of the selection.
|
MenuElement[] | getSubElements()- Return subcomonents of this popup menu.
|
PopupMenuUI | getUI()- This method returns the UI used to display the JPopupMenu.
|
String | getUIClassID()- This method returns a name to identify which look and feel class will be
the UI delegate for the menuItem.
|
void | insert(Component component, int index)- Insert given component to the popup menu at the
specified index
|
void | insert(Action action, int index)- Create menu item associated with the given action
and inserts it into the popup menu at the specified index
|
boolean | isBorderPainted()- Checks if this popup menu paints its border.
|
boolean | isLightWeightPopupEnabled()- Returns true if this popup menu will display its menu item in
a lightweight container and false otherwise.
|
boolean | isPopupTrigger(MouseEvent event)- Checks if observing mouse event should trigger popup
menu to show on the screen.
|
boolean | isVisible()- Return visibility of the popup menu
|
void | menuSelectionChanged(boolean changed)- Method of MenuElement Interface.
|
void | pack()- This methods sets popup menu's size to its' preferred size.
|
protected String | paramString()- A string that describes this JPopupMenu.
|
void | processKeyEvent(KeyEvent event, MenuElement[] path, MenuSelectionManager manager)- Process key events forwarded from MenuSelectionManager.
|
void | processMouseEvent(MouseEvent event, MenuElement[] path, MenuSelectionManager manager)- Process mouse events forwarded from MenuSelectionManager.
|
void | remove(int index)- Revomes component at the given index from the menu.
|
void | removeMenuKeyListener(MenuKeyListener l)- Removes a MenuKeyListener from the popup.
|
void | removePopupMenuListener(PopupMenuListener listener)- Removes PopupMenuListener from JPopupMenu's list of listeners
|
void | setBorderPainted(boolean painted)- Sets if the border of the popup menu should be
painter or not.
|
static void | setDefaultLightWeightPopupEnabled(boolean enabled)- Sets whether JPopupMenu should use ligthWeight container to
display it menu items by default
|
void | setInvoker(Component component)- Sets popup menu's invoker.
|
void | setLabel(String label)- Sets label for this popup menu.
|
void | setLightWeightPopupEnabled(boolean enabled)- DOCUMENT ME!
|
void | setLocation(int x, int y)- Sets location of the popup menu.
|
void | setPopupSize(int width, int height)- Sets size of the popup menu
|
void | setPopupSize(Dimension size)- Sets size of the popup
|
void | setSelected(Component selected)- Selects specified component in this popup menu.
|
void | setSelectionModel(SingleSelectionModel model)- Sets selection model for this popup menu
|
void | setUI(PopupMenuUI ui)- Set the "UI" property of the menu item, which is a look and feel class
responsible for handling popupMenu's input events and painting it.
|
void | setVisible(boolean visible)- Sets visibility property of this popup menu.
|
void | show(Component component, int x, int y)- This method displays JPopupMenu on the screen at the specified
location.
|
void | updateUI()- This method sets this menuItem's UI to the UIManager's default for the
current look and feel.
|