java.lang.Object
javafx.scene.effect.Effect
javafx.scene.effect.Reflection
An effect that renders a reflected version of the input below the
 actual input content.
 
 Note that the reflection of a Node with a Reflection
 effect installed will not respond to mouse events or the containment
 methods on the Node.
 
Example:
 Reflection reflection = new Reflection();
 reflection.setFraction(0.7);
 Text text = new Text();
 text.setX(10.0);
 text.setY(50.0);
 text.setCache(true);
 text.setText("Reflections on JavaFX...");
 text.setFill(Color.web("0x3b596d"));
 text.setFont(Font.font(null, FontWeight.BOLD, 40));
 text.setEffect(reflection);
 The code above produces the following:
  
 
- Since:
- JavaFX 2.0
- 
Property SummaryPropertiesTypePropertyDescriptionfinal DoublePropertyThe bottom opacity value, which is the opacity of the reflection at its bottom extreme.final DoublePropertyThe fraction of the input that is visible in the reflection.final ObjectProperty<Effect>The input for thisEffect.final DoublePropertyThe top offset adjustment, which is the distance between the bottom of the input and the top of the reflection.final DoublePropertyThe top opacity value, which is the opacity of the reflection at its top extreme.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new instance of Reflection with default parameters.Reflection(double topOffset, double fraction, double topOpacity, double bottomOpacity) Creates a new instance of Reflection with the specified topOffset, fraction, topOpacity and bottomOpacity.
- 
Method SummaryModifier and TypeMethodDescriptionfinal DoublePropertyThe bottom opacity value, which is the opacity of the reflection at its bottom extreme.final DoublePropertyThe fraction of the input that is visible in the reflection.final doubleGets the value of thebottomOpacityproperty.final doubleGets the value of thefractionproperty.final EffectgetInput()Gets the value of theinputproperty.final doubleGets the value of thetopOffsetproperty.final doubleGets the value of thetopOpacityproperty.final ObjectProperty<Effect>The input for thisEffect.final voidsetBottomOpacity(double value) Sets the value of thebottomOpacityproperty.final voidsetFraction(double value) Sets the value of thefractionproperty.final voidSets the value of theinputproperty.final voidsetTopOffset(double value) Sets the value of thetopOffsetproperty.final voidsetTopOpacity(double value) Sets the value of thetopOpacityproperty.final DoublePropertyThe top offset adjustment, which is the distance between the bottom of the input and the top of the reflection.final DoublePropertyThe top opacity value, which is the opacity of the reflection at its top extreme.
- 
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:
 
- 
topOffsetThe top offset adjustment, which is the distance between the bottom of the input and the top of the reflection.Min: n/a Max: n/a Default: 0.0 Identity: 0.0- Default value:
- 0.0
- See Also:
 
- 
topOpacityThe top opacity value, which is the opacity of the reflection at its top extreme.Min: 0.0 Max: 1.0 Default: 0.5 Identity: 1.0- Default value:
- 0.5
- See Also:
 
- 
bottomOpacityThe bottom opacity value, which is the opacity of the reflection at its bottom extreme.Min: 0.0 Max: 1.0 Default: 0.0 Identity: 1.0- Default value:
- 0.0
- See Also:
 
- 
fractionThe fraction of the input that is visible in the reflection. For example, a value of 0.5 means that only the bottom half of the input will be visible in the reflection.Min: 0.0 Max: 1.0 Default: 0.75 Identity: 1.0- Default value:
- 0.75
- See Also:
 
 
- 
- 
Constructor Details- 
Reflectionpublic Reflection()Creates a new instance of Reflection with default parameters.
- 
Reflectionpublic Reflection(double topOffset, double fraction, double topOpacity, double bottomOpacity) Creates a new instance of Reflection with the specified topOffset, fraction, topOpacity and bottomOpacity.- Parameters:
- topOffset- the distance between the bottom of the input and the top of the reflection
- fraction- the fraction of the input that is visible in the reflection
- topOpacity- the opacity of the reflection at its top extreme
- bottomOpacity- the opacity of the reflection at its bottom extreme
- 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:
 
- 
setTopOffsetpublic final void setTopOffset(double value) Sets the value of thetopOffsetproperty.- Property description:
- The top offset adjustment, which is the distance between the
 bottom of the input and the top of the reflection.
 Min: n/a Max: n/a Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Parameters:
- value- the value for the- topOffsetproperty
- See Also:
 
- 
getTopOffsetpublic final double getTopOffset()Gets the value of thetopOffsetproperty.- Property description:
- The top offset adjustment, which is the distance between the
 bottom of the input and the top of the reflection.
 Min: n/a Max: n/a Default: 0.0 Identity: 0.0
- Default value:
- 0.0
- Returns:
- the value of the topOffsetproperty
- See Also:
 
- 
topOffsetPropertyThe top offset adjustment, which is the distance between the bottom of the input and the top of the reflection.Min: n/a Max: n/a Default: 0.0 Identity: 0.0- Default value:
- 0.0
- Returns:
- the topOffsetproperty
- See Also:
 
- 
setTopOpacitypublic final void setTopOpacity(double value) Sets the value of thetopOpacityproperty.- Property description:
- The top opacity value, which is the opacity of the reflection
 at its top extreme.
 Min: 0.0 Max: 1.0 Default: 0.5 Identity: 1.0
- Default value:
- 0.5
- Parameters:
- value- the value for the- topOpacityproperty
- See Also:
 
- 
getTopOpacitypublic final double getTopOpacity()Gets the value of thetopOpacityproperty.- Property description:
- The top opacity value, which is the opacity of the reflection
 at its top extreme.
 Min: 0.0 Max: 1.0 Default: 0.5 Identity: 1.0
- Default value:
- 0.5
- Returns:
- the value of the topOpacityproperty
- See Also:
 
- 
topOpacityPropertyThe top opacity value, which is the opacity of the reflection at its top extreme.Min: 0.0 Max: 1.0 Default: 0.5 Identity: 1.0- Default value:
- 0.5
- Returns:
- the topOpacityproperty
- See Also:
 
- 
setBottomOpacitypublic final void setBottomOpacity(double value) Sets the value of thebottomOpacityproperty.- Property description:
- The bottom opacity value, which is the opacity of the reflection
 at its bottom extreme.
 Min: 0.0 Max: 1.0 Default: 0.0 Identity: 1.0
- Default value:
- 0.0
- Parameters:
- value- the value for the- bottomOpacityproperty
- See Also:
 
- 
getBottomOpacitypublic final double getBottomOpacity()Gets the value of thebottomOpacityproperty.- Property description:
- The bottom opacity value, which is the opacity of the reflection
 at its bottom extreme.
 Min: 0.0 Max: 1.0 Default: 0.0 Identity: 1.0
- Default value:
- 0.0
- Returns:
- the value of the bottomOpacityproperty
- See Also:
 
- 
bottomOpacityPropertyThe bottom opacity value, which is the opacity of the reflection at its bottom extreme.Min: 0.0 Max: 1.0 Default: 0.0 Identity: 1.0- Default value:
- 0.0
- Returns:
- the bottomOpacityproperty
- See Also:
 
- 
setFractionpublic final void setFraction(double value) Sets the value of thefractionproperty.- Property description:
- The fraction of the input that is visible in the reflection.
 For example, a value of 0.5 means that only the bottom half of the
 input will be visible in the reflection.
 Min: 0.0 Max: 1.0 Default: 0.75 Identity: 1.0
- Default value:
- 0.75
- Parameters:
- value- the value for the- fractionproperty
- See Also:
 
- 
getFractionpublic final double getFraction()Gets the value of thefractionproperty.- Property description:
- The fraction of the input that is visible in the reflection.
 For example, a value of 0.5 means that only the bottom half of the
 input will be visible in the reflection.
 Min: 0.0 Max: 1.0 Default: 0.75 Identity: 1.0
- Default value:
- 0.75
- Returns:
- the value of the fractionproperty
- See Also:
 
- 
fractionPropertyThe fraction of the input that is visible in the reflection. For example, a value of 0.5 means that only the bottom half of the input will be visible in the reflection.Min: 0.0 Max: 1.0 Default: 0.75 Identity: 1.0- Default value:
- 0.75
- Returns:
- the fractionproperty
- See Also:
 
 
-