org.pushingpixels.flamingo.api.ribbon.resize
protected abstract static class CoreRibbonResizePolicies.BaseCoreRibbonBandResizePolicy extends BaseRibbonBandResizePolicy<JBandControlPanel>
Modifier and Type | Field and Description |
---|---|
protected org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping |
mapping
The element priority mapping.
|
controlPanel
Modifier | Constructor and Description |
---|---|
protected |
CoreRibbonResizePolicies.BaseCoreRibbonBandResizePolicy(JBandControlPanel controlPanel,
org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping)
Creates a new resize policy.
|
Modifier and Type | Method and Description |
---|---|
protected int |
getPreferredButtonWidth(JBandControlPanel.ControlPanelGroup controlPanelGroup,
int gap)
Returns the preferred width of all the buttons in the specified
control panel group.
|
int |
getPreferredWidth(int availableHeight,
int gap)
Returns the preferred width of the associated ribbon band under the
specified dimensions.
|
protected int |
getWidth(int gap,
List<AbstractCommandButton> bigButtons,
List<AbstractCommandButton> mediumButtons,
List<AbstractCommandButton> smallButtons)
Returns the total width of the specified buttons.
|
void |
install(int availableHeight,
int gap)
Installs this resize policy on the associated ribbon band.
|
protected org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping
protected CoreRibbonResizePolicies.BaseCoreRibbonBandResizePolicy(JBandControlPanel controlPanel, org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping)
controlPanel
- The control panel of the associated ribbon band.mapping
- The element priority mapping.protected int getWidth(int gap, List<AbstractCommandButton> bigButtons, List<AbstractCommandButton> mediumButtons, List<AbstractCommandButton> smallButtons)
gap
- Inter component gap.bigButtons
- List of buttons in big display state.mediumButtons
- List of buttons in medium display state.smallButtons
- List of buttons in small display state.public int getPreferredWidth(int availableHeight, int gap)
RibbonBandResizePolicy
availableHeight
- The height available for the associated ribbon band.gap
- The inter-component gap.protected int getPreferredButtonWidth(JBandControlPanel.ControlPanelGroup controlPanelGroup, int gap)
controlPanelGroup
- A single control panel group in the associated ribbon
band.gap
- Inter component gap.public void install(int availableHeight, int gap)
RibbonBandResizePolicy
JFlowRibbonBand
s only changes the bounds of the flow components.
For JRibbonBand
s can also change the display state of the command
buttons (with
AbstractCommandButton.setDisplayState(org.pushingpixels.flamingo.api.common.CommandButtonDisplayState)
) and the number of visible buttons in the ribbon galleries. Note that
this method is for internal use only and should not be called by the
application code.availableHeight
- The height available for the associated ribbon band.gap
- The inter-component gap.