84
JavaFX Shadow Effect
As its name suggests, this effect creates the shadow of the node by duplicating the node and making its edges blur. The class named as javafx.scene.effect.Shadow represents the shadow effect. We just need to instantiate this class to generate an appropriate shadow effect.
Properties
The properties of the class along with the setter methods are described in the following table.
Property | Description | Setter Methods |
---|---|---|
blurType | This is a blur type property. This represents the algorithm which is used to blur the shadow. | setBlurType(BlurType value) |
color | This is of color type property. It represents the shadow color. | setColor(Color value) |
height | It represents the vertical size of the shadow blur. | setHeight(double value) |
input | It represents the input for this effect. | setInput(Effect value) |
radius | It represents the radius of the shadow. | setRadius(double value) |
width | It represents the horizontal size of the shadow blur. | setWidth(double value) |
Constructors
The class contains three constructors.
- public Shadow() : Creates a new instance with the default parameters
- public Shadow(double radius, Color color) : Creates a new instance with the specified radius and color.
- public Shadow(BlurType blurtype, Color color, double radius) : Creates a new instance with the specified radius, color and blur type.
Example:
Next TopicJavaFX DropShadow Effect