public class DefaultActionPopupMenu extends Object implements ActionPopupMenu
ActionPopupMenu, this implementation
makes use of a MenuMenuHandler to create and update its content.| Constructor and Description |
|---|
DefaultActionPopupMenu(Dockable dockable,
DockActionSource actions) |
DefaultActionPopupMenu(Dockable dockable,
DockActionSource actions,
JPopupMenu menu) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ActionPopupMenuListener listener)
Adds a listener to this menu, the listener is to be informed if
the menu closes.
|
Dockable |
getDockable()
Gets the
Dockable for which this menu is shown. |
boolean |
isShowing()
Tells whether the menu is currently open.
|
void |
removeListener(ActionPopupMenuListener listener)
Removes a listener from this menu.
|
void |
show(Component owner,
int x,
int y)
Opens this menu assuming the mouse is currently over
owner
at location x/y. |
public DefaultActionPopupMenu(Dockable dockable, DockActionSource actions)
public DefaultActionPopupMenu(Dockable dockable, DockActionSource actions, JPopupMenu menu)
public void addListener(ActionPopupMenuListener listener)
ActionPopupMenuaddListener in interface ActionPopupMenulistener - the new listenerpublic Dockable getDockable()
ActionPopupMenuDockable for which this menu is shown.getDockable in interface ActionPopupMenupublic void removeListener(ActionPopupMenuListener listener)
ActionPopupMenuremoveListener in interface ActionPopupMenulistener - the listener to removepublic void show(Component owner, int x, int y)
ActionPopupMenuowner
at location x/y.show in interface ActionPopupMenuowner - the Component over which the menu should appearx - the x coordinate of the positiony - the y coordinate of the positionpublic boolean isShowing()
true if the menu is openCopyright © 2017 Docking Frames. All rights reserved.