Class RibbonApplicationMenu
- All Implemented Interfaces:
BaseCommandMenuContentModel
,ChangeAware
,ContentModel
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 Command
s
configured with the
invalid reference
Command.Builder#setSecondaryContentModel(CommandMenuContentModel)
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 JCommandButton
s, 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRibbonApplicationMenu
(List<CommandGroup> commands) RibbonApplicationMenu
(CommandGroup commands) RibbonApplicationMenu
(CommandGroup... commandGroups) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFooterCommand
(Command entry) Adds the specified footer command.Returns the footer commands of this application menu.boolean
isEmpty()
Methods inherited from class org.pushingpixels.radiance.component.api.common.model.CommandMenuContentModel
addChangeListener, addCommandGroup, getCommandGroups, getHighlightedCommand, getPanelContentModel, removeAllCommandGroups, removeChangeListener, removeCommandGroup, setHighlightedCommand
-
Field Details
-
Constructor Details
-
RibbonApplicationMenu
-
RibbonApplicationMenu
-
RibbonApplicationMenu
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceBaseCommandMenuContentModel
- Overrides:
isEmpty
in classCommandMenuContentModel