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

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

public class GroupedCustomizationMenuTitle
extends Object
implements CustomizationMenuContent

This is the default component to be used by a GroupedCustomizationMenuContent as title for one group.

Author:
Benjmain Sigg

Constructor Summary
GroupedCustomizationMenuTitle(String title)
          Creates a new title.
 
Method Summary
 void bind(CustomizationMenuCallback callback)
          Informs this item that is going to be used.
 Insets getInsets()
          Gets the area around the entire title that remains empty.
 Insets getTextInsets()
          Gets the area around the text that should remain empty.
 String getTitle()
          Gets the current title text.
 Component getView()
          Gets a Component which represents this item.
 void setController(bibliothek.gui.DockController controller)
          Informs this content about the DockController in whose realm it is used.
 void setInsets(Insets insets)
          Sets the area around the entire title that should remain empty.
 void setTextInsets(Insets insets)
          Sets the area around the text that should remain empty.
 void setTitle(String title)
          Sets the title text.
 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

GroupedCustomizationMenuTitle

public GroupedCustomizationMenuTitle(String title)
Creates a new title.

Parameters:
title - the text of the title
Method Detail

setTitle

public void setTitle(String title)
Sets the title text.

Parameters:
title - the new title

getTitle

public String getTitle()
Gets the current title text.

Returns:
the current text

setTextInsets

public void setTextInsets(Insets insets)
Sets the area around the text that should remain empty.

Parameters:
insets - the area to remain empty

getTextInsets

public Insets getTextInsets()
Gets the area around the text that should remain empty.

Returns:
the area, not null

setInsets

public void setInsets(Insets insets)
Sets the area around the entire title that should remain empty.

Parameters:
insets - the area to remain empty

getInsets

public Insets getInsets()
Gets the area around the entire title that remains empty.

Returns:
the area that remains empty

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