Class CoreRibbonResizePolicies.BaseCoreRibbonBandResizePolicy

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BaseCoreRibbonBandResizePolicy​(JRibbonBand ribbonBand, org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping)
      Creates a new resize policy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected int getPreferredButtonWidth​(org.pushingpixels.flamingo.internal.ui.ribbon.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, java.util.List<JCommandButton> bigButtons, java.util.List<JCommandButton> mediumButtons, java.util.List<JCommandButton> smallButtons)
      Returns the total width of the specified buttons.
      void install​(int availableHeight, int gap)
      Installs this resize policy on the associated ribbon band.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mapping

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

      • BaseCoreRibbonBandResizePolicy

        protected BaseCoreRibbonBandResizePolicy​(JRibbonBand ribbonBand,
                                                 org.pushingpixels.flamingo.api.ribbon.resize.CoreRibbonResizePolicies.Mapping mapping)
        Creates a new resize policy.
        Parameters:
        ribbonBand - The associated ribbon band.
        mapping - The element priority mapping.
    • Method Detail

      • getWidth

        protected int getWidth​(int gap,
                               java.util.List<JCommandButton> bigButtons,
                               java.util.List<JCommandButton> mediumButtons,
                               java.util.List<JCommandButton> smallButtons)
        Returns the total width of the specified buttons.
        Parameters:
        gap - Inter component gap.
        bigButtons - List of buttons in big presentation state.
        mediumButtons - List of buttons in medium presentation state.
        smallButtons - List of buttons in small presentation 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​(org.pushingpixels.flamingo.internal.ui.ribbon.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.
      • install

        public void install​(int availableHeight,
                            int gap)
        Description copied from interface: RibbonBandResizePolicy
        Installs this resize policy on the associated ribbon band. For JFlowRibbonBands only changes the bounds of the flow components. For JRibbonBands can also change the presentation state of the command buttons (with JCommandButton.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.