public class InnerShadow extends Effect
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:
Effect.EffectInputChangeListener, Effect.EffectInputProperty
Modifier and Type | Field and Description |
---|---|
private ObjectProperty<BlurType> |
blurType
The algorithm used to blur the shadow.
|
private boolean |
changeIsLocal |
private DoubleProperty |
choke
The choke of the shadow.
|
private ObjectProperty<Color> |
color
The shadow
Color . |
private DoubleProperty |
height
The vertical size of the shadow blur kernel.
|
private ObjectProperty<Effect> |
input
The input for this
Effect . |
private DoubleProperty |
offsetX
The shadow offset in the x direction, in pixels.
|
private DoubleProperty |
offsetY
The shadow offset in the y direction, in pixels.
|
private DoubleProperty |
radius
The radius of the shadow blur kernel.
|
private DoubleProperty |
width
The horizontal size of the shadow blur kernel.
|
Constructor and Description |
---|
InnerShadow()
Creates a new instance of InnerShadow with default parameters.
|
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.
|
InnerShadow(double radius,
Color color)
Creates a new instance of InnerShadow with specified radius and color.
|
InnerShadow(double radius,
double offsetX,
double offsetY,
Color color)
Creates a new instance of InnerShadow with specified radius, offsetX,
offsetY and color.
|
Modifier and Type | Method and Description |
---|---|
ObjectProperty<BlurType> |
blurTypeProperty() |
DoubleProperty |
chokeProperty() |
ObjectProperty<Color> |
colorProperty() |
BlurType |
getBlurType() |
private BlurType |
getBlurTypeInternal() |
double |
getChoke() |
Color |
getColor() |
private Color |
getColorInternal() |
double |
getHeight() |
Effect |
getInput() |
double |
getOffsetX() |
double |
getOffsetY() |
double |
getRadius() |
double |
getWidth() |
DoubleProperty |
heightProperty() |
(package private) boolean |
impl_checkChainContains(Effect e) |
Effect |
impl_copy()
Deprecated.
This is an internal API that is not intended for use and will be removed in the next version
|
(package private) InnerShadow |
impl_createImpl() |
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
|
(package private) void |
impl_update() |
ObjectProperty<Effect> |
inputProperty() |
DoubleProperty |
offsetXProperty() |
DoubleProperty |
offsetYProperty() |
DoubleProperty |
radiusProperty() |
void |
setBlurType(BlurType value) |
void |
setChoke(double value) |
void |
setColor(Color value) |
void |
setHeight(double value) |
void |
setInput(Effect value) |
void |
setOffsetX(double value) |
void |
setOffsetY(double value) |
void |
setRadius(double value) |
void |
setWidth(double value) |
private void |
updateHeight(double value) |
private void |
updateRadius(double value) |
private void |
updateWidth(double value) |
DoubleProperty |
widthProperty() |
effectBoundsChanged, getInputBounds, getKernelSize, getShadowBounds, impl_containsCycles, impl_effectDirtyProperty, impl_getImpl, impl_isEffectDirty, impl_sync, markDirty, transformBounds
private boolean changeIsLocal
private ObjectProperty<Effect> input
Effect
.
If set to null
, or left unspecified, a graphical image of
the Node
to which the Effect
is attached will be
used as the input.private DoubleProperty radius
width
and height
attributes to a value of (2 * radius + 1)
.
Min: 0.0 Max: 127.0 Default: 10.0 Identity: 0.0
private DoubleProperty width
1.0
are 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
private DoubleProperty height
1.0
are 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
private ObjectProperty<BlurType> blurType
Min: n/a Max: n/a Default: BlurType.THREE_PASS_BOX Identity: n/a
private DoubleProperty choke
0.0
will result in a distribution of the
shadow determined entirely by the blur algorithm.
A choke of 1.0
will 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
private ObjectProperty<Color> color
Color
.
Min: n/a Max: n/a Default: Color.BLACK Identity: n/a
private DoubleProperty offsetX
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
private DoubleProperty offsetY
Min: n/a Max: n/a Default: 0.0 Identity: 0.0
public InnerShadow()
public InnerShadow(double radius, Color color)
radius
- the radius of the shadow blur kernelcolor
- the shadow Color
public InnerShadow(double radius, double offsetX, double offsetY, Color color)
radius
- the radius of the shadow blur kerneloffsetX
- the shadow offset in the x directionoffsetY
- the shadow offset in the y directioncolor
- the shadow Color
public InnerShadow(BlurType blurType, Color color, double radius, double choke, double offsetX, double offsetY)
blurType
- the algorithm used to blur the shadowcolor
- the shadow Color
radius
- the radius of the shadow blur kernelchoke
- the portion of the radius where the contribution of
the source material will be 100%offsetX
- the shadow offset in the x directionoffsetY
- the shadow offset in the y directionInnerShadow impl_createImpl()
impl_createImpl
in class Effect
public final void setInput(Effect value)
public final Effect getInput()
public final ObjectProperty<Effect> inputProperty()
boolean impl_checkChainContains(Effect e)
impl_checkChainContains
in class Effect
public final void setRadius(double value)
public final double getRadius()
public final DoubleProperty radiusProperty()
private void updateRadius(double value)
public final void setWidth(double value)
public final double getWidth()
public final DoubleProperty widthProperty()
private void updateWidth(double value)
public final void setHeight(double value)
public final double getHeight()
public final DoubleProperty heightProperty()
private void updateHeight(double value)
public final void setBlurType(BlurType value)
public final BlurType getBlurType()
public final ObjectProperty<BlurType> blurTypeProperty()
public final void setChoke(double value)
public final double getChoke()
public final DoubleProperty chokeProperty()
public final void setColor(Color value)
public final Color getColor()
public final ObjectProperty<Color> colorProperty()
public final void setOffsetX(double value)
public final double getOffsetX()
public final DoubleProperty offsetXProperty()
public final void setOffsetY(double value)
public final double getOffsetY()
public final DoubleProperty offsetYProperty()
private Color getColorInternal()
private BlurType getBlurTypeInternal()
void impl_update()
impl_update
in class Effect
@Deprecated public BaseBounds impl_getBounds(BaseBounds bounds, BaseTransform tx, Node node, BoundsAccessor boundsAccessor)
Effect
impl_getBounds
in class Effect