public class Reflection extends Effect
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:
Constructor and Description |
---|
Reflection()
Creates 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.
|
Modifier and Type | Method and Description |
---|---|
DoubleProperty |
bottomOpacityProperty() |
DoubleProperty |
fractionProperty() |
double |
getBottomOpacity() |
double |
getFraction() |
Effect |
getInput() |
double |
getTopOffset() |
double |
getTopOpacity() |
Effect |
impl_copy()
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
BaseBounds |
impl_getBounds(BaseBounds bounds,
BaseTransform tx,
Node node,
BoundsAccessor boundsAccessor)
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
ObjectProperty<Effect> |
inputProperty() |
void |
setBottomOpacity(double value) |
void |
setFraction(double value) |
void |
setInput(Effect value) |
void |
setTopOffset(double value) |
void |
setTopOpacity(double value) |
DoubleProperty |
topOffsetProperty() |
DoubleProperty |
topOpacityProperty() |
impl_effectDirtyProperty, impl_getImpl, impl_isEffectDirty, impl_sync
public Reflection()
public Reflection(double topOffset, double fraction, double topOpacity, double bottomOpacity)
topOffset
- the distance between the bottom of the input and the top of the reflectionfraction
- the fraction of the input that is visible in the reflectiontopOpacity
- the opacity of the reflection at its top extremebottomOpacity
- the opacity of the reflection at its bottom extremepublic final void setInput(Effect value)
public final Effect getInput()
public final ObjectProperty<Effect> inputProperty()
public final void setTopOffset(double value)
public final double getTopOffset()
public final DoubleProperty topOffsetProperty()
public final void setTopOpacity(double value)
public final double getTopOpacity()
public final DoubleProperty topOpacityProperty()
public final void setBottomOpacity(double value)
public final double getBottomOpacity()
public final DoubleProperty bottomOpacityProperty()
public final void setFraction(double value)
public final double getFraction()
public final DoubleProperty fractionProperty()
@Deprecated public BaseBounds impl_getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect
impl_getBounds
in class Effect
@Deprecated public Effect impl_copy()
Copyright © 2020. All rights reserved.