bibliothek.gui.dock.station.toolbar.menu
Class CustomizationMenuContentVerticalBox

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.menu.CustomizationMenuContentVerticalBox
All Implemented Interfaces:
CustomizationMenuContent

public class CustomizationMenuContentVerticalBox
extends Object
implements CustomizationMenuContent

A CustomizationMenuContent using a vertical Box to show a set of other CustomizationMenuContents.

Author:
"Herve Guillaume"

Constructor Summary
CustomizationMenuContentVerticalBox()
           
 
Method Summary
 void add(CustomizationMenuContent item)
          Adds item to this box.
 void add(int index, CustomizationMenuContent item)
          Adds item to this box.
 void bind(CustomizationMenuCallback callback)
          Informs this item that is going to be used.
 CustomizationMenuContent getItem(int index)
          Gets the index'th item of this grid.
 int getItemCount()
          Gets the number of items on this grid.
 Component getView()
          Gets a Component which represents this item.
 void remove(CustomizationMenuContent item)
          Removes item from this box.
 void remove(int index)
          Removes the index'th item from this box.
 void setController(bibliothek.gui.DockController controller)
          Informs this content about the DockController in whose realm it is used.
 void unbind()
          Informs this item that it is no longer used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizationMenuContentVerticalBox

public CustomizationMenuContentVerticalBox()
Method Detail

getView

public Component getView()
Description copied from interface: CustomizationMenuContent
Gets a Component which represents this item. If #bind() has not yet been called, or CustomizationMenuContent.unbind() has been called, then a result of null is valid.

Specified by:
getView in interface CustomizationMenuContent
Returns:
the view or null if this item is not bound.

setController

public void setController(bibliothek.gui.DockController controller)
Description copied from interface: CustomizationMenuContent
Informs this content about the DockController in whose realm it is used.

Specified by:
setController in interface CustomizationMenuContent
Parameters:
controller - the controller, can be null

bind

public void bind(CustomizationMenuCallback callback)
Description copied from interface: CustomizationMenuContent
Informs this item that is going to be used. This method must not be called twice in a row.

Specified by:
bind in interface CustomizationMenuContent
Parameters:
callback - access to more detailed information about the DockStation that is showing the menu

unbind

public void unbind()
Description copied from interface: CustomizationMenuContent
Informs this item that it is no longer used. This method must not be called twive in a row, it must be called after a call to #bind().

Specified by:
unbind in interface CustomizationMenuContent

add

public void add(CustomizationMenuContent item)
Adds item to this box. It is the clients responsibility to ensure that item is not already used by another object. If the menu is currently visible, then calling this method has no immediate effect.

Parameters:
item - the item to add, not null

add

public void add(int index,
                CustomizationMenuContent item)
Adds item to this box. It is the clients responsibility to ensure that item is not already used by another object. If the menu is currently visible, then calling this method has no immediate effect.

Parameters:
index - the location where to insert item
item - the item to add, not null

remove

public void remove(int index)
Removes the index'th item from this box. If the menu is currently visible, then calling this method has no immediate effect.

Parameters:
index - the index of the item to remove

remove

public void remove(CustomizationMenuContent item)
Removes item from this box. If the menu is currently visible, then calling this method has no immediate effect.

Parameters:
item - the item to remove

getItemCount

public int getItemCount()
Gets the number of items on this grid.

Returns:
the number of items

getItem

public CustomizationMenuContent getItem(int index)
Gets the index'th item of this grid.

Parameters:
index - the index of the item
Returns:
the item, not null