java.awt
Class PopupMenu

java.lang.Object
  extended by java.awt.MenuComponent
      extended by java.awt.MenuItem
          extended by java.awt.Menu
              extended by java.awt.PopupMenu
All Implemented Interfaces:
MenuContainer, Serializable, Accessible

public class PopupMenu
extends Menu

This class implement an AWT popup menu widget

See Also:
Serialized Form

Nested Class Summary
protected  class PopupMenu.AccessibleAWTPopupMenu
           
 
Nested classes/interfaces inherited from class java.awt.Menu
Menu.AccessibleAWTMenu
 
Nested classes/interfaces inherited from class java.awt.MenuItem
MenuItem.AccessibleAWTMenuItem
 
Nested classes/interfaces inherited from class java.awt.MenuComponent
MenuComponent.AccessibleAWTMenuComponent
 
Constructor Summary
PopupMenu()
          Initializes a new instance of PopupMenu.
PopupMenu(String label)
          Initializes a new instance of PopupMenu with the specified label.
 
Method Summary
 void addNotify()
          Creates this object's native peer.
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this PopupMenu.
 void show(Component component, int x, int y)
          Displays this popup menu at the specified coordinates relative to the specified component.
 
Methods inherited from class java.awt.Menu
add, add, addSeparator, countItems, getItem, getItemCount, insert, insert, insertSeparator, isTearOff, paramString, remove, remove, removeAll, removeNotify
 
Methods inherited from class java.awt.MenuItem
addActionListener, deleteShortcut, disable, disableEvents, enable, enable, enableEvents, getActionCommand, getActionListeners, getLabel, getListeners, getShortcut, isEnabled, processActionEvent, processEvent, removeActionListener, setActionCommand, setEnabled, setLabel, setShortcut
 
Methods inherited from class java.awt.MenuComponent
dispatchEvent, getFont, getName, getParent, getPeer, getTreeLock, postEvent, setFont, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Constructor Detail

PopupMenu

public PopupMenu()
Initializes a new instance of PopupMenu.

Throws:
HeadlessException - If GraphicsEnvironment.isHeadless() returns true.

PopupMenu

public PopupMenu(String label)
Initializes a new instance of PopupMenu with the specified label.

Parameters:
label - The label for this popup menu.
Throws:
HeadlessException - If GraphicsEnvironment.isHeadless() returns true.
Method Detail

addNotify

public void addNotify()
Creates this object's native peer.

Overrides:
addNotify in class Menu

show

public void show(Component component,
                 int x,
                 int y)
Displays this popup menu at the specified coordinates relative to the specified component.

Parameters:
component - The component to which the display coordinates are relative.
x - The X coordinate of the menu.
y - The Y coordinate of the menu.

getAccessibleContext

public AccessibleContext getAccessibleContext()
Gets the AccessibleContext associated with this PopupMenu. The context is created, if necessary.

Specified by:
getAccessibleContext in interface Accessible
Overrides:
getAccessibleContext in class Menu
Returns:
the associated context