Class 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 Details

    • 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 Details

    • 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:
    • 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:
    • 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