bibliothek.gui.dock.station.toolbar.menu
Class GroupedCustomizationMenuContent.Group

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.menu.GroupedCustomizationMenuContent.Group
Enclosing class:
GroupedCustomizationMenuContent

public class GroupedCustomizationMenuContent.Group
extends Object

One group of CustomizationMenuContents

Author:
Benjamin Sigg

Constructor Summary
GroupedCustomizationMenuContent.Group(CustomizationMenuContent title)
          Creates a new group using title as title component.
 
Method Summary
 void add(CustomizationMenuContent item)
          Adds item to this group, there is no effect if the menu is currently showing.
 void add(int index, CustomizationMenuContent item)
          Adds item to this group, there is no effect if the menu is currently showing.
 CustomizationMenuContent getItem(int index)
          Gets the index'th item of this group.
 int getItemCount()
          Gets the number of icons in this group
 CustomizationMenuContent getTitle()
          Gets the current title component.
 void remove(CustomizationMenuContent item)
          Removes item from this group.
 void remove(int index)
          Removes index'th item from this group.
 void setTitle(CustomizationMenuContent title)
          Sets the title component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupedCustomizationMenuContent.Group

public GroupedCustomizationMenuContent.Group(CustomizationMenuContent title)
Creates a new group using title as title component.

Parameters:
title - a component shown at the top as header, can be null
Method Detail

setTitle

public void setTitle(CustomizationMenuContent title)
Sets the title component. Nothing happens if the menu is currently shown.

Parameters:
title - the new title, can be null

getTitle

public CustomizationMenuContent getTitle()
Gets the current title component.

Returns:
the current title, may be null

add

public void add(CustomizationMenuContent item)
Adds item to this group, there is no effect if the menu is currently showing.

Parameters:
item - the item to add, not null

add

public void add(int index,
                CustomizationMenuContent item)
Adds item to this group, there is no effect if the menu is currently showing.

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

remove

public void remove(CustomizationMenuContent item)
Removes item from this group. There is no effect it the menu is currently showing.

Parameters:
item - the item to remove

remove

public void remove(int index)
Removes index'th item from this group. There is no effect it the menu is currently showing.

Parameters:
index - the index of the item to remove

getItemCount

public int getItemCount()
Gets the number of icons in this group

Returns:
the number of icons

getItem

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

Parameters:
index - the index of the item
Returns:
the item at index