java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.InnerShadow
A high-level effect that renders a shadow inside the edges of the
 given content with the specified color, radius, and offset.
 
Example:
 InnerShadow innerShadow = new InnerShadow();
 innerShadow.setOffsetX(4);
 innerShadow.setOffsetY(4);
 innerShadow.setColor(Color.web("0x3b596d"));
 Text text = new Text();
 text.setEffect(innerShadow);
 text.setX(20);
 text.setY(100);
 text.setText("InnerShadow");
 text.setFill(Color.ALICEBLUE);
 text.setFont(Font.font(null, FontWeight.BOLD, 50));
 The code above produces the following:
  
 
- Since:
- JavaFX 2.0
- 
Property SummaryPropertiesTypePropertyDescriptionfinal ObjectProperty<BlurType> The algorithm used to blur the shadow.final DoublePropertyThe choke of the shadow.final ObjectProperty<Color> The shadowColor.final DoublePropertyThe vertical size of the shadow blur kernel.final ObjectProperty<Effect> The input for thisEffect.final DoublePropertyThe shadow offset in the x direction, in pixels.final DoublePropertyThe shadow offset in the y direction, in pixels.final DoublePropertyThe radius of the shadow blur kernel.final DoublePropertyThe horizontal size of the shadow blur kernel.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new instance of InnerShadow with default parameters.InnerShadow(double radius, double offsetX, double offsetY, Color color) Creates a new instance of InnerShadow with specified radius, offsetX, offsetY and color.InnerShadow(double radius, Color color) Creates a new instance of InnerShadow with specified radius and color.InnerShadow(BlurType blurType, Color color, double radius, double choke, double offsetX, double offsetY) Creates a new instance of InnerShadow with the specified blurType, color, radius, spread, offsetX and offsetY.
- 
Method SummaryModifier and TypeMethodDescriptionfinal ObjectProperty<BlurType> The algorithm used to blur the shadow.final DoublePropertyThe choke of the shadow.final ObjectProperty<Color> The shadowColor.final BlurTypeGets the value of theblurTypeproperty.final doublegetChoke()Gets the value of thechokeproperty.final ColorgetColor()Gets the value of thecolorproperty.final doubleGets the value of theheightproperty.final EffectgetInput()Gets the value of theinputproperty.final doubleGets the value of theoffsetXproperty.final doubleGets the value of theoffsetYproperty.final doubleGets the value of theradiusproperty.final doublegetWidth()Gets the value of thewidthproperty.final DoublePropertyThe vertical size of the shadow blur kernel.final ObjectProperty<Effect> The input for thisEffect.final DoublePropertyThe shadow offset in the x direction, in pixels.final DoublePropertyThe shadow offset in the y direction, in pixels.final DoublePropertyThe radius of the shadow blur kernel.final voidsetBlurType(BlurType value) Sets the value of theblurTypeproperty.final voidsetChoke(double value) Sets the value of thechokeproperty.final voidSets the value of thecolorproperty.final voidsetHeight(double value) Sets the value of theheightproperty.final voidSets the value of theinputproperty.final voidsetOffsetX(double value) Sets the value of theoffsetXproperty.final voidsetOffsetY(double value) Sets the value of theoffsetYproperty.final voidsetRadius(double value) Sets the value of theradiusproperty.final voidsetWidth(double value) Sets the value of thewidthproperty.final DoublePropertyThe horizontal size of the shadow blur kernel.
- 
Property Details- 
inputThe input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- See Also:
 
- 
radiusThe radius of the shadow blur kernel. This attribute controls the distance that the shadow is spread to each side of the source pixels. Setting the radius is equivalent to setting both thewidthandheightattributes to a value of(2 * radius + 1).Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0- Default value:
- 10.0
- See Also:
 
- 
widthThe horizontal size of the shadow blur kernel. This attribute controls the horizontal size of the total area over which the shadow of a single pixel is distributed by the blur algorithm. Values less than1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0- Default value:
- 21.0
- See Also:
 
- 
heightThe vertical size of the shadow blur kernel. This attribute controls the vertical size of the total area over which the shadow of a single pixel is distributed by the blur algorithm. Values less than1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0- Default value:
- 21.0
- See Also:
 
- 
blurTypeThe algorithm used to blur the shadow.Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a- Default value:
- THREE_PASS_BOX
- See Also:
 
- 
chokeThe choke of the shadow. The choke is the portion of the radius where the contribution of the source material will be 100%. The remaining portion of the radius will have a contribution controlled by the blur kernel. A choke of0.0will result in a distribution of the shadow determined entirely by the blur algorithm. A choke of1.0will result in a solid growth inward of the shadow from the edges to the limit of the radius with a very sharp cutoff to transparency inside the radius.Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0- Default value:
- 0.0
- See Also:
 
- 
colorThe shadowColor.Min: n/a Max: n/a Default: Color.BLACK Identity: n/a- Default value:
- BLACK
- See Also:
 
- 
offsetXThe shadow offset in the x direction, in pixels.Min: n/a Max: n/a Default: 0.0 Identity: 0.0- Default value:
- 0.0
- See Also:
 
- 
offsetYThe shadow offset in the y direction, in pixels.Min: n/a Max: n/a Default: 0.0 Identity: 0.0- Default value:
- 0.0
- See Also:
 
 
- 
- 
Constructor Details- 
InnerShadowpublic InnerShadow()Creates a new instance of InnerShadow with default parameters.
- 
InnerShadowCreates a new instance of InnerShadow with specified radius and color.- Parameters:
- radius- the radius of the shadow blur kernel
- color- the shadow- Color
 
- 
InnerShadowCreates a new instance of InnerShadow with specified radius, offsetX, offsetY and color.- Parameters:
- radius- the radius of the shadow blur kernel
- offsetX- the shadow offset in the x direction
- offsetY- the shadow offset in the y direction
- color- the shadow- Color
 
- 
InnerShadowpublic InnerShadow(BlurType blurType, Color color, double radius, double choke, double offsetX, double offsetY) Creates a new instance of InnerShadow with the specified blurType, color, radius, spread, offsetX and offsetY.- Parameters:
- blurType- the algorithm used to blur the shadow
- color- the shadow- Color
- radius- the radius of the shadow blur kernel
- choke- the portion of the radius where the contribution of the source material will be 100%
- offsetX- the shadow offset in the x direction
- offsetY- the shadow offset in the y direction
- Since:
- JavaFX 2.1
 
 
- 
- 
Method Details- 
setInputSets the value of theinputproperty.- Property description:
- The input for this Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
- Parameters:
- value- the value for the- inputproperty
- See Also:
 
- 
getInputGets the value of theinputproperty.- Property description:
- The input for this Effect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.
- Default value:
- null
- Returns:
- the value of the inputproperty
- See Also:
 
- 
inputPropertyThe input for thisEffect. If set tonull, or left unspecified, a graphical image of theNodeto which theEffectis attached will be used as the input.- Default value:
- null
- Returns:
- the inputproperty
- See Also:
 
- 
setRadiuspublic final void setRadius(double value) Sets the value of theradiusproperty.- Property description:
- The radius of the shadow blur kernel.
 This attribute controls the distance that the shadow is spread
 to each side of the source pixels.
 Setting the radius is equivalent to setting both the widthandheightattributes to a value of(2 * radius + 1).Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
- Default value:
- 10.0
- Parameters:
- value- the value for the- radiusproperty
- See Also:
 
- 
getRadiuspublic final double getRadius()Gets the value of theradiusproperty.- Property description:
- The radius of the shadow blur kernel.
 This attribute controls the distance that the shadow is spread
 to each side of the source pixels.
 Setting the radius is equivalent to setting both the widthandheightattributes to a value of(2 * radius + 1).Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
- Default value:
- 10.0
- Returns:
- the value of the radiusproperty
- See Also:
 
- 
radiusPropertyThe radius of the shadow blur kernel. This attribute controls the distance that the shadow is spread to each side of the source pixels. Setting the radius is equivalent to setting both thewidthandheightattributes to a value of(2 * radius + 1).Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0- Default value:
- 10.0
- Returns:
- the radiusproperty
- See Also:
 
- 
setWidthpublic final void setWidth(double value) Sets the value of thewidthproperty.- Property description:
- The horizontal size of the shadow blur kernel.
 This attribute controls the horizontal size of the total area over
 which the shadow of a single pixel is distributed by the blur algorithm.
 Values less than 1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
- Default value:
- 21.0
- Parameters:
- value- the value for the- widthproperty
- See Also:
 
- 
getWidthpublic final double getWidth()Gets the value of thewidthproperty.- Property description:
- The horizontal size of the shadow blur kernel.
 This attribute controls the horizontal size of the total area over
 which the shadow of a single pixel is distributed by the blur algorithm.
 Values less than 1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
- Default value:
- 21.0
- Returns:
- the value of the widthproperty
- See Also:
 
- 
widthPropertyThe horizontal size of the shadow blur kernel. This attribute controls the horizontal size of the total area over which the shadow of a single pixel is distributed by the blur algorithm. Values less than1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0- Default value:
- 21.0
- Returns:
- the widthproperty
- See Also:
 
- 
setHeightpublic final void setHeight(double value) Sets the value of theheightproperty.- Property description:
- The vertical size of the shadow blur kernel.
 This attribute controls the vertical size of the total area over
 which the shadow of a single pixel is distributed by the blur algorithm.
 Values less than 1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
- Default value:
- 21.0
- Parameters:
- value- the value for the- heightproperty
- See Also:
 
- 
getHeightpublic final double getHeight()Gets the value of theheightproperty.- Property description:
- The vertical size of the shadow blur kernel.
 This attribute controls the vertical size of the total area over
 which the shadow of a single pixel is distributed by the blur algorithm.
 Values less than 1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0
- Default value:
- 21.0
- Returns:
- the value of the heightproperty
- See Also:
 
- 
heightPropertyThe vertical size of the shadow blur kernel. This attribute controls the vertical size of the total area over which the shadow of a single pixel is distributed by the blur algorithm. Values less than1.0are not distributed beyond the original pixel and so have no blurring effect on the shadow.Min: 0.0 Max: 255.0 Default: 21.0 Identity: <1.0- Default value:
- 21.0
- Returns:
- the heightproperty
- See Also:
 
- 
setBlurTypeSets the value of theblurTypeproperty.- Property description:
- The algorithm used to blur the shadow.
 Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
- Default value:
- THREE_PASS_BOX
- Parameters:
- value- the value for the- blurTypeproperty
- See Also:
 
- 
getBlurTypeGets the value of theblurTypeproperty.- Property description:
- The algorithm used to blur the shadow.
 Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
- Default value:
- THREE_PASS_BOX
- Returns:
- the value of the blurTypeproperty
- See Also:
 
- 
blurTypePropertyThe algorithm used to blur the shadow.Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a- Default value:
- THREE_PASS_BOX
- Returns:
- the blurTypeproperty
- See Also:
 
- 
setChokepublic final void setChoke(double value) Sets the value of thechokeproperty.- Property description:
- The choke of the shadow.
 The choke is the portion of the radius where the contribution of
 the source material will be 100%.
 The remaining portion of the radius will have a contribution
 controlled by the blur kernel.
 A choke of 0.0will result in a distribution of the shadow determined entirely by the blur algorithm. A choke of1.0will result in a solid growth inward of the shadow from the edges to the limit of the radius with a very sharp cutoff to transparency inside the radius.Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Parameters:
- value- the value for the- chokeproperty
- See Also:
 
- 
getChokepublic final double getChoke()Gets the value of thechokeproperty.- Property description:
- The choke of the shadow.
 The choke is the portion of the radius where the contribution of
 the source material will be 100%.
 The remaining portion of the radius will have a contribution
 controlled by the blur kernel.
 A choke of 0.0will result in a distribution of the shadow determined entirely by the blur algorithm. A choke of1.0will result in a solid growth inward of the shadow from the edges to the limit of the radius with a very sharp cutoff to transparency inside the radius.Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Returns:
- the value of the chokeproperty
- See Also:
 
- 
chokePropertyThe choke of the shadow. The choke is the portion of the radius where the contribution of the source material will be 100%. The remaining portion of the radius will have a contribution controlled by the blur kernel. A choke of0.0will result in a distribution of the shadow determined entirely by the blur algorithm. A choke of1.0will result in a solid growth inward of the shadow from the edges to the limit of the radius with a very sharp cutoff to transparency inside the radius.Min: 0.0 Max: 1.0 Default: 0.0 Identity: 0.0- Default value:
- 0.0
- Returns:
- the chokeproperty
- See Also:
 
- 
setColorSets the value of thecolorproperty.- Property description:
- The shadow Color.Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
- Default value:
- BLACK
- Parameters:
- value- the value for the- colorproperty
- See Also:
 
- 
getColorGets the value of thecolorproperty.- Property description:
- The shadow Color.Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
- Default value:
- BLACK
- Returns:
- the value of the colorproperty
- See Also:
 
- 
colorPropertyThe shadowColor.Min: n/a Max: n/a Default: Color.BLACK Identity: n/a- Default value:
- BLACK
- Returns:
- the colorproperty
- See Also:
 
- 
setOffsetXpublic final void setOffsetX(double value) Sets the value of theoffsetXproperty.- Property description:
- The shadow offset in the x direction, in pixels.
 Min: n/a Max: n/a Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Parameters:
- value- the value for the- offsetXproperty
- See Also:
 
- 
getOffsetXpublic final double getOffsetX()Gets the value of theoffsetXproperty.- Property description:
- The shadow offset in the x direction, in pixels.
 Min: n/a Max: n/a Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Returns:
- the value of the offsetXproperty
- See Also:
 
- 
offsetXPropertyThe shadow offset in the x direction, in pixels.Min: n/a Max: n/a Default: 0.0 Identity: 0.0- Default value:
- 0.0
- Returns:
- the offsetXproperty
- See Also:
 
- 
setOffsetYpublic final void setOffsetY(double value) Sets the value of theoffsetYproperty.- Property description:
- The shadow offset in the y direction, in pixels.
 Min: n/a Max: n/a Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Parameters:
- value- the value for the- offsetYproperty
- See Also:
 
- 
getOffsetYpublic final double getOffsetY()Gets the value of theoffsetYproperty.- Property description:
- The shadow offset in the y direction, in pixels.
 Min: n/a Max: n/a Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Returns:
- the value of the offsetYproperty
- See Also:
 
- 
offsetYPropertyThe shadow offset in the y direction, in pixels.Min: n/a Max: n/a Default: 0.0 Identity: 0.0- Default value:
- 0.0
- Returns:
- the offsetYproperty
- See Also:
 
 
-