java.lang.Object
atlantafx.base.controls.Tab.AdaptiveResizePolicy
- All Implemented Interfaces:
Tab.ResizePolicy
- Enclosing class:
Tab
Resizes the tabs to a fixed width when there is available space; otherwise, it
proportionally shrinks the tab width.
- Each tab has a fixed width when there is available space.
- If no space is available, the width of each individual tab will be reduced proportionally based on the number of tabs.
-
Field Summary
Fields inherited from interface atlantafx.base.controls.Tab.ResizePolicy
ADAPTIVE, COMPUTED_WIDTH, FIXED_WIDTH, STRETCH, USE_COMPUTED_SIZE, USE_FIXED_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
computePrefWidth
(double availableWidth, int tabCount, boolean isTabsFit) Computes the tab width.boolean
-
Constructor Details
-
AdaptiveResizePolicy
public AdaptiveResizePolicy()
-
-
Method Details
-
computePrefWidth
public double computePrefWidth(double availableWidth, int tabCount, boolean isTabsFit) Description copied from interface:Tab.ResizePolicy
Computes the tab width.- Specified by:
computePrefWidth
in interfaceTab.ResizePolicy
- Parameters:
availableWidth
- the visible width of theTabLine
tabCount
- the numbers of tabs in theTabLine
isTabsFit
- whether the summary tabs width fits the visible width of theTabLine
-
isScrollable
public boolean isScrollable()- Specified by:
isScrollable
in interfaceTab.ResizePolicy
-