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

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

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