public class MenuPopupWindow extends AbstractWindow
Window
implementation that automatically sets some common settings that you'd want on
specifically popup windows with menu items. It ensures that the window is modal and has a fixed position (rather than
letting the window manager choose).AbstractBasePane.ContentHolder
Window.Hint
contentHolder, interactableLookupMap
Constructor | Description |
---|---|
MenuPopupWindow(Component parent) |
Creates a new popup window with a relative position to the component supplied.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addMenuItem(MenuItem menuItem) |
Adds a new menu item to this popup window.
|
addBasePaneListener, getBasePaneListeners, getComponent, getCursorPosition, getFocusedInteractable, getMenuBar, getTheme, invalidate, isInvalid, removeBasePaneListener, setComponent, setEnableDirectionBasedMovements, setFocusedInteractable, setFocusedInteractable, setMenuBar, setStrictFocusChange, setTheme
addWindowListener, close, draw, fromGlobal, fromGlobalToContentRelative, fromGlobalToDecoratedRelative, getDecoratedSize, getHints, getPosition, getPostRenderer, getPreferredSize, getSize, getTextGUI, getTitle, handleInput, isVisible, removeWindowListener, setCloseWindowWithEscape, setContentOffset, setDecoratedSize, setFixedSize, setHints, setPosition, setSize, setTextGUI, setTitle, setWindowPostRenderer, setVisible, toGlobal, toGlobalFromContentRelative, toGlobalFromDecoratedRelative, waitUntilClosed
getTheme, setEnableDirectionBasedMovements, setStrictFocusChange, setTheme
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBounds, getComponent, getCursorPosition, getFocusedInteractable, getMenuBar, invalidate, isInvalid, setComponent, setFocusedInteractable, setMenuBar
public MenuPopupWindow(Component parent)
parent
- Component that this popup menu is triggered frompublic void addMenuItem(MenuItem menuItem)
menuItem
- Menu item to add to the popup window.Copyright © 2020. All rights reserved.