Class CoreRibbonResizePolicies.FlowOneRow
java.lang.Object
org.pushingpixels.radiance.component.api.ribbon.resize.CoreRibbonResizePolicies.BaseRibbonBandResizePolicy<JFlowRibbonBand>
org.pushingpixels.radiance.component.api.ribbon.resize.CoreRibbonResizePolicies.FlowOneRow
- All Implemented Interfaces:
RibbonBandResizePolicy
- Enclosing class:
CoreRibbonResizePolicies
public static class CoreRibbonResizePolicies.FlowOneRow
extends CoreRibbonResizePolicies.BaseRibbonBandResizePolicy<JFlowRibbonBand>
Core resize policy for
JFlowRibbonBand that places the content in
a single row.-
Field Summary
Fields inherited from class CoreRibbonResizePolicies.BaseRibbonBandResizePolicy
controlPanel, ribbonBand -
Constructor Summary
ConstructorsConstructorDescriptionFlowOneRow(JFlowRibbonBand flowRibbonBand) Creates a new single-row resize policy forJFlowRibbonBands. -
Method Summary
Modifier and TypeMethodDescriptionintgetPreferredWidth(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 Details
-
FlowOneRow
Creates a new single-row resize policy forJFlowRibbonBands.- Parameters:
flowRibbonBand- The associated flow ribbon band.
-
-
Method Details
-
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.
-