Class FrontendSettingsMenuPiece

Direct Known Subclasses:
CLayoutChoiceMenuPiece

@ClientOnly public class FrontendSettingsMenuPiece extends NodeMenuPiece
A piece of a menu that allows to save, load and delete settings from a DockFrontend.
Author:
Benjamin Sigg
  • Constructor Details

    • FrontendSettingsMenuPiece

      public FrontendSettingsMenuPiece(DockFrontend frontend, boolean loadAsSubmenu)
      Creates a new piece.
      Parameters:
      frontend - the frontend which might be modified by this piece, can be null
      loadAsSubmenu - whether the list of loadable settings should be in a submenu
  • Method Details

    • getFrontend

      public DockFrontend getFrontend()
      Gets the frontend which might be modified by this menu.
      Returns:
      the frontend, an be null
    • setFrontend

      public void setFrontend(DockFrontend frontend)
      Sets the frontend which might be modified by this menu.
      Parameters:
      frontend - the frontend, can be null
    • 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 NodeMenuPiece
      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 NodeMenuPiece
      See Also:
    • save

      public void save(Component owner)
      Saves the current setting.
      Parameters:
      owner - the component which should be used as owner of any necessary dialog
    • saveAs

      public void saveAs(Component owner)
      Saves the current setting under a new name.
      Parameters:
      owner - which should be used as owner of any necessary dialog