public class PopupCombinedMenuContent extends java.lang.Object implements CombinedMenuContent
CombinedMenuContent
that opens a normal JPopupMenu
to
display the selection.CombinedMenuContent.Item
MENU_CONTENT
Constructor and Description |
---|
PopupCombinedMenuContent() |
Modifier and Type | Method and Description |
---|---|
void |
addCombinedMenuContentListener(CombinedMenuContentListener listener)
Adds a listener to this menu, the listener has to be informed when
this menu is made visible or invisible.
|
void |
cancel()
Closes the menu if it is currently open
|
protected CombinedMenuContentListener[] |
listeners()
Gets all the listeners that are currently registered.
|
void |
open(DockController controller,
java.awt.Component parent,
int x,
int y,
CombinedMenuContent.Item[] content)
Shows this menu at the given location.
|
void |
removeCombinedMenuContentListener(CombinedMenuContentListener listener)
Removes a listener from this menu.
|
void |
select(Dockable dockable)
Closes this menu and informs all listeners that
dockable
has been selected. |
public void addCombinedMenuContentListener(CombinedMenuContentListener listener)
CombinedMenuContent
addCombinedMenuContentListener
in interface CombinedMenuContent
listener
- the new listenerpublic void removeCombinedMenuContentListener(CombinedMenuContentListener listener)
CombinedMenuContent
removeCombinedMenuContentListener
in interface CombinedMenuContent
listener
- the listener to removeprotected CombinedMenuContentListener[] listeners()
public void open(DockController controller, java.awt.Component parent, int x, int y, CombinedMenuContent.Item[] content)
CombinedMenuContent
open
in interface CombinedMenuContent
controller
- the controller in whose realm this menu is used,
should not, but might, be null
parent
- the component which serves as parent for any dialog,
popup menu, etc...x
- the preferred x coordinate of the menu in respect to component
y
- the preferred y coordinate of the menu in respect to component
content
- the content of the menupublic void cancel()
CombinedMenuContent
cancel
in interface CombinedMenuContent
public void select(Dockable dockable)
dockable
has been selected.dockable
- the newly selected element