bibliothek.gui.dock.facile.menu
Class LookAndFeelMenuPiece

java.lang.Object
  extended by bibliothek.gui.dock.support.menu.MenuPiece
      extended by bibliothek.gui.dock.support.menu.BaseMenuPiece
          extended by bibliothek.gui.dock.facile.menu.LookAndFeelMenuPiece
Direct Known Subclasses:
CLookAndFeelMenuPiece

@ClientOnly
public class LookAndFeelMenuPiece
extends BaseMenuPiece

A menu that contains an item for each available LookAndFeel. The set of LookAndFeels is determined through a LookAndFeelList.

Author:
Benjamin Sigg

Constructor Summary
LookAndFeelMenuPiece()
          Creates a new menu.
LookAndFeelMenuPiece(JFrame frame, LookAndFeelList list)
          Creates a new menu.
 
Method Summary
 void bind()
          This method is called if there is a possibility for the user to see this menu.
 void destroy()
          Deprecated. the method unbind() is automatically called if this menu is no longer visible, that method will also uninstall resources
 LookAndFeelList getList()
          Gets the list of LookAndFeels.
 void unbind()
          This method is called if the user has no longer any possibility to see this menu.
 
Methods inherited from class bibliothek.gui.dock.support.menu.BaseMenuPiece
add, addSeparator, fill, getItem, getItemCount, insert, insertSeparator, remove, remove, removeAll
 
Methods inherited from class bibliothek.gui.dock.support.menu.MenuPiece
addListener, fireInsert, fireRemove, getMenu, getParent, isBound, items, removeListener, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAndFeelMenuPiece

public LookAndFeelMenuPiece()
Creates a new menu.


LookAndFeelMenuPiece

public LookAndFeelMenuPiece(JFrame frame,
                            LookAndFeelList list)
Creates a new menu.

Parameters:
frame - the main frame of the application. This piece will add a listener to frame and free resources the moment frame is closed. This menu will also ensure that frames user interface is updated when the LookAndFeel changes. Can be null.
list - the set of available LookAndFeels. Can be null.
Method Detail

bind

public void bind()
Description copied from class: MenuPiece
This method is called if there is a possibility for the user to see this menu. The menu should register listeners, update its text etc. to be ready for that event. This method must never be called twice in a row.

Overrides:
bind in class MenuPiece
See Also:
MenuPiece.unbind()

unbind

public void unbind()
Description copied from class: MenuPiece
This method is called if the user has no longer any possibility to see this menu. The menu should unregister its listeners. This method must never be called twice in a row.

Overrides:
unbind in class MenuPiece
See Also:
MenuPiece.bind()

destroy

@Deprecated
public void destroy()
Deprecated. the method unbind() is automatically called if this menu is no longer visible, that method will also uninstall resources

Frees resources and cuts connections to other objects such that this piece can be removed by the garbage collector.


getList

public LookAndFeelList getList()
Gets the list of LookAndFeels.

Returns:
the list