bibliothek.gui.dock.station.toolbar.menu
Interface CustomizationMenu

All Known Implementing Classes:
AbstractCustomizationMenu, DefaultCustomizationMenu

public interface CustomizationMenu

A CustomizationMenu is a menu that is shown belonging to a ToolbarGroupDockStation, the menu can offer various settings to customize the station.
Clients should call setController(DockController) and setContent(CustomizationMenuContent) to set up the menu.

Author:
Benjamin Sigg

Method Summary
 void close()
          Closes this menu.
 CustomizationMenuContent getContent()
          Gets the contents of this menu.
 void open(int x, int y, CustomizationMenuCallback callback)
          Opens the menu for station.
 void setContent(CustomizationMenuContent content)
          Sets the contents of this menu.
 void setController(bibliothek.gui.DockController controller)
          Sets the controller in whose realm this menu is used.
 

Method Detail

getContent

CustomizationMenuContent getContent()
Gets the contents of this menu.

Returns:
the contents, can be null

setContent

void setContent(CustomizationMenuContent content)
Sets the contents of this menu.

Parameters:
content - the new contents, can be null

setController

void setController(bibliothek.gui.DockController controller)
Sets the controller in whose realm this menu is used.

Parameters:
controller - the new controller, can be null

open

void open(int x,
          int y,
          CustomizationMenuCallback callback)
Opens the menu for station. The menus top left corner should be at coordinates x,y.

Parameters:
x - the x coordinate
y - the y coordinate
callback - allows communication with the station that opened this menu
Throws:
IllegalArgumentException - if callback is null
IllegalStateException - if there is no content to show

close

void close()
Closes this menu.