bibliothek.gui.dock.station.stack.menu
Class PopupCombinedMenuContent

java.lang.Object
  extended by bibliothek.gui.dock.station.stack.menu.PopupCombinedMenuContent
All Implemented Interfaces:
CombinedMenuContent

public class PopupCombinedMenuContent
extends Object
implements CombinedMenuContent

A CombinedMenuContent that opens a normal JPopupMenu to display the selection.

Author:
Benjamin Sigg

Nested Class Summary
 
Nested classes/interfaces inherited from interface bibliothek.gui.dock.station.stack.menu.CombinedMenuContent
CombinedMenuContent.Item
 
Field Summary
 
Fields inherited from interface bibliothek.gui.dock.station.stack.menu.CombinedMenuContent
MENU_CONTENT
 
Constructor Summary
PopupCombinedMenuContent()
           
 
Method Summary
 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, 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopupCombinedMenuContent

public PopupCombinedMenuContent()
Method Detail

addCombinedMenuContentListener

public void addCombinedMenuContentListener(CombinedMenuContentListener listener)
Description copied from interface: CombinedMenuContent
Adds a listener to this menu, the listener has to be informed when this menu is made visible or invisible.

Specified by:
addCombinedMenuContentListener in interface CombinedMenuContent
Parameters:
listener - the new listener

removeCombinedMenuContentListener

public void removeCombinedMenuContentListener(CombinedMenuContentListener listener)
Description copied from interface: CombinedMenuContent
Removes a listener from this menu.

Specified by:
removeCombinedMenuContentListener in interface CombinedMenuContent
Parameters:
listener - the listener to remove

listeners

protected CombinedMenuContentListener[] listeners()
Gets all the listeners that are currently registered.

Returns:
all the observers

open

public void open(DockController controller,
                 Component parent,
                 int x,
                 int y,
                 CombinedMenuContent.Item[] content)
Description copied from interface: CombinedMenuContent
Shows this menu at the given location.

Specified by:
open in interface CombinedMenuContent
Parameters:
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 menu

cancel

public void cancel()
Description copied from interface: CombinedMenuContent
Closes the menu if it is currently open

Specified by:
cancel in interface CombinedMenuContent

select

public void select(Dockable dockable)
Closes this menu and informs all listeners that dockable has been selected.

Parameters:
dockable - the newly selected element