Class DropShadowBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.DropShadowBuilder
The
DropShadowBuilder
class constructs instances of the DropShadow
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 DropShadow
constructor
and returns an instance of the DropShadowBuilder
.
You can use method chaining to call the builder methods for configuring the DropShadow
.
Finally, invoke the build
method to generate an instance of the DropShadow
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 TypeMethodDescriptionapply
(Consumer<DropShadow> func) Applies a function to the DropShadow instance being constructed.A builder method that invokes thesetBlurType
method on the instance being constructed.Applies a function to theblurTypeProperty
of the instance being constructed.build()
Builds and returns an instance of theDropShadow
class.A builder method that invokes thesetColor
method on the instance being constructed.Applies a function to thecolorProperty
of the instance being constructed.static DropShadowBuilder
create()
Returns an instance of theDropShadowBuilder
.static DropShadowBuilder
Accepts the constructor arguments ofDropShadow(double, double, double, Color)
and returns an instance ofDropShadowBuilder
.static DropShadowBuilder
Accepts the constructor arguments ofDropShadow(double, Color)
and returns an instance ofDropShadowBuilder
.static DropShadowBuilder
create
(BlurType blurType, Color color, double radius, double spread, double offsetX, double offsetY) Accepts the constructor arguments ofDropShadow(BlurType, Color, double, double, double, double)
and returns an instance ofDropShadowBuilder
.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 thesetInput
method on the instance being constructed.Applies a function to theinputProperty
of the instance being constructed.offsetX
(double value) A builder method that invokes thesetOffsetX
method on the instance being constructed.Applies a function to theoffsetXProperty
of the instance being constructed.offsetY
(double value) A builder method that invokes thesetOffsetY
method on the instance being constructed.Applies a function to theoffsetYProperty
of the instance being constructed.radius
(double value) A builder method that invokes thesetRadius
method on the instance being constructed.Applies a function to theradiusProperty
of the instance being constructed.spread
(double value) A builder method that invokes thesetSpread
method on the instance being constructed.Applies a function to thespreadProperty
of 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.
-
Method Details
-
create
Returns an instance of theDropShadowBuilder
.- Returns:
- an instance of the
DropShadowBuilder
.
-
create
Accepts the constructor arguments ofDropShadow(double, double, double, Color)
and returns an instance ofDropShadowBuilder
.- Returns:
- an instance of the
DropShadowBuilder
.
-
create
Accepts the constructor arguments ofDropShadow(double, Color)
and returns an instance ofDropShadowBuilder
.- Returns:
- an instance of the
DropShadowBuilder
.
-
create
public static DropShadowBuilder create(BlurType blurType, Color color, double radius, double spread, double offsetX, double offsetY) Accepts the constructor arguments ofDropShadow(BlurType, Color, double, double, double, double)
and returns an instance ofDropShadowBuilder
.- Returns:
- an instance of the
DropShadowBuilder
.
-
build
Builds and returns an instance of theDropShadow
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
DropShadow
class
-
apply
Applies a function to the DropShadow instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
blurType
A builder method that invokes thesetBlurType
method on the instance being constructed.- Returns:
- builder instance
-
color
A builder method that invokes thesetColor
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
-
input
A builder method that invokes thesetInput
method on the instance being constructed.- Returns:
- builder instance
-
offsetX
A builder method that invokes thesetOffsetX
method on the instance being constructed.- Returns:
- builder instance
-
offsetY
A builder method that invokes thesetOffsetY
method on the instance being constructed.- Returns:
- builder instance
-
radius
A builder method that invokes thesetRadius
method on the instance being constructed.- Returns:
- builder instance
-
spread
A builder method that invokes thesetSpread
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
-
blurTypePropertyApply
Applies a function to theblurTypeProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.blurTypeProperty().bind(anotherProperty)) // Use shorthand form .blurTypePropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
colorPropertyApply
Applies a function to thecolorProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.colorProperty().bind(anotherProperty)) // Use shorthand form .colorPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
heightPropertyApply
Applies a function to theheightProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.heightProperty().bind(anotherProperty)) // Use shorthand form .heightPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
inputPropertyApply
Applies a function to theinputProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.inputProperty().bind(anotherProperty)) // Use shorthand form .inputPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
offsetXPropertyApply
Applies a function to theoffsetXProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.offsetXProperty().bind(anotherProperty)) // Use shorthand form .offsetXPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
offsetYPropertyApply
Applies a function to theoffsetYProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.offsetYProperty().bind(anotherProperty)) // Use shorthand form .offsetYPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
radiusPropertyApply
Applies a function to theradiusProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.radiusProperty().bind(anotherProperty)) // Use shorthand form .radiusPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
spreadPropertyApply
Applies a function to thespreadProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.spreadProperty().bind(anotherProperty)) // Use shorthand form .spreadPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-
widthPropertyApply
Applies a function to thewidthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
// Use apply .apply(obj -> obj.widthProperty().bind(anotherProperty)) // Use shorthand form .widthPropertyApply(prop -> prop.bind(anotherProperty))
- Returns:
- builder instance
-