Class WTabPanel.Tab.Builder
java.lang.Object
io.github.cottonmc.cotton.gui.widget.WTabPanel.Tab.Builder
- Enclosing class:
WTabPanel.Tab
A builder for tab data.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a tab from this builder.Sets the tab icon.Sets the tab title.tooltip
(Collection<? extends Text> lines) Adds lines to the tab's tooltip.Adds lines to the tab's tooltip.
-
Constructor Details
-
Builder
Constructs a new tab data builder.- Parameters:
widget
- the contained widget- Throws:
NullPointerException
- if the widget is null
-
-
Method Details
-
title
Sets the tab title.- Parameters:
title
- the new title- Returns:
- this builder
- Throws:
NullPointerException
- if the title is null
-
icon
Sets the tab icon.- Parameters:
icon
- the new icon- Returns:
- this builder
- Throws:
NullPointerException
- if the icon is null
-
tooltip
Adds lines to the tab's tooltip.- Parameters:
lines
- the added lines- Returns:
- this builder
- Throws:
NullPointerException
- if the line array is null
-
tooltip
Adds lines to the tab's tooltip.- Parameters:
lines
- the added lines- Returns:
- this builder
- Throws:
NullPointerException
- if the line collection is null
-
build
Builds a tab from this builder.- Returns:
- the built tab
-