Class JMTMenuBar

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, MenuElement

public class JMTMenuBar extends JMenuBar

Name: JMTMenuBar

Description: A generic menu bar with many enhancements to be used by JMT. TODO Support for button groups and item add/remove is not implemented yet.

Date: 31/gen/07 Time: 18:31:14

Version:
1.0
Author:
Bertoli Marco
See Also:
  • Field Details

    • imageLoader

      protected ImageLoader imageLoader
      Component used to load images
  • Constructor Details

    • JMTMenuBar

      public JMTMenuBar(ImageLoader loader)
      Builds a new JMTMenuBar
      Parameters:
      loader - component used to load images
  • Method Details

    • addMenu

      public JMenuItem addMenu(AbstractJMTAction action)
      Adds a menu (or menu item) to this
      Parameters:
      action - action of the menu to be added
      Returns:
      created menu item
    • populateMenu

      public void populateMenu(AbstractJMTAction[] actions)
      Populates this menu bar
      Parameters:
      actions - an array of AbstractJMTAction with all actions to be added
    • populateMenu

      public void populateMenu(Collection<AbstractJMTAction> actions)
      Populates this menu bar
      Parameters:
      actions - a collection of AbstractJMTAction with all actions to be added
    • generateItem

      protected JMenuItem generateItem(AbstractJMTAction action)
      Generates a menu item given an action
      Parameters:
      action - action associated with menu item
      Returns:
      generated item