As the inheritance hierarchy implies, a PopupMenu
can be used anywhere a Menu can be used.
However, if you use a PopupMenu like a Menu
(e.g., you add it to a MenuBar), then you cannot
call show on that PopupMenu.
| Modifier and Type | Class and Description |
|---|---|
| protected class | PopupMenu.
Inner class of PopupMenu used to provide default support for accessibility. |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | base
Hides java. |
| pack-priv transient volatile boolean | |
| pack-priv static int | |
| private static final long | serialVersionUID
Use serialVersionUID from JDK 1.1 for interoperability.
|
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| pack-priv String | constructComponentName()
Overrides java. Constructs a name for this |
| public AccessibleContext | Returns: theAccessibleContext of this
PopupMenuOverrides java. Implements javax. Gets the |
| public MenuContainer | getParent()
Overrides java. Returns the parent container for this menu component. |
| public void |
| base | back to summary |
|---|---|
| private static final String base Hides java. | |
| isTrayIconPopup | back to summary |
|---|---|
| pack-priv transient volatile boolean isTrayIconPopup | |
| nameCounter | back to summary |
|---|---|
| pack-priv static int nameCounter Hides java. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Use serialVersionUID from JDK 1.1 for interoperability. | |
| PopupMenu | back to summary |
|---|---|
| public PopupMenu() throws HeadlessException Creates a new popup menu with an empty name.
| |
| PopupMenu | back to summary |
|---|---|
| public PopupMenu(String label) throws HeadlessException Creates a new popup menu with the specified name.
| |
| addNotify | back to summary |
|---|---|
| public void addNotify() Overrides java. Creates the popup menu's peer. The peer allows us to change the appearance of the popup menu without changing any of the popup menu's functionality. | |
| constructComponentName | back to summary |
|---|---|
| pack-priv String constructComponentName() Overrides java. Constructs a name for this | |
| getAccessibleContext | back to summary |
|---|---|
| public AccessibleContext getAccessibleContext() Overrides java. Implements javax. Gets the
| |
| getParent | back to summary |
|---|---|
| public MenuContainer getParent() Overrides java. Doc from java. Returns the parent container for this menu component. | |
| show | back to summary |
|---|---|
| public void show(Component origin, int x, int y) Shows the popup menu at the x, y position relative to an origin component. The origin component must be contained within the component hierarchy of the popup menu's parent. Both the origin and the parent must be showing on the screen for this method to be valid.
If this
| |
The class used to obtain the accessible role for this object.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
Use serialVersionUID from JDK 1.3 for interoperability.
|
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public AccessibleRole | Returns: an instance of AccessibleRole describing the role of the objectOverrides java. Get the role of this object. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Use serialVersionUID from JDK 1.3 for interoperability. | |
| AccessibleAWTPopupMenu | back to summary |
|---|---|
| protected AccessibleAWTPopupMenu() Constructs an | |
| getAccessibleRole | back to summary |
|---|---|
| public AccessibleRole getAccessibleRole() Overrides java. Get the role of this object.
| |