ChangeAware, ContentModelpublic class RibbonApplicationMenu extends CommandMenuContentModel
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 Command.BaseBuilder.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.
| Constructor | Description |
|---|---|
RibbonApplicationMenu(java.util.List<CommandGroup> commands) |
|
RibbonApplicationMenu(CommandGroup commands) |
|
RibbonApplicationMenu(CommandGroup... commandGroups) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addFooterCommand(Command entry) |
Adds the specified footer command.
|
CommandGroup |
getFooterCommands() |
Returns the footer commands of this application menu.
|
addChangeListener, addCommandGroup, getCommandGroups, getHighlightedCommand, getPanelContentModel, removeAllCommandGroups, removeChangeListener, removeCommandGroup, setHighlightedCommandpublic RibbonApplicationMenu(CommandGroup commands)
public RibbonApplicationMenu(CommandGroup... commandGroups)
public RibbonApplicationMenu(java.util.List<CommandGroup> commands)
public void addFooterCommand(Command entry)
entry - Footer command to add.getFooterCommands()public CommandGroup getFooterCommands()
null.addFooterCommand(Command)