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 thesetBlurTypemethod on the instance being constructed.Applies a function to theblurTypePropertyof the instance being constructed.build()Builds and returns an instance of theDropShadowclass.A builder method that invokes thesetColormethod on the instance being constructed.Applies a function to thecolorPropertyof the instance being constructed.static DropShadowBuildercreate()Returns an instance of theDropShadowBuilder.static DropShadowBuilderAccepts the constructor arguments ofDropShadow(double, double, double, Color)and returns an instance ofDropShadowBuilder.static DropShadowBuilderAccepts the constructor arguments ofDropShadow(double, Color)and returns an instance ofDropShadowBuilder.static DropShadowBuildercreate(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 thesetHeightmethod on the instance being constructed.Applies a function to theheightPropertyof the instance being constructed.A builder method that invokes thesetInputmethod on the instance being constructed.Applies a function to theinputPropertyof the instance being constructed.offsetX(double value) A builder method that invokes thesetOffsetXmethod on the instance being constructed.Applies a function to theoffsetXPropertyof the instance being constructed.offsetY(double value) A builder method that invokes thesetOffsetYmethod on the instance being constructed.Applies a function to theoffsetYPropertyof the instance being constructed.radius(double value) A builder method that invokes thesetRadiusmethod on the instance being constructed.Applies a function to theradiusPropertyof the instance being constructed.spread(double value) A builder method that invokes thesetSpreadmethod on the instance being constructed.Applies a function to thespreadPropertyof the instance being constructed.width(double value) A builder method that invokes thesetWidthmethod on the instance being constructed.Applies a function to thewidthPropertyof 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 theDropShadowclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
DropShadowclass
-
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 thesetBlurTypemethod on the instance being constructed.- Returns:
- builder instance
-
color
A builder method that invokes thesetColormethod on the instance being constructed.- Returns:
- builder instance
-
height
A builder method that invokes thesetHeightmethod on the instance being constructed.- Returns:
- builder instance
-
input
A builder method that invokes thesetInputmethod on the instance being constructed.- Returns:
- builder instance
-
offsetX
A builder method that invokes thesetOffsetXmethod on the instance being constructed.- Returns:
- builder instance
-
offsetY
A builder method that invokes thesetOffsetYmethod on the instance being constructed.- Returns:
- builder instance
-
radius
A builder method that invokes thesetRadiusmethod on the instance being constructed.- Returns:
- builder instance
-
spread
A builder method that invokes thesetSpreadmethod on the instance being constructed.- Returns:
- builder instance
-
width
A builder method that invokes thesetWidthmethod on the instance being constructed.- Returns:
- builder instance
-
blurTypePropertyApply
Applies a function to theblurTypePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 thecolorPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 theheightPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 theinputPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 theoffsetXPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 theoffsetYPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 theradiusPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 thespreadPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.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 thewidthPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.widthProperty().bind(anotherProperty)) // Use shorthand form .widthPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-