Class TabBuilder
TabBuilder
class constructs instances of the Tab
class
and offers a fluent interface for creating and configuring it.
This class includes a static create
method that accepts the same arguments as the original Tab
constructor
and returns an instance of the TabBuilder
.
You can use method chaining to call the builder methods for configuring the Tab
.
Finally, invoke the build
method to generate an instance of the Tab
class.
Note that intermediate builder methods are not evaluated until the build
method
is called, meaning they are evaluated lazily.
- Author:
- Hidekazu Kubota <hidekazu.kubota@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionfinal TabBuilder
addStyleClass
(String... elements) Calls theaddAll
method on the ObservableList returned by theTab#getStyleClass()
method.final TabBuilder
addStyleClass
(Collection<? extends String> col) Calls theaddAll
method on the ObservableList returned by theTab#getStyleClass()
method.Applies a function to the Tab instance being constructed.build()
Builds and returns an instance of theTab
class.closable
(boolean value) A builder method that invokes thesetClosable
method on the instance being constructed.Applies a function to theclosableProperty
of the instance being constructed.A builder method that invokes thesetContent
method on the instance being constructed.Applies a function to thecontentProperty
of the instance being constructed.contextMenu
(ContextMenu value) A builder method that invokes thesetContextMenu
method on the instance being constructed.Applies a function to thecontextMenuProperty
of the instance being constructed.static TabBuilder
create()
Returns an instance of theTabBuilder
.static TabBuilder
Accepts the constructor arguments ofTab(String)
and returns an instance ofTabBuilder
.static TabBuilder
Accepts the constructor arguments ofTab(String, Node)
and returns an instance ofTabBuilder
.disable
(boolean value) A builder method that invokes thesetDisable
method on the instance being constructed.Applies a function to thedisabledProperty
of the instance being constructed.Applies a function to thedisableProperty
of the instance being constructed.A builder method that invokes thesetGraphic
method on the instance being constructed.Applies a function to thegraphicProperty
of the instance being constructed.A builder method that invokes thesetId
method on the instance being constructed.Applies a function to theidProperty
of the instance being constructed.onClosed
(EventHandler<Event> value) A builder method that invokes thesetOnClosed
method on the instance being constructed.Applies a function to theonClosedProperty
of the instance being constructed.onCloseRequest
(EventHandler<Event> value) A builder method that invokes thesetOnCloseRequest
method on the instance being constructed.Applies a function to theonCloseRequestProperty
of the instance being constructed.onSelectionChanged
(EventHandler<Event> value) A builder method that invokes thesetOnSelectionChanged
method on the instance being constructed.Applies a function to theonSelectionChangedProperty
of the instance being constructed.Applies a function to theselectedProperty
of the instance being constructed.A builder method that invokes thesetStyle
method on the instance being constructed.Applies a function to thestyleProperty
of the instance being constructed.Applies a function to thetabPaneProperty
of the instance being constructed.A builder method that invokes thesetText
method on the instance being constructed.Applies a function to thetextProperty
of the instance being constructed.A builder method that invokes thesetTooltip
method on the instance being constructed.Applies a function to thetooltipProperty
of the instance being constructed.A builder method that invokes thesetUserData
method on the instance being constructed.
-
Method Details
-
create
Returns an instance of theTabBuilder
.- Returns:
- an instance of the
TabBuilder
.
-
create
Accepts the constructor arguments ofTab(String)
and returns an instance ofTabBuilder
.- Returns:
- an instance of the
TabBuilder
.
-
create
Accepts the constructor arguments ofTab(String, Node)
and returns an instance ofTabBuilder
.- Returns:
- an instance of the
TabBuilder
.
-
build
Builds and returns an instance of theTab
class.Intermediate builder methods are not evaluated until the
build
method is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
Tab
class
-
apply
Applies a function to the Tab instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
closable
A builder method that invokes thesetClosable
method on the instance being constructed.- Returns:
- builder instance
-
content
A builder method that invokes thesetContent
method on the instance being constructed.- Returns:
- builder instance
-
contextMenu
A builder method that invokes thesetContextMenu
method on the instance being constructed.- Returns:
- builder instance
-
disable
A builder method that invokes thesetDisable
method on the instance being constructed.- Returns:
- builder instance
-
graphic
A builder method that invokes thesetGraphic
method on the instance being constructed.- Returns:
- builder instance
-
id
A builder method that invokes thesetId
method on the instance being constructed.- Returns:
- builder instance
-
onCloseRequest
A builder method that invokes thesetOnCloseRequest
method on the instance being constructed.- Returns:
- builder instance
-
onClosed
A builder method that invokes thesetOnClosed
method on the instance being constructed.- Returns:
- builder instance
-
onSelectionChanged
A builder method that invokes thesetOnSelectionChanged
method on the instance being constructed.- Returns:
- builder instance
-
style
A builder method that invokes thesetStyle
method on the instance being constructed.- Returns:
- builder instance
-
text
A builder method that invokes thesetText
method on the instance being constructed.- Returns:
- builder instance
-
tooltip
A builder method that invokes thesetTooltip
method on the instance being constructed.- Returns:
- builder instance
-
userData
A builder method that invokes thesetUserData
method on the instance being constructed.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTab#getStyleClass()
method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTab#getStyleClass()
method.- Returns:
- builder instance
-
closablePropertyApply
Applies a function to theclosableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
contentPropertyApply
Applies a function to thecontentProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
contextMenuPropertyApply
Applies a function to thecontextMenuProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
disablePropertyApply
Applies a function to thedisableProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
disabledPropertyApply
Applies a function to thedisabledProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
graphicPropertyApply
Applies a function to thegraphicProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
idPropertyApply
Applies a function to theidProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onCloseRequestPropertyApply
Applies a function to theonCloseRequestProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onClosedPropertyApply
Applies a function to theonClosedProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onSelectionChangedPropertyApply
Applies a function to theonSelectionChangedProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
selectedPropertyApply
Applies a function to theselectedProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
stylePropertyApply
Applies a function to thestyleProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
tabPanePropertyApply
Applies a function to thetabPaneProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
textPropertyApply
Applies a function to thetextProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
tooltipPropertyApply
Applies a function to thetooltipProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-