Ribbon band component. Can host three types of content:
- Command buttons added with {@link #addCommandButton(AbstractCommandButton,RibbonElementPriority)}.
- Wrapped core / 3rd party components added with {@link #addRibbonComponent(JRibbonComponent)} or{@link #addRibbonComponent(JRibbonComponent,int)}.
- Ribbon galleries added with {@link #addRibbonGallery(String,List,Map,int,int,RibbonElementPriority)}.
Command buttons are added with associated {@link RibbonElementPriority}. The higher the priority, the longer the button "stays" in the {@link CommandButtonDisplayState#BIG} or{@link CommandButtonDisplayState#MEDIUM} state - depending on the availableresize policies.
Wrapped components can span one or multiple rows. Use the {@link #addRibbonComponent(JRibbonComponent,int)} API to add a wrappedcomponent that spans more than one row.
Once a ribbon gallery is added with {@link #addRibbonGallery(String,List,Map,int,int,RibbonElementPriority)}, you can use the following APIs to configure the content and behavior of that gallery:
- {@link #addRibbonGalleryButtons(String,String,JCommandToggleButton)}
- {@link #removeRibbonGalleryButtons(String,JCommandToggleButton)}
- {@link #setSelectedRibbonGalleryButton(String,JCommandToggleButton)}
- {@link #setRibbonGalleryExpandKeyTip(String,String)}
- {@link #setRibbonGalleryPopupCallback(String,RibbonGalleryPopupCallback)}
A ribbon band can have multiple visual groups separated with vertical separator lines. To start a new unnamed group use the {@link #startGroup()}API. To start a new named group use the {@link #startGroup(String)} API.Unnamed groups will have three rows of controls. Named groups will have two rows of controls, with the top row showing the group title.
@author Kirill Grouchnikov