bibliothek.gui.dock.station.stack.menu
Interface CombinedMenuContent

All Known Implementing Classes:
PopupCombinedMenuContent

public interface CombinedMenuContent

A popup menu often used by CombinedMenus to show their content. The items of a CombinedMenuContent are not supposed to change while the menu is visible and all state is forgotten once the menu is closed. A CombinedMenuContent might be used at the same time by more than one client.

Author:
Benjamin Sigg

Nested Class Summary
static class CombinedMenuContent.Item
          Describes one item of a menu.
 
Field Summary
static PropertyKey<CombinedMenuContent> MENU_CONTENT
          Key that should be used to access the default menu content
 
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
 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.
 

Field Detail

MENU_CONTENT

static final PropertyKey<CombinedMenuContent> MENU_CONTENT
Key that should be used to access the default menu content

Method Detail

addCombinedMenuContentListener

void addCombinedMenuContentListener(CombinedMenuContentListener listener)
Adds a listener to this menu, the listener has to be informed when this menu is made visible or invisible.

Parameters:
listener - the new listener

removeCombinedMenuContentListener

void removeCombinedMenuContentListener(CombinedMenuContentListener listener)
Removes a listener from this menu.

Parameters:
listener - the listener to remove

open

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

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

void cancel()
Closes the menu if it is currently open