Class ShadowBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.ShadowBuilder
The
ShadowBuilder
class constructs instances of the Shadow
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 Shadow
constructor
and returns an instance of the ShadowBuilder
.
You can use method chaining to call the builder methods for configuring the Shadow
.
Finally, invoke the build
method to generate an instance of the Shadow
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 the Shadow 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 theShadow
class.A builder method that invokes thesetColor
method on the instance being constructed.Applies a function to thecolorProperty
of the instance being constructed.static ShadowBuilder
create()
Returns an instance of theShadowBuilder
.static ShadowBuilder
Accepts the constructor arguments ofShadow(double, Color)
and returns an instance ofShadowBuilder
.static ShadowBuilder
Accepts the constructor arguments ofShadow(BlurType, Color, double)
and returns an instance ofShadowBuilder
.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.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.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 theShadowBuilder
.- Returns:
- an instance of the
ShadowBuilder
.
-
create
Accepts the constructor arguments ofShadow(double, Color)
and returns an instance ofShadowBuilder
.- Returns:
- an instance of the
ShadowBuilder
.
-
create
Accepts the constructor arguments ofShadow(BlurType, Color, double)
and returns an instance ofShadowBuilder
.- Returns:
- an instance of the
ShadowBuilder
.
-
build
-
apply
Applies a function to the Shadow 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
-
radius
A builder method that invokes thesetRadius
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
-
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
-
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
-