Class Actions.SubMenu

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, MenuElement, SwingConstants, DynamicMenuContent
Enclosing class:
Actions

@Deprecated public static class Actions.SubMenu extends JMenuPlus implements DynamicMenuContent
Deprecated.
Extends deprecated JMenuPlus. Instead create a regular JMenu and add items to it (or use DynamicMenuContent).
SubMenu provides easy way of displaying submenu items based on SubMenuModel.
See Also:
  • Constructor Details

    • SubMenu

      public SubMenu(org.openide.util.actions.SystemAction aAction, Actions.SubMenuModel model)
      Deprecated.
      Constructs a new ActMenuItem with the specified label and no keyboard shortcut and connects it to the given SystemAction. No icon is used by default.
      Parameters:
      aAction - the action to which this menu item should be connected
      model - the support for the menu items
    • SubMenu

      public SubMenu(org.openide.util.actions.SystemAction aAction, Actions.SubMenuModel model, boolean popup)
      Deprecated.
      Constructs a new ActMenuItem with the specified label and no keyboard shortcut and connects it to the given SystemAction. No icon is used by default.
      Parameters:
      aAction - the action to which this menu item should be connected
      model - the support for the menu items
      popup - whether this is a popup menu
    • SubMenu

      public SubMenu(Action aAction, Actions.SubMenuModel model, boolean popup)
      Deprecated.
      Constructs a new ActMenuItem with the specified label and no keyboard shortcut and connects it to the given SystemAction. No icon is used by default.
      Parameters:
      aAction - the action to which this menu item should be connected
      model - the support for the menu items
      popup - whether this is a popup menu
  • Method Details

    • getMenuPresenters

      public JComponent[] getMenuPresenters()
      Deprecated.
      Description copied from interface: DynamicMenuContent
      Create main menu/popup menuitems. Null values will be later replaced by JSeparators. This method is called for popups and for menus. It's called each time a popup menu is contructed and just once for the main menu. Main menu updates happen through the synchMenuPresenters() method. If you want different behaviour for menu and popup, use a different implementation returned by Presenter.Popup and Presenter.Menu.
      Specified by:
      getMenuPresenters in interface DynamicMenuContent
    • synchMenuPresenters

      public JComponent[] synchMenuPresenters(JComponent[] items)
      Deprecated.
      Description copied from interface: DynamicMenuContent
      update main menu presenters. This method is called only by the main menu processing.
      Specified by:
      synchMenuPresenters in interface DynamicMenuContent
      Parameters:
      items - the previously used menuitems returned by previous call to getMenuPresenters() or synchMenuPresenters()
      Returns:
      a new set of items to show in menu. Can be either an updated old set of instances or a completely new one.