public class RibbonApplicationMenuPrimaryCommand extends FlamingoCommand
RibbonApplicationMenu. The
primary menu entries at runtime are represented by command menu buttons placed in the leading panel
of the application menu.
There are two different types of primary entries:
RibbonApplicationMenuPrimaryCommand.PrimaryRolloverCallback. When this entry is armed (with mouse
rollover or via keyboard navigation), the contents of the secondary area are populated by the
application callback implementation of
RibbonApplicationMenuPrimaryCommand.PrimaryRolloverCallback.menuEntryActivated(javax.swing.JPanel). The Open
menu item is an example of such a primary menu entry, showing a list of recently opened files.
For a primary entry that is action-only, pass RibbonApplicationMenuPrimaryCommand.PrimaryClearRolloverCallback as the primary
rollover callback to clear the secondary area.FlamingoCommands. When this entry is armed (with
mouse rollover or via keyboard navigation), the secondary area shows menu buttons for the
registered secondary menu commands. The Save As menu item is an example of such a
primary menu item, showing a list of default save formats.| Modifier and Type | Class | Description |
|---|---|---|
static class |
RibbonApplicationMenuPrimaryCommand.PrimaryClearRolloverCallback |
|
static interface |
RibbonApplicationMenuPrimaryCommand.PrimaryRolloverCallback |
Callback that allows application code to provide custom content on the secondary panel of the
RibbonApplicationMenu. |
static class |
RibbonApplicationMenuPrimaryCommand.RibbonApplicationMenuPrimaryCommandBuilder |
FlamingoCommand.BaseFlamingoCommandBuilder<T extends FlamingoCommand,B extends FlamingoCommand.BaseFlamingoCommandBuilder>, FlamingoCommand.FlamingoCommandBuilder, FlamingoCommand.FlamingoCommandToggleGroup| Modifier and Type | Method | Description |
|---|---|---|
RibbonApplicationMenuPrimaryCommand.PrimaryRolloverCallback |
getRolloverCallback() |
Returns the current application callback that allows placing custom content in the secondary
panel of the
RibbonApplicationMenu when this primary menu entry is activated. |
java.util.List<FlamingoCommand> |
getSecondaryGroupCommands(int groupIndex) |
Returns an unmodifiable list of commands of the secondary menu group at the specified index.
|
int |
getSecondaryGroupCount() |
Returns the number of secondary menu groups of this primary menu entry.
|
java.lang.String |
getSecondaryGroupTitleAt(int groupIndex) |
Returns the title of the secondary menu group at the specified index.
|
protected boolean |
hasAction() |
|
protected boolean |
hasPopup() |
buildButton, buildMenuButton, checkConsistency, getAction, getActionKeyTip, getActionRichTooltip, getAutoRepeatInitialInterval, getAutoRepeatSubsequentInterval, getDisabledIcon, getExtraText, getIcon, getPopupCallback, getPopupKeyTip, getPopupOrientationKind, getPopupRichTooltip, getTitle, getToggleGroup, isAutoRepeatAction, isEnabled, isFireActionOnRollover, isTitleClickAction, isTitleClickPopup, isToggle, isToggleSelected, setEnabledpublic int getSecondaryGroupCount()
getSecondaryGroupTitleAt(int),
getSecondaryGroupCommands(int)public java.lang.String getSecondaryGroupTitleAt(int groupIndex)
groupIndex - The index of a secondary menu group.getSecondaryGroupCount(),
getSecondaryGroupCommands(int)public java.util.List<FlamingoCommand> getSecondaryGroupCommands(int groupIndex)
groupIndex - The index of a secondary menu group.getSecondaryGroupCount(),
getSecondaryGroupTitleAt(int)public RibbonApplicationMenuPrimaryCommand.PrimaryRolloverCallback getRolloverCallback()
RibbonApplicationMenu when this primary menu entry is activated.RibbonApplicationMenu.protected boolean hasAction()
hasAction in class FlamingoCommandprotected boolean hasPopup()
hasPopup in class FlamingoCommand