Class InnerShadowBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.InnerShadowBuilder
The
InnerShadowBuilder class constructs instances of the InnerShadow 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 InnerShadow constructor
and returns an instance of the InnerShadowBuilder.
You can use method chaining to call the builder methods for configuring the InnerShadow.
Finally, invoke the build method to generate an instance of the InnerShadow 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<InnerShadow> func) Applies a function to the InnerShadow 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 theInnerShadowclass.choke(double value) A builder method that invokes thesetChokemethod on the instance being constructed.Applies a function to thechokePropertyof the instance being constructed.A builder method that invokes thesetColormethod on the instance being constructed.Applies a function to thecolorPropertyof the instance being constructed.static InnerShadowBuildercreate()Returns an instance of theInnerShadowBuilder.static InnerShadowBuilderAccepts the constructor arguments ofInnerShadow(double, double, double, Color)and returns an instance ofInnerShadowBuilder.static InnerShadowBuilderAccepts the constructor arguments ofInnerShadow(double, Color)and returns an instance ofInnerShadowBuilder.static InnerShadowBuilderAccepts the constructor arguments ofInnerShadow(BlurType, Color, double, double, double, double)and returns an instance ofInnerShadowBuilder.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.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 theInnerShadowBuilder.- Returns:
- an instance of the
InnerShadowBuilder.
-
create
Accepts the constructor arguments ofInnerShadow(double, double, double, Color)and returns an instance ofInnerShadowBuilder.- Returns:
- an instance of the
InnerShadowBuilder.
-
create
Accepts the constructor arguments ofInnerShadow(double, Color)and returns an instance ofInnerShadowBuilder.- Returns:
- an instance of the
InnerShadowBuilder.
-
create
public static InnerShadowBuilder create(BlurType blurType, Color color, double radius, double choke, double offsetX, double offsetY) Accepts the constructor arguments ofInnerShadow(BlurType, Color, double, double, double, double)and returns an instance ofInnerShadowBuilder.- Returns:
- an instance of the
InnerShadowBuilder.
-
build
Builds and returns an instance of theInnerShadowclass.Intermediate builder methods are not evaluated until the
buildmethod is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
InnerShadowclass
-
apply
Applies a function to the InnerShadow 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
-
choke
A builder method that invokes thesetChokemethod 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
-
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
-
chokePropertyApply
Applies a function to thechokePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.chokeProperty().bind(anotherProperty)) // Use shorthand form .chokePropertyApply(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
-
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
-