Class TooltipBuilder
TooltipBuilder
class constructs instances of the Tooltip
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 Tooltip
constructor
and returns an instance of the TooltipBuilder
.
You can use method chaining to call the builder methods for configuring the Tooltip
.
Finally, invoke the build
method to generate an instance of the Tooltip
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 TypeMethodDescriptionApplies a function to theactivatedProperty
of the instance being constructed.final TooltipBuilder
addStyleClass
(String... elements) Calls theaddAll
method on the ObservableList returned by theTooltip#getStyleClass()
method.final TooltipBuilder
addStyleClass
(Collection<? extends String> col) Calls theaddAll
method on the ObservableList returned by theTooltip#getStyleClass()
method.A builder method that invokes thesetAnchorLocation
method on the instance being constructed.Applies a function to theanchorLocationProperty
of the instance being constructed.anchorX
(double value) A builder method that invokes thesetAnchorX
method on the instance being constructed.Applies a function to theanchorXProperty
of the instance being constructed.anchorY
(double value) A builder method that invokes thesetAnchorY
method on the instance being constructed.Applies a function to theanchorYProperty
of the instance being constructed.Applies a function to the Tooltip instance being constructed.autoFix
(boolean value) A builder method that invokes thesetAutoFix
method on the instance being constructed.Applies a function to theautoFixProperty
of the instance being constructed.autoHide
(boolean value) A builder method that invokes thesetAutoHide
method on the instance being constructed.Applies a function to theautoHideProperty
of the instance being constructed.build()
Builds and returns an instance of theTooltip
class.consumeAutoHidingEvents
(boolean value) A builder method that invokes thesetConsumeAutoHidingEvents
method on the instance being constructed.Applies a function to theconsumeAutoHidingEventsProperty
of the instance being constructed.contentDisplay
(ContentDisplay value) A builder method that invokes thesetContentDisplay
method on the instance being constructed.Applies a function to thecontentDisplayProperty
of the instance being constructed.static TooltipBuilder
create()
Returns an instance of theTooltipBuilder
.static TooltipBuilder
Accepts the constructor arguments ofTooltip(String)
and returns an instance ofTooltipBuilder
.eventDispatcher
(EventDispatcher value) A builder method that invokes thesetEventDispatcher
method on the instance being constructed.Applies a function to theeventDispatcherProperty
of the instance being constructed.Applies a function to thefocusedProperty
of the instance being constructed.A builder method that invokes thesetFont
method on the instance being constructed.Applies a function to thefontProperty
of the instance being constructed.forceIntegerRenderScale
(boolean forced) A builder method that invokes thesetForceIntegerRenderScale
method on the instance being constructed.Applies a function to theforceIntegerRenderScaleProperty
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.graphicTextGap
(double value) A builder method that invokes thesetGraphicTextGap
method on the instance being constructed.Applies a function to thegraphicTextGapProperty
of the instance being constructed.height
(double value) A builder method that invokes thesetHeight
method on the instance being constructed.Applies a function to theheightProperty
of the instance being constructed.A builder method that invokes thesetHideDelay
method on the instance being constructed.Applies a function to thehideDelayProperty
of the instance being constructed.hideOnEscape
(boolean value) A builder method that invokes thesetHideOnEscape
method on the instance being constructed.Applies a function to thehideOnEscapeProperty
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.maxHeight
(double value) A builder method that invokes thesetMaxHeight
method on the instance being constructed.Applies a function to themaxHeightProperty
of the instance being constructed.maxSize
(double maxWidth, double maxHeight) A builder method that invokes thesetMaxSize
method on the instance being constructed.maxWidth
(double value) A builder method that invokes thesetMaxWidth
method on the instance being constructed.Applies a function to themaxWidthProperty
of the instance being constructed.minHeight
(double value) A builder method that invokes thesetMinHeight
method on the instance being constructed.Applies a function to theminHeightProperty
of the instance being constructed.minSize
(double minWidth, double minHeight) A builder method that invokes thesetMinSize
method on the instance being constructed.minWidth
(double value) A builder method that invokes thesetMinWidth
method on the instance being constructed.Applies a function to theminWidthProperty
of the instance being constructed.onAutoHide
(EventHandler<Event> value) A builder method that invokes thesetOnAutoHide
method on the instance being constructed.Applies a function to theonAutoHideProperty
of the instance being constructed.onCloseRequest
(EventHandler<WindowEvent> value) A builder method that invokes thesetOnCloseRequest
method on the instance being constructed.Applies a function to theonCloseRequestProperty
of the instance being constructed.onHidden
(EventHandler<WindowEvent> value) A builder method that invokes thesetOnHidden
method on the instance being constructed.Applies a function to theonHiddenProperty
of the instance being constructed.onHiding
(EventHandler<WindowEvent> value) A builder method that invokes thesetOnHiding
method on the instance being constructed.Applies a function to theonHidingProperty
of the instance being constructed.onShowing
(EventHandler<WindowEvent> value) A builder method that invokes thesetOnShowing
method on the instance being constructed.Applies a function to theonShowingProperty
of the instance being constructed.onShown
(EventHandler<WindowEvent> value) A builder method that invokes thesetOnShown
method on the instance being constructed.Applies a function to theonShownProperty
of the instance being constructed.opacity
(double value) A builder method that invokes thesetOpacity
method on the instance being constructed.Applies a function to theopacityProperty
of the instance being constructed.Applies a function to theoutputScaleXProperty
of the instance being constructed.Applies a function to theoutputScaleYProperty
of the instance being constructed.Applies a function to theownerNodeProperty
of the instance being constructed.Applies a function to theownerWindowProperty
of the instance being constructed.prefHeight
(double value) A builder method that invokes thesetPrefHeight
method on the instance being constructed.Applies a function to theprefHeightProperty
of the instance being constructed.prefSize
(double prefWidth, double prefHeight) A builder method that invokes thesetPrefSize
method on the instance being constructed.prefWidth
(double value) A builder method that invokes thesetPrefWidth
method on the instance being constructed.Applies a function to theprefWidthProperty
of the instance being constructed.renderScaleX
(double scale) A builder method that invokes thesetRenderScaleX
method on the instance being constructed.Applies a function to therenderScaleXProperty
of the instance being constructed.renderScaleY
(double scale) A builder method that invokes thesetRenderScaleY
method on the instance being constructed.Applies a function to therenderScaleYProperty
of the instance being constructed.Applies a function to thesceneProperty
of the instance being constructed.A builder method that invokes thesetShowDelay
method on the instance being constructed.Applies a function to theshowDelayProperty
of the instance being constructed.showDuration
(Duration showDuration) A builder method that invokes thesetShowDuration
method on the instance being constructed.Applies a function to theshowDurationProperty
of the instance being constructed.Applies a function to theshowingProperty
of the instance being constructed.A builder method that invokes thesetSkin
method on the instance being constructed.skinPropertyApply
(Consumer<ObjectProperty<Skin<?>>> op) Applies a function to theskinProperty
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.A builder method that invokes thesetText
method on the instance being constructed.textAlignment
(TextAlignment value) A builder method that invokes thesetTextAlignment
method on the instance being constructed.Applies a function to thetextAlignmentProperty
of the instance being constructed.textOverrun
(OverrunStyle value) A builder method that invokes thesetTextOverrun
method on the instance being constructed.Applies a function to thetextOverrunProperty
of the instance being constructed.Applies a function to thetextProperty
of the instance being constructed.A builder method that invokes thesetUserData
method on the instance being constructed.width
(double value) A builder method that invokes thesetWidth
method on the instance being constructed.Applies a function to thewidthProperty
of the instance being constructed.wrapText
(boolean value) A builder method that invokes thesetWrapText
method on the instance being constructed.Applies a function to thewrapTextProperty
of the instance being constructed.x
(double value) A builder method that invokes thesetX
method on the instance being constructed.Applies a function to thexProperty
of the instance being constructed.y
(double value) A builder method that invokes thesetY
method on the instance being constructed.Applies a function to theyProperty
of the instance being constructed.
-
Method Details
-
create
Returns an instance of theTooltipBuilder
.- Returns:
- an instance of the
TooltipBuilder
.
-
create
Accepts the constructor arguments ofTooltip(String)
and returns an instance ofTooltipBuilder
.- Returns:
- an instance of the
TooltipBuilder
.
-
build
Builds and returns an instance of theTooltip
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
Tooltip
class
-
apply
Applies a function to the Tooltip instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
anchorLocation
A builder method that invokes thesetAnchorLocation
method on the instance being constructed.- Returns:
- builder instance
-
anchorX
A builder method that invokes thesetAnchorX
method on the instance being constructed.- Returns:
- builder instance
-
anchorY
A builder method that invokes thesetAnchorY
method on the instance being constructed.- Returns:
- builder instance
-
autoFix
A builder method that invokes thesetAutoFix
method on the instance being constructed.- Returns:
- builder instance
-
autoHide
A builder method that invokes thesetAutoHide
method on the instance being constructed.- Returns:
- builder instance
-
consumeAutoHidingEvents
A builder method that invokes thesetConsumeAutoHidingEvents
method on the instance being constructed.- Returns:
- builder instance
-
contentDisplay
A builder method that invokes thesetContentDisplay
method on the instance being constructed.- Returns:
- builder instance
-
eventDispatcher
A builder method that invokes thesetEventDispatcher
method on the instance being constructed.- Returns:
- builder instance
-
font
A builder method that invokes thesetFont
method on the instance being constructed.- Returns:
- builder instance
-
forceIntegerRenderScale
A builder method that invokes thesetForceIntegerRenderScale
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
-
graphicTextGap
A builder method that invokes thesetGraphicTextGap
method on the instance being constructed.- Returns:
- builder instance
-
height
A builder method that invokes thesetHeight
method on the instance being constructed.- Returns:
- builder instance
-
hideDelay
A builder method that invokes thesetHideDelay
method on the instance being constructed.- Returns:
- builder instance
-
hideOnEscape
A builder method that invokes thesetHideOnEscape
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
-
maxHeight
A builder method that invokes thesetMaxHeight
method on the instance being constructed.- Returns:
- builder instance
-
maxSize
A builder method that invokes thesetMaxSize
method on the instance being constructed.- Returns:
- builder instance
-
maxWidth
A builder method that invokes thesetMaxWidth
method on the instance being constructed.- Returns:
- builder instance
-
minHeight
A builder method that invokes thesetMinHeight
method on the instance being constructed.- Returns:
- builder instance
-
minSize
A builder method that invokes thesetMinSize
method on the instance being constructed.- Returns:
- builder instance
-
minWidth
A builder method that invokes thesetMinWidth
method on the instance being constructed.- Returns:
- builder instance
-
onAutoHide
A builder method that invokes thesetOnAutoHide
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
-
onHidden
A builder method that invokes thesetOnHidden
method on the instance being constructed.- Returns:
- builder instance
-
onHiding
A builder method that invokes thesetOnHiding
method on the instance being constructed.- Returns:
- builder instance
-
onShowing
A builder method that invokes thesetOnShowing
method on the instance being constructed.- Returns:
- builder instance
-
onShown
A builder method that invokes thesetOnShown
method on the instance being constructed.- Returns:
- builder instance
-
opacity
A builder method that invokes thesetOpacity
method on the instance being constructed.- Returns:
- builder instance
-
prefHeight
A builder method that invokes thesetPrefHeight
method on the instance being constructed.- Returns:
- builder instance
-
prefSize
A builder method that invokes thesetPrefSize
method on the instance being constructed.- Returns:
- builder instance
-
prefWidth
A builder method that invokes thesetPrefWidth
method on the instance being constructed.- Returns:
- builder instance
-
renderScaleX
A builder method that invokes thesetRenderScaleX
method on the instance being constructed.- Returns:
- builder instance
-
renderScaleY
A builder method that invokes thesetRenderScaleY
method on the instance being constructed.- Returns:
- builder instance
-
showDelay
A builder method that invokes thesetShowDelay
method on the instance being constructed.- Returns:
- builder instance
-
showDuration
A builder method that invokes thesetShowDuration
method on the instance being constructed.- Returns:
- builder instance
-
skin
A builder method that invokes thesetSkin
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
-
textAlignment
A builder method that invokes thesetTextAlignment
method on the instance being constructed.- Returns:
- builder instance
-
textOverrun
A builder method that invokes thesetTextOverrun
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
-
width
A builder method that invokes thesetWidth
method on the instance being constructed.- Returns:
- builder instance
-
wrapText
A builder method that invokes thesetWrapText
method on the instance being constructed.- Returns:
- builder instance
-
x
A builder method that invokes thesetX
method on the instance being constructed.- Returns:
- builder instance
-
y
A builder method that invokes thesetY
method on the instance being constructed.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTooltip#getStyleClass()
method.- Returns:
- builder instance
-
addStyleClass
Calls theaddAll
method on the ObservableList returned by theTooltip#getStyleClass()
method.- Returns:
- builder instance
-
activatedPropertyApply
Applies a function to theactivatedProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
anchorLocationPropertyApply
public TooltipBuilder anchorLocationPropertyApply(Consumer<ObjectProperty<PopupWindow.AnchorLocation>> op) Applies a function to theanchorLocationProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
anchorXPropertyApply
Applies a function to theanchorXProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
anchorYPropertyApply
Applies a function to theanchorYProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
autoFixPropertyApply
Applies a function to theautoFixProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
autoHidePropertyApply
Applies a function to theautoHideProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
consumeAutoHidingEventsPropertyApply
Applies a function to theconsumeAutoHidingEventsProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
contentDisplayPropertyApply
Applies a function to thecontentDisplayProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
eventDispatcherPropertyApply
Applies a function to theeventDispatcherProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
focusedPropertyApply
Applies a function to thefocusedProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
fontPropertyApply
Applies a function to thefontProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
forceIntegerRenderScalePropertyApply
Applies a function to theforceIntegerRenderScaleProperty
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
-
graphicTextGapPropertyApply
Applies a function to thegraphicTextGapProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
heightPropertyApply
Applies a function to theheightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
hideDelayPropertyApply
Applies a function to thehideDelayProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
hideOnEscapePropertyApply
Applies a function to thehideOnEscapeProperty
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
-
maxHeightPropertyApply
Applies a function to themaxHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
maxWidthPropertyApply
Applies a function to themaxWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
minHeightPropertyApply
Applies a function to theminHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
minWidthPropertyApply
Applies a function to theminWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onAutoHidePropertyApply
Applies a function to theonAutoHideProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onCloseRequestPropertyApply
public TooltipBuilder onCloseRequestPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op) Applies a function to theonCloseRequestProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onHiddenPropertyApply
Applies a function to theonHiddenProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onHidingPropertyApply
Applies a function to theonHidingProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onShowingPropertyApply
public TooltipBuilder onShowingPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op) Applies a function to theonShowingProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
onShownPropertyApply
Applies a function to theonShownProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
opacityPropertyApply
Applies a function to theopacityProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
outputScaleXPropertyApply
Applies a function to theoutputScaleXProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
outputScaleYPropertyApply
Applies a function to theoutputScaleYProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
ownerNodePropertyApply
Applies a function to theownerNodeProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
ownerWindowPropertyApply
Applies a function to theownerWindowProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
prefHeightPropertyApply
Applies a function to theprefHeightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
prefWidthPropertyApply
Applies a function to theprefWidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
renderScaleXPropertyApply
Applies a function to therenderScaleXProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
renderScaleYPropertyApply
Applies a function to therenderScaleYProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
scenePropertyApply
Applies a function to thesceneProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
showDelayPropertyApply
Applies a function to theshowDelayProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
showDurationPropertyApply
Applies a function to theshowDurationProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
showingPropertyApply
Applies a function to theshowingProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
skinPropertyApply
Applies a function to theskinProperty
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
-
textAlignmentPropertyApply
Applies a function to thetextAlignmentProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
textOverrunPropertyApply
Applies a function to thetextOverrunProperty
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
-
widthPropertyApply
Applies a function to thewidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
wrapTextPropertyApply
Applies a function to thewrapTextProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
xPropertyApply
Applies a function to thexProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
yPropertyApply
Applies a function to theyProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-