java.lang.Object
atlantafx.base.controls.Tab.ComputedWidthResizePolicy
- All Implemented Interfaces:
Tab.ResizePolicy
- Enclosing class:
Tab
Resizes the tabs to a computed width, requiring the user to scroll horizontally
if the total width exceeds the visible width of the tab line.
- Each tab has a computed width equal to the preferred width of its content.
- The content of each tab is not clipped.
- If the total width of the tabs exceeds the visible width of the tab line, the width of each individual tab will remain unchanged.
- The user can scroll horizontally to view specific tabs, with the tab line scrolling accordingly.
-
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
-
ComputedWidthResizePolicy
public ComputedWidthResizePolicy()
-
-
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
-