Class CoreRibbonResizePolicies.BaseCoreRibbonBandResizePolicy

    • Field Detail

      • mapping

        protected org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping
        The element priority mapping.
    • Constructor Detail

      • BaseCoreRibbonBandResizePolicy

        protected BaseCoreRibbonBandResizePolicy​(JBandControlPanel controlPanel,
                                                 org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping)
        Creates a new resize policy.
        Parameters:
        controlPanel - The control panel of the associated ribbon band.
        mapping - The element priority mapping.
    • Method Detail

      • getWidth

        protected int getWidth​(int gap,
                               List<AbstractCommandButton> bigButtons,
                               List<AbstractCommandButton> mediumButtons,
                               List<AbstractCommandButton> smallButtons)
        Returns the total width of the specified buttons.
        Parameters:
        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.
        Returns:
        Total width of the specified buttons.
      • getPreferredWidth

        public int getPreferredWidth​(int availableHeight,
                                     int gap)
        Description copied from interface: RibbonBandResizePolicy
        Returns 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.
      • getPreferredButtonWidth

        protected int getPreferredButtonWidth​(JBandControlPanel.ControlPanelGroup controlPanelGroup,
                                              int gap)
        Returns the preferred width of all the buttons in the specified control panel group.
        Parameters:
        controlPanelGroup - A single control panel group in the associated ribbon band.
        gap - Inter component gap.
        Returns:
        The preferred width of all the buttons in the specified control panel group.