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 thesetBlurTypemethod on the instance being constructed.Applies a function to theblurTypePropertyof the instance being constructed.build()Builds and returns an instance of theShadowclass.A builder method that invokes thesetColormethod on the instance being constructed.Applies a function to thecolorPropertyof the instance being constructed.static ShadowBuildercreate()Returns an instance of theShadowBuilder.static ShadowBuilderAccepts the constructor arguments ofShadow(double, Color)and returns an instance ofShadowBuilder.static ShadowBuilderAccepts the constructor arguments ofShadow(BlurType, Color, double)and returns an instance ofShadowBuilder.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.radius(double value) A builder method that invokes thesetRadiusmethod on the instance being constructed.Applies a function to theradiusPropertyof 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 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 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
-
radius
A builder method that invokes thesetRadiusmethod 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
-
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
-
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
-