bibliothek.gui.dock.facile.menu
Class PreferenceMenuPiece

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.PreferenceMenuPiece

@ClientOnly
public class PreferenceMenuPiece
extends BaseMenuPiece

A menu piece that allows the user to change the preferences of the framework.

Author:
Benjamin Sigg

Constructor Summary
protected PreferenceMenuPiece()
          Creates a new unlinked menu piece
  PreferenceMenuPiece(DockController controller)
          Creates a new menu piece
 
Method Summary
 void bind()
          This method is called if there is a possibility for the user to see this menu.
protected  PreferenceTreeModel createModel()
          Creates a new model for this piece.
 DockController getController()
          Gets the controller for which this piece works.
 PreferenceTreeModel getModel()
           
 void setController(DockController controller)
          Sets the controller for which this piece works.
 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

PreferenceMenuPiece

protected PreferenceMenuPiece()
Creates a new unlinked menu piece


PreferenceMenuPiece

public PreferenceMenuPiece(DockController controller)
Creates a new menu piece

Parameters:
controller - the controller for which this piece will work
Method Detail

createModel

protected PreferenceTreeModel createModel()
Creates a new model for this piece.

Returns:
the model

getModel

public PreferenceTreeModel getModel()

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()

setController

public void setController(DockController controller)
Sets the controller for which this piece works.

Parameters:
controller - the controller

getController

public DockController getController()
Gets the controller for which this piece works.

Returns:
the controller