JavaFX InnerShadow Effect

By applying this effect to the node, The shadow is displayed inside the edges of the node. The class javafx.scene.effect.InnerShadow represents the InnerShadow effect. We just need to instantiate this class in order to generate an appropriate effect.

Properties

The properties of the class along with the setter methods are described in the following table.

Property Description Setter Methods
blurType This represents the algorithm used to blur the shadow. setBlurType(BlurType value)
choke This property is of double type. This represents the choke of the shadow. setChoke(Double value)
color The color of the shadow blur kernel. This property is of color type. setColor(Color value)
height This represents the height of the shadow blur kernel. This property is of double type. setHeight(Double value)
input This represents the input for the effect. setInput(Effect value)
offsetX This represents the X coordinate of the shadow offset. This properly is of double type. setOffsetX(Double value)
offsetY This represents the Y coordinate of the shadow offset. This property is of double type. setOffsetY(Double value)
Radius This represents the radius of the shadow blur kernel. setRadius(Double value)
Width It represents the width of the shadow blur kernel. setWidth(double value)

Constructors

The class contains four constructors

  1. public InnerShadow() : creates the instance with the default parameters.
  2. public InnerShadow(double radius, Color color) : creates the instance with the specified radius and color value.
  3. public InnerShadow(double radius, double offsetX, double offsetY, Color color) : creates the instance with the specified radius, offset and color values.
  4. public InnerShadow(BlurType blurtype, Color color, double radius, double choke, double offsetX, double offsetY) : creates the instnance with the specified BlurType. Color, Radius, Choke and offset values.

Example:


JavaFX InnerShadow Effect



Contact US

Email:[email protected]

JavaFX InnerShadow
10/30