Class BlendBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.BlendBuilder
The
BlendBuilder class constructs instances of the Blend 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 Blend constructor
and returns an instance of the BlendBuilder.
You can use method chaining to call the builder methods for configuring the Blend.
Finally, invoke the build method to generate an instance of the Blend 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 Blend instance being constructed.bottomInput(Effect value) A builder method that invokes thesetBottomInputmethod on the instance being constructed.Applies a function to thebottomInputPropertyof the instance being constructed.build()Builds and returns an instance of theBlendclass.static BlendBuildercreate()Returns an instance of theBlendBuilder.static BlendBuilderAccepts the constructor arguments ofBlend(BlendMode)and returns an instance ofBlendBuilder.static BlendBuilderAccepts the constructor arguments ofBlend(BlendMode, Effect, Effect)and returns an instance ofBlendBuilder.A builder method that invokes thesetModemethod on the instance being constructed.Applies a function to themodePropertyof the instance being constructed.opacity(double value) A builder method that invokes thesetOpacitymethod on the instance being constructed.Applies a function to theopacityPropertyof the instance being constructed.A builder method that invokes thesetTopInputmethod on the instance being constructed.Applies a function to thetopInputPropertyof the instance being constructed.
-
Method Details
-
create
Returns an instance of theBlendBuilder.- Returns:
- an instance of the
BlendBuilder.
-
create
Accepts the constructor arguments ofBlend(BlendMode)and returns an instance ofBlendBuilder.- Returns:
- an instance of the
BlendBuilder.
-
create
Accepts the constructor arguments ofBlend(BlendMode, Effect, Effect)and returns an instance ofBlendBuilder.- Returns:
- an instance of the
BlendBuilder.
-
build
-
apply
Applies a function to the Blend instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
bottomInput
A builder method that invokes thesetBottomInputmethod on the instance being constructed.- Returns:
- builder instance
-
mode
A builder method that invokes thesetModemethod on the instance being constructed.- Returns:
- builder instance
-
opacity
A builder method that invokes thesetOpacitymethod on the instance being constructed.- Returns:
- builder instance
-
topInput
A builder method that invokes thesetTopInputmethod on the instance being constructed.- Returns:
- builder instance
-
bottomInputPropertyApply
Applies a function to thebottomInputPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.bottomInputProperty().bind(anotherProperty)) // Use shorthand form .bottomInputPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
modePropertyApply
Applies a function to themodePropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.modeProperty().bind(anotherProperty)) // Use shorthand form .modePropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
opacityPropertyApply
Applies a function to theopacityPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.opacityProperty().bind(anotherProperty)) // Use shorthand form .opacityPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-
topInputPropertyApply
Applies a function to thetopInputPropertyof the instance being constructed. This serves as a shorthand form of theapplymethod.Example:
// Use apply .apply(obj -> obj.topInputProperty().bind(anotherProperty)) // Use shorthand form .topInputPropertyApply(prop -> prop.bind(anotherProperty))- Returns:
- builder instance
-