Class CoreRibbonResizePolicies.IconRibbonBandResizePolicy
- java.lang.Object
-
- org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.BaseRibbonBandResizePolicy<AbstractRibbonBand>
-
- org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.IconRibbonBandResizePolicy
-
- All Implemented Interfaces:
RibbonBandResizePolicy
- Enclosing class:
- CoreRibbonResizePolicies
public static class CoreRibbonResizePolicies.IconRibbonBandResizePolicy extends CoreRibbonResizePolicies.BaseRibbonBandResizePolicy<AbstractRibbonBand>
Special resize policy that is used for collapsed ribbon bands. When there is not enough horizontal space to show the ribbon band content under the most restrictiveRibbonBandResizePolicy, the entire ribbon band content is replaced by a single popup button. Activating the popup button will show a popup with the original content under the most permissive resize policy.An instance of this policy must appear exactly once in the list passed to
AbstractRibbonBand.setResizePolicies(java.util.List), and it must be the last entry in that list.
-
-
Field Summary
-
Fields inherited from class org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.BaseRibbonBandResizePolicy
controlPanel, ribbonBand
-
-
Constructor Summary
Constructors Constructor Description IconRibbonBandResizePolicy(AbstractRibbonBand ribbonBand)Creates a new collapsed resize policy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPreferredWidth(int availableHeight, int gap)Returns the preferred width of the associated ribbon band under the specified dimensions.voidinstall(int availableHeight, int gap)Installs this resize policy on the associated ribbon band.
-
-
-
Constructor Detail
-
IconRibbonBandResizePolicy
public IconRibbonBandResizePolicy(AbstractRibbonBand ribbonBand)
Creates a new collapsed resize policy.- Parameters:
ribbonBand- The associated ribbon band.
-
-
Method Detail
-
getPreferredWidth
public int getPreferredWidth(int availableHeight, int gap)Description copied from interface:RibbonBandResizePolicyReturns the preferred width of the associated ribbon band under the specified dimensions.- Parameters:
availableHeight- The height available for the associated ribbon band.gap- The inter-component gap.- Returns:
- The preferred width of the associated ribbon band under the specified dimensions.
-
install
public void install(int availableHeight, int gap)Description copied from interface:RibbonBandResizePolicyInstalls this resize policy on the associated ribbon band. ForJFlowRibbonBands only changes the bounds of the flow components. ForJRibbonBands can also change the presentation state of the command buttons (withJCommandButton.setPresentationState(CommandButtonPresentationState)) 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.- Parameters:
availableHeight- The height available for the associated ribbon band.gap- The inter-component gap.
-
-