Class RibbonApplicationMenu

java.lang.Object
org.pushingpixels.radiance.component.api.common.model.CommandMenuContentModel
org.pushingpixels.radiance.component.api.ribbon.RibbonApplicationMenu
All Implemented Interfaces:
BaseCommandMenuContentModel, ChangeAware, ContentModel

public class RibbonApplicationMenu extends CommandMenuContentModel
Metadata description of the application menu of the JRibbon component. The ribbon application menu has three parts:
 +-------------------------------------+
 |           |                         |
 |           |                         |
 |  primary  |        secondary        |
 |   area    |           area          |
 |           |                         |
 |           |                         |
 |-------------------------------------|
 |            footer area              |
 +-------------------------------------+
 

The entries in the primary area are always visible. The secondary area entries are shown based on the currently active element in the primary area. The secondary entries are Commands configured with the

invalid reference
Command.Builder#setSecondaryContentModel(CommandMenuContentModel)
API. When this entry is armed (with mouse rollover or via keyboard navigation), the secondary area shows menu buttons for the registered secondary menu entries. The Save As menu item is an example of such a primary menu item, showing a list of default save formats.

At runtime, the application menu entries are implemented as JCommandButtons, but the application code does not operate on that level. Instead, the application code creates metadata-driven description of the ribbon application menu with Command.Builder, and those commands is used to create and populate the "real" controls of the application menu popup.

Note that once a RibbonApplicationMenu is set on the JRibbon with the JRibbon.setApplicationMenuCommand(RibbonApplicationMenuCommandButtonProjection), its contents cannot be changed.

  • Field Details

    • footerCommands

      private CommandGroup footerCommands
      Footer commands.
  • Constructor Details

    • RibbonApplicationMenu

      public RibbonApplicationMenu(CommandGroup commands)
    • RibbonApplicationMenu

      public RibbonApplicationMenu(CommandGroup... commandGroups)
    • RibbonApplicationMenu

      public RibbonApplicationMenu(List<CommandGroup> commands)
  • Method Details