bibliothek.gui.dock.station.stack
Interface CombinedMenu

All Superinterfaces:
TabMenu, TabPaneComponent
All Known Implementing Classes:
AbstractCombinedMenu, BubbleTabMenu, EclipseMenu, FlatMenu

public interface CombinedMenu
extends TabMenu

A menu that is displayed on a CombinedStackDockComponent. Clients should call setController(DockController) when they use this menu, they should set the controller to null when they no longer use this menu.

Author:
Benjamin Sigg

Method Summary
 Component getComponent()
          Gets the component that paints and represents this menu.
 void insert(int index, Dockable dockable)
          Inserts a new item at index in this menu.
 void remove(Dockable dockable)
          Removes the item dockable from this menu
 void setController(DockController controller)
          Sets the controller in whose realm this menu is used.
 void setIcon(int index, Icon icon)
          Sets the image of this menu at index.
 void setText(int index, String text)
          Sets the text of this menu at index.
 void setTooltip(int index, String tooltip)
          Sets the tooltip of this menu at index.
 
Methods inherited from interface bibliothek.gui.dock.station.stack.tab.TabMenu
getDockable, getDockableCount, getDockables
 
Methods inherited from interface bibliothek.gui.dock.station.stack.tab.TabPaneComponent
getBounds, getMaximumSize, getMinimumSize, getOverlap, getPreferredSize, getTabParent, getZOrder, isPaneVisible, setBounds, setOrientation, setPaneVisible, setZOrder
 

Method Detail

setController

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

Parameters:
controller - the realm

getComponent

Component getComponent()
Gets the component that paints and represents this menu.

Returns:
this menu

setText

void setText(int index,
             String text)
Sets the text of this menu at index.

Parameters:
index - the entry that should be modified
text - the text to display

setIcon

void setIcon(int index,
             Icon icon)
Sets the image of this menu at index.

Parameters:
index - the entry that should be modified
icon - an icon that should be shown, can be null

setTooltip

void setTooltip(int index,
                String tooltip)
Sets the tooltip of this menu at index.

Parameters:
index - the entry that should be modified
tooltip - the tooltip text, can be null

insert

void insert(int index,
            Dockable dockable)
Inserts a new item at index in this menu.

Parameters:
index - the location of the new item
dockable - the new item

remove

void remove(Dockable dockable)
Removes the item dockable from this menu

Parameters:
dockable - the item to remove