Class LightDistantBuilder
java.lang.Object
io.github.sosuisen.jfxbuilder.graphics.LightDistantBuilder
The
LightDistantBuilder
class constructs instances of the Distant
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 Distant
constructor
and returns an instance of the LightDistantBuilder
.
You can use method chaining to call the builder methods for configuring the Distant
.
Finally, invoke the build
method to generate an instance of the Distant
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<Light.Distant> func) Applies a function to the Distant instance being constructed.azimuth
(double value) A builder method that invokes thesetAzimuth
method on the instance being constructed.Applies a function to theazimuthProperty
of the instance being constructed.build()
Builds and returns an instance of theDistant
class.A builder method that invokes thesetColor
method on the instance being constructed.Applies a function to thecolorProperty
of the instance being constructed.static LightDistantBuilder
create()
Returns an instance of theLightDistantBuilder
.static LightDistantBuilder
Accepts the constructor arguments ofDistant(double, double, Color)
and returns an instance ofLightDistantBuilder
.elevation
(double value) A builder method that invokes thesetElevation
method on the instance being constructed.Applies a function to theelevationProperty
of the instance being constructed.
-
Method Details
-
create
Returns an instance of theLightDistantBuilder
.- Returns:
- an instance of the
LightDistantBuilder
.
-
create
Accepts the constructor arguments ofDistant(double, double, Color)
and returns an instance ofLightDistantBuilder
.- Returns:
- an instance of the
LightDistantBuilder
.
-
build
Builds and returns an instance of theDistant
class.Intermediate builder methods are not evaluated until the
build
method is called; in other words, they are evaluated lazily.- Returns:
- new instance of the
Distant
class
-
apply
Applies a function to the Distant instance being constructed. Most operations on the instance can be performed using this method.- Returns:
- builder instance
-
azimuth
A builder method that invokes thesetAzimuth
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
-
elevation
A builder method that invokes thesetElevation
method on the instance being constructed.- Returns:
- builder instance
-
azimuthPropertyApply
Applies a function to theazimuthProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
colorPropertyApply
Applies a function to thecolorProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-
elevationPropertyApply
Applies a function to theelevationProperty
of the instance being constructed. This serves as a shorthand form of theapply
method.Example:
- Returns:
- builder instance
-